diff options
Diffstat (limited to 'src/components/_sila/Global/Chart.vue')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index a74c5425..d24aad72 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -14,6 +14,10 @@ export default { type: Array, default: () => [], }, + colors: { + type: Array, + default: () => [], + }, type: { type: String, default: '', @@ -70,7 +74,7 @@ export default { return rv; }, {}); - let metricArr = Object.keys(group).map((key) => { + let metricArr = Object.keys(group).map((key, index) => { let groupTime = group[key].reduce(function (rv, x) { (rv[x['Timestamp']] = rv[x['Timestamp']] || []).push(x); return rv; @@ -91,6 +95,7 @@ export default { return { name: key, data: arr.slice(-60), + color: this.colors[index], }; }); |