summaryrefslogtreecommitdiff
path: root/src/components/_sila/Global/Chart.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/_sila/Global/Chart.vue')
-rw-r--r--src/components/_sila/Global/Chart.vue66
1 files changed, 45 insertions, 21 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue
index 8cee2497..e0dfd952 100644
--- a/src/components/_sila/Global/Chart.vue
+++ b/src/components/_sila/Global/Chart.vue
@@ -50,6 +50,27 @@ export default {
yMax: null,
minTickInterval: null,
plotBands: null,
+ plotLines: [
+ {
+ color: '#E11717',
+ dashStyle: 'solid',
+ value: this.warning,
+ zIndex: '1000',
+ width: 2,
+ label: {
+ text: 'Пороговое значение предупреждения',
+ align: 'right',
+ style: {
+ fontFamily: 'Inter, sans-serif',
+ fontSize: '12px',
+ fontStyle: 'normal',
+ fontWeight: '400',
+ lineHeight: '16px',
+ color: '#0C1C2999',
+ },
+ },
+ },
+ ],
};
},
computed: {
@@ -152,27 +173,7 @@ export default {
minRange: this.minRange,
minTickInterval: this.minTickInterval,
minorGridLineColor: '#1A3E5B1A',
- plotLines: [
- {
- color: '#E11717',
- dashStyle: 'solid',
- value: this.warning,
- zIndex: '1000',
- width: 2,
- label: {
- text: 'Пороговое значение предупреждения',
- align: 'right',
- style: {
- fontFamily: 'Inter, sans-serif',
- fontSize: '12px',
- fontStyle: 'normal',
- fontWeight: '400',
- lineHeight: '16px',
- color: '#0C1C2999',
- },
- },
- },
- ],
+ plotLines: this.plotLines,
plotBands: this.plotBands,
},
series: this.metricData.map((item) => ({
@@ -266,6 +267,29 @@ export default {
this.yMax = 100;
this.minTickInterval = 25;
break;
+ case 'power':
+ this.categories = this.setCategories(101, 'Вт');
+ this.yMax = 100;
+ this.minTickInterval = 25;
+ this.plotLines.push({
+ color: '#1A3E5B',
+ dashStyle: 'solid',
+ value: this.shutdown,
+ width: 2,
+ label: {
+ text: 'Пороговое значения отказ',
+ align: 'right',
+ style: {
+ fontFamily: 'Inter',
+ fontSize: '12px',
+ fontStyle: 'normal',
+ fontWeight: '400',
+ lineHeight: '16px',
+ color: '#0C1C2999',
+ },
+ },
+ });
+ break;
}
},
setCategories(count, desc) {