Commit 1db8933e2a7f1b4ea4b14fcf734ad18260d15714
1 parent
9ba8f006
perf: DEFECT-808 dashboard chart switch line chart
Showing
2 changed files
with
9 additions
and
8 deletions
| @@ -51,8 +51,8 @@ | @@ -51,8 +51,8 @@ | ||
| 51 | series: [ | 51 | series: [ |
| 52 | { | 52 | { |
| 53 | name: '告警数', | 53 | name: '告警数', |
| 54 | - barWidth: '10%', | ||
| 55 | - type: 'bar', | 54 | + // barWidth: '10%', |
| 55 | + type: 'line', | ||
| 56 | stack: 'Total', | 56 | stack: 'Total', |
| 57 | data: props.alarmList, | 57 | data: props.alarmList, |
| 58 | color: '#3C78FF', | 58 | color: '#3C78FF', |
| @@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
| 63 | watch( | 63 | watch( |
| 64 | () => props.alarmList, | 64 | () => props.alarmList, |
| 65 | (newValue) => { | 65 | (newValue) => { |
| 66 | + console.log({ newValue, props }); | ||
| 66 | let alarmTotal = 0; | 67 | let alarmTotal = 0; |
| 67 | for (const item of props.alarmList) { | 68 | for (const item of props.alarmList) { |
| 68 | alarmTotal += Number(item[1]); | 69 | alarmTotal += Number(item[1]); |
| @@ -91,10 +92,10 @@ | @@ -91,10 +92,10 @@ | ||
| 91 | series: [ | 92 | series: [ |
| 92 | { | 93 | { |
| 93 | name: '告警数', | 94 | name: '告警数', |
| 94 | - type: 'bar', | 95 | + type: 'line', |
| 95 | stack: 'Total', | 96 | stack: 'Total', |
| 96 | color: '#3C78FF', | 97 | color: '#3C78FF', |
| 97 | - barWidth: '10%', | 98 | + // barWidth: '10%', |
| 98 | data: newValue, | 99 | data: newValue, |
| 99 | }, | 100 | }, |
| 100 | ], | 101 | ], |
| @@ -63,17 +63,17 @@ | @@ -63,17 +63,17 @@ | ||
| 63 | series: [ | 63 | series: [ |
| 64 | { | 64 | { |
| 65 | name: '传输数据点', | 65 | name: '传输数据点', |
| 66 | - type: 'bar', | 66 | + type: 'line', |
| 67 | stack: 'total', | 67 | stack: 'total', |
| 68 | data: newValue, | 68 | data: newValue, |
| 69 | - barWidth: '10%', | 69 | + // barWidth: '10%', |
| 70 | color: '#5AEEED', | 70 | color: '#5AEEED', |
| 71 | }, | 71 | }, |
| 72 | { | 72 | { |
| 73 | name: '传输消息量', | 73 | name: '传输消息量', |
| 74 | - type: 'bar', | 74 | + type: 'line', |
| 75 | stack: 'total', | 75 | stack: 'total', |
| 76 | - barWidth: '10%', | 76 | + // barWidth: '10%', |
| 77 | data: newValue1, | 77 | data: newValue1, |
| 78 | color: '#3C78FF', | 78 | color: '#3C78FF', |
| 79 | }, | 79 | }, |