Commit afa6a1576ed8a746db7ca8627210803559a2c289
Merge branch 'ft_local_dev' into 'main'
pref:DEFECT-768 报表配置,报表查看。x轴(优化) See merge request huang/yun-teng-iot-front!342
Showing
1 changed file
with
22 additions
and
6 deletions
| ... | ... | @@ -119,7 +119,9 @@ |
| 119 | 119 | } as echarts.EChartsOption; |
| 120 | 120 | }) || ([] as echarts.EChartsOption[]); |
| 121 | 121 | const chartOption = { |
| 122 | - xAxisData: chartDataConfig.at(0)?.xAxis, | |
| 122 | + xAxisData: chartDataConfig.at(0)?.xAxis?.map(function (str) { | |
| 123 | + return str.replace(' ', '\n'); | |
| 124 | + }), | |
| 123 | 125 | series: [chartDataConfig.at(0)?.series], |
| 124 | 126 | }; |
| 125 | 127 | |
| ... | ... | @@ -160,6 +162,13 @@ |
| 160 | 162 | }, |
| 161 | 163 | tooltip: { |
| 162 | 164 | trigger: 'axis', |
| 165 | + axisPointer: { | |
| 166 | + type: 'cross', | |
| 167 | + animation: false, | |
| 168 | + label: { | |
| 169 | + backgroundColor: '#505765', | |
| 170 | + }, | |
| 171 | + }, | |
| 163 | 172 | }, |
| 164 | 173 | legend: { |
| 165 | 174 | data: attributes, |
| ... | ... | @@ -169,17 +178,23 @@ |
| 169 | 178 | grid: { |
| 170 | 179 | left: '8%', |
| 171 | 180 | right: '8%', |
| 172 | - bottom: '12%', | |
| 181 | + bottom: 80, | |
| 173 | 182 | containLabel: true, |
| 174 | 183 | }, |
| 175 | 184 | dataZoom: [ |
| 176 | 185 | { |
| 177 | - type: 'slider', | |
| 178 | 186 | show: true, |
| 179 | - startValue: 0, | |
| 180 | - endValue: 5, | |
| 187 | + realtime: true, | |
| 188 | + start: 0, | |
| 189 | + end: 15, | |
| 190 | + height: '30', | |
| 191 | + }, | |
| 192 | + { | |
| 193 | + type: 'inside', | |
| 194 | + realtime: true, | |
| 195 | + start: 0, | |
| 196 | + end: 15, | |
| 181 | 197 | height: '30', |
| 182 | - bottom: '4%', | |
| 183 | 198 | }, |
| 184 | 199 | ], |
| 185 | 200 | xAxis: { |
| ... | ... | @@ -188,6 +203,7 @@ |
| 188 | 203 | boundaryGap: false, |
| 189 | 204 | axisPointer: { type: 'shadow' }, |
| 190 | 205 | axisLabel: { |
| 206 | + show: false, | |
| 191 | 207 | interval: 0, |
| 192 | 208 | rotate: 65, |
| 193 | 209 | textStyle: { | ... | ... |