月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-09-18 286c96cd573c60d1af5d6d332df1825b4c600289
图表样式
已修改3个文件
52 ■■■■■ 文件已修改
src/components/BarGraph.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BarGraphAxisLine.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plotting/plottingInquire.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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({
src/components/BarGraphAxisLine.vue
@@ -41,13 +41,11 @@
      type: "line",
      smooth: true,
      symbol: "none", //取消折点圆圈
      itemStyle: {
        normal: {
          label: {
            show: false,
            position: "top",
            formatter: "{c}",
          },
      label: {
        label: {
          show: false,
          position: "top",
          formatter: "{c}",
        },
      },
    });
src/views/plotting/plottingInquire.vue
@@ -98,7 +98,6 @@
                  :width="'100%'"
                  :height="'260px'"
                  :layerData="layerData"
                  :chartsId="0"
                ></Bar-graph>
                <div class="select">
                  <el-select
@@ -445,12 +444,15 @@
const selectPolyline = async (res) => {
  layerArr.value = [];
  const dt = await selectByPolyline(res);
  console.log(dt);
  dt.result.forEach((e) => {
    e.points.forEach((element) => {
      element = keepThreeNum(element);
      element.vals.forEach((v) => {
        v = keepThreeNum(v);
      });
    });
  });
  layeroptions.value = dt.result;
  layerArr.value.push(dt.result[0]);
  chartIsshow.value = true;