月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2023-11-17 9f9ae3e0253f2d657b6b337d62d269394d04ee09
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,6 +85,11 @@
    document.getElementById("myEchartsBIG"),
    "purple-passion"
  );
  var val = [];
  xAxisData.value.filter(res => {
    val.push((res / 1000).toFixed(3));
  })
  chart.setOption({
    title: {
      text: "",
@@ -159,8 +158,8 @@
    },
    xAxis: {
      type: "category",
      data: xAxisData.value,
      name: "米(m)",
      data: val,
      name: "千米",
      axisLabel: {
        //x轴文字的配置
        showMinLabel: true, // 强制显示最小值标签
@@ -199,6 +198,7 @@
    yAxis: {
      type: "value",
    },
    series: seriesData.value,
  });