From 64e1db9d04bd4e2dd8ee4e61f2ec1de922c2f84d Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期二, 28 十一月 2023 10:53:06 +0800
Subject: [PATCH] 标绘查询点,多边形添加最大最小值,线查询添加单位

---
 src/components/BarGraphAxisLine.vue |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/components/BarGraphAxisLine.vue b/src/components/BarGraphAxisLine.vue
index 21bae23..9fb4ada 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>
@@ -38,6 +32,7 @@
   props.layerData.points.forEach((e, i) => {
     xAxisData.value.push(returnFloat1(e.len));
   });
+  debugger
   data = trans(props.layerData.points);
   seriesData.value = [];
   data.forEach((e) => {
@@ -87,10 +82,17 @@
   return result;
 }
 function initChart() {
+ 
   let chart = myEcharts.init(
     document.getElementById("myEchartsBIG"),
     "purple-passion"
   );
+  var unit = props.layerData.unit ? props.layerData.unit : '';
+  var val = [];
+  xAxisData.value.filter(res => {
+    val.push((res / 1000).toFixed(3));
+  })
+
   chart.setOption({
     title: {
       text: "",
@@ -159,8 +161,8 @@
     },
     xAxis: {
       type: "category",
-      data: xAxisData.value,
-      name: "绫筹紙m锛�",
+      data: val,
+      name: "鍗冪背",
       axisLabel: {
         //x杞存枃瀛楃殑閰嶇疆
         showMinLabel: true, // 寮哄埗鏄剧ず鏈�灏忓�兼爣绛�
@@ -198,7 +200,9 @@
     },
 
     yAxis: {
+      name:unit,
       type: "value",
+
     },
     series: seriesData.value,
   });

--
Gitblit v1.9.3