This commit is contained in:
syuilo 2019-03-13 09:32:10 +09:00
parent ddbb7c5993
commit 7f835d7f76
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 20 additions and 6 deletions

View file

@ -43,11 +43,19 @@ export default Vue.extend({
stats(stats) { stats(stats) {
this.inChart.updateSeries([{ this.inChart.updateSeries([{
data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick })) data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.active }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.waiting }))
}, { }, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed })) data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed }))
}]); }]);
this.outChart.updateSeries([{ this.outChart.updateSeries([{
data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick })) data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.active }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.waiting }))
}, { }, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed })) data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed }))
}]); }]);
@ -88,7 +96,8 @@ export default Vue.extend({
legend: { legend: {
show: false show: false
}, },
series: [{ data: [] }, { data: [] }] as any, colors: ['#00E396', '#00BCD4', '#FFB300', '#e53935'],
series: [{ data: [] }, { data: [] }, { data: [] }, { data: [] }] as any,
xaxis: { xaxis: {
type: 'numeric', type: 'numeric',
labels: { labels: {

View file

@ -43,11 +43,19 @@ export default define({
stats(stats) { stats(stats) {
this.inChart.updateSeries([{ this.inChart.updateSeries([{
data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick })) data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.active }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.waiting }))
}, { }, {
data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed })) data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed }))
}]); }]);
this.outChart.updateSeries([{ this.outChart.updateSeries([{
data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick })) data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.active }))
}, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.waiting }))
}, { }, {
data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed })) data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed }))
}]); }]);
@ -81,11 +89,8 @@ export default define({
curve: 'straight', curve: 'straight',
width: 1 width: 1
}, },
series: [{ colors: ['#00E396', '#00BCD4', '#FFB300', '#e53935'],
data: [] as any series: [{ data: [] }, { data: [] }, { data: [] }, { data: [] }] as any,
}, {
data: [] as any
}],
yaxis: { yaxis: {
min: 0, min: 0,
} }