From 9f9ae3e0253f2d657b6b337d62d269394d04ee09 Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期五, 17 十一月 2023 14:29:08 +0800 Subject: [PATCH] 版本更新 --- src/components/BarGraphAxisLine.vue | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/components/BarGraphAxisLine.vue b/src/components/BarGraphAxisLine.vue index 5d2dd5b..669447e 100644 --- a/src/components/BarGraphAxisLine.vue +++ b/src/components/BarGraphAxisLine.vue @@ -1,12 +1,6 @@ <template> - <div - class="Echarts_box" - :style="{ width: width, height: height }" - > - <div - id="myEchartsBIG" - style="width: 100%; height: 100%" - ></div> + <div class="Echarts_box" :style="{ width: width, height: height }"> + <div id="myEchartsBIG" style="width: 100%; height: 100%"></div> </div> </template> <script lang="ts" setup> @@ -91,10 +85,11 @@ document.getElementById("myEchartsBIG"), "purple-passion" ); - var val = xAxisData.value.filter(res=>{ - return res /1000; + var val = []; + xAxisData.value.filter(res => { + val.push((res / 1000).toFixed(3)); }) - debugger + chart.setOption({ title: { text: "", @@ -163,8 +158,8 @@ }, xAxis: { type: "category", - data:val, - name: "鍗冪背锛圞M锛�", + data: val, + name: "鍗冪背", axisLabel: { //x杞存枃瀛楃殑閰嶇疆 showMinLabel: true, // 寮哄埗鏄剧ず鏈�灏忓�兼爣绛� @@ -203,6 +198,7 @@ yAxis: { type: "value", + }, series: seriesData.value, }); -- Gitblit v1.9.3