Added all charts (pre optimization)

This commit is contained in:
kunkliricsi 2020-11-21 18:10:36 +01:00
parent f85346aea9
commit f862e4b8da
5 changed files with 5 additions and 47 deletions

View File

@ -252,11 +252,8 @@ class Dashboard extends Component {
} }
getLineSeries() { getLineSeries() {
const xSecondsAgo = new Date( Date.now() - 1000 * 2 );
const aSecondAgo = new Date( Date.now() - 1000 * 1);
const messages = {}; const messages = {};
var counter = 0;
for (var p of this.context.heatmapPoints) { for (var p of this.context.heatmapPoints) {
var shortDate = p.date.toUTCString(); var shortDate = p.date.toUTCString();
var message = messages[shortDate]; var message = messages[shortDate];
@ -267,13 +264,14 @@ class Dashboard extends Component {
} }
} }
const series = [{data: []}]; const series = [{name: "message/sec", data: []}];
for (var m in messages) { for (var m in messages) {
series[0].data.push({ series[0].data.push({
x: new Date(m).getTime(), x: new Date(m).getTime(),
y: messages[m], y: messages[m],
}) })
} }
return series; return series;
} }

View File

@ -16,18 +16,6 @@ export class BarChart extends Component {
this.setState({options: { this.setState({options: {
chart: { chart: {
stacked: true, stacked: true,
animations: {
enabled: false,
easing: 'linear',
speed: 1000,
animateGradually: {
enabled: false,
},
dynamicAnimation: {
enabled: true,
speed: 500
}
}
}, },
plotOptions: { plotOptions: {
bar: { bar: {

View File

@ -9,20 +9,6 @@ export class DonutChart extends Component {
this.state = { this.state = {
options: { options: {
chart: {
animations: {
enabled: false,
easing: 'linear',
speed: 1000,
animateGradually: {
enabled: false,
},
dynamicAnimation: {
enabled: true,
speed: 500
}
}
},
legend: { legend: {
fontSize: '18px', fontSize: '18px',
}, },

View File

@ -8,20 +8,6 @@ export class HeatmapChart extends Component {
this.state = { this.state = {
options: { options: {
chart: {
animations: {
enabled: false,
easing: 'linear',
speed: 1000,
animateGradually: {
enabled: false,
},
dynamicAnimation: {
enabled: true,
speed: 500
}
}
},
dataLabels: { dataLabels: {
enabled: false enabled: false
}, },

View File

@ -10,15 +10,15 @@ export class LineChart extends Component {
options: { options: {
chart: { chart: {
animations: { animations: {
enabled: false, enabled: true,
easing: 'linear', easing: 'linear',
speed: 1000, speed: 1000,
animateGradually: { animateGradually: {
enabled: false, enabled: false,
}, },
dynamicAnimation: { dynamicAnimation: {
enabled: true, enabled: false,
speed: 500 speed: 1000
} }
}, },
zoom: { zoom: {