From c23ac06446a9a1edc41cc13723e5d0b8eabdfd63 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 16 七月 2025 17:30:50 +0800 Subject: [PATCH] 2025.7.16 动态溯源新增合并异常 --- src/components/chart/RealTimeLineChart.vue | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/chart/RealTimeLineChart.vue b/src/components/chart/RealTimeLineChart.vue index 7a2ea1d..cc72183 100644 --- a/src/components/chart/RealTimeLineChart.vue +++ b/src/components/chart/RealTimeLineChart.vue @@ -1,6 +1,10 @@ <template> <div class="chart-wrap"> - <div ref="lineChart" class="line-chart"></div> + <div + ref="lineChart" + class="line-chart" + :style="'height:' + chartHeight + ';'" + ></div> </div> </template> <script> @@ -17,6 +21,16 @@ // series: [] // }; // } + }, + // 鎶樼嚎鍥惧睍绀洪珮搴� + chartHeight: { + type: String, + default: '140px' + }, + // 鎶樼嚎鍥綴杞村埢搴﹂棿璺� + yMinInterval: { + type: Number, + default: 1 } }, data() { @@ -37,7 +51,7 @@ refreshChart() { const { xAxis, series } = this.modelValue; if (!this.option) { - this.option = smallLineOption(xAxis, series); + this.option = smallLineOption(xAxis, series, this.yMinInterval); } else { this.option.xAxis[0].data = xAxis; this.option.series = series; @@ -72,7 +86,7 @@ } .line-chart { width: 318px; - height: 140px; + /* height: 140px; */ /* border-bottom: 1px solid rgba(255, 255, 255, 0.329); */ } </style> -- Gitblit v1.9.3