diff options
| author | zhangyu <[email protected]> | 2023-09-05 14:12:12 +0800 |
|---|---|---|
| committer | zhangyu <[email protected]> | 2023-09-05 14:12:12 +0800 |
| commit | dd368d9bb5beb49cff231edeb69028d38fb97544 (patch) | |
| tree | fb92859b104b1de07a4d61914e9a365f62e38c3b | |
| parent | 4b199777217ce3bb61d7aba70b85553fc097b25d (diff) | |
NEZ-3168 fix:时序图表 Y axis 刻度错误rel-23.07.08
| -rw-r--r-- | nezha-fronted/src/components/chart/renderChart.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nezha-fronted/src/components/chart/renderChart.js b/nezha-fronted/src/components/chart/renderChart.js index f529d70c9..3dc1bbe41 100644 --- a/nezha-fronted/src/components/chart/renderChart.js +++ b/nezha-fronted/src/components/chart/renderChart.js @@ -45,7 +45,7 @@ export default { if (!leftInfo.copies) { chartOption.yAxis[0].min = 0 chartOption.yAxis[0].max = 1 - } else { + } else if (!chartOption.yAxis[0].max) { chartOption.yAxis[0].max = undefined } if (leftInfo.unit.type == 'Time' || chartOption.yAxis[0].maxInterval === 1) { @@ -79,7 +79,7 @@ export default { if (!rightInfo.copies) { chartOption.yAxis[1].min = 0 chartOption.yAxis[1].max = 1 - } else { + } else if (!chartOption.yAxis[1].max) { chartOption.yAxis[1].max = undefined } if (rightInfo.unit.type == 'Time' || chartOption.yAxis[1].maxInterval === 1) { @@ -92,6 +92,7 @@ export default { delete chartOption.yAxis[1].max } } + console.log(chartOption) return chartOption }, getMinMaxFromData (originalDatas, chartUnit = 2, params) { |
