月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-09-18 286c96cd573c60d1af5d6d332df1825b4c600289
src/components/BarGraph.vue
@@ -2,10 +2,7 @@
  <div class="title">
    {{ layerData.layerName }}
  </div>
  <div
    :id="`myEcharts${chartsId}`"
    :style="{ width: width, height: height }"
  ></div>
  <div id="myEcharts" :style="{ width: width, height: height }"></div>
</template>
<script lang="ts" setup>
import {
@@ -27,7 +24,6 @@
  width: String,
  height: String,
  layerData: Object,
  chartsId: String,
});
let myEcharts = echarts;
let seriesData = ref([]);
@@ -51,13 +47,11 @@
        type: "line",
        smooth: true,
        symbol: "none", //取消折点圆圈
        itemStyle: {
          normal: {
            label: {
              show: false,
              position: "top",
              formatter: "{c}",
            },
        label: {
          label: {
            show: false,
            position: "top",
            formatter: "{c}",
          },
        },
      });
@@ -84,13 +78,11 @@
      type: "line",
      smooth: true,
      symbol: "none", //取消折点圆圈
      itemStyle: {
        normal: {
          label: {
            show: false,
            position: "top",
            formatter: "{c}",
          },
      label: {
        label: {
          show: false,
          position: "top",
          formatter: "{c}",
        },
      },
    });
@@ -118,7 +110,7 @@
}
function initChart() {
  let chart = myEcharts.init(
    document.getElementById(`myEcharts${props.chartsId}`),
    document.getElementById(`myEcharts`),
    "purple-passion"
  );
  chart.setOption({