liuying
2024-11-01 2af7049b8706232b9db59d5be5a08b49285024fc
yiqi_screen/src/components/ProdlineHealthy.vue
@@ -1,8 +1,8 @@
<template>
  <div class="box-container" id="echarts2"></div>
</template>
        <script>
<script>
let timer = null;
export default {
  data() {
@@ -17,13 +17,15 @@
    this.option = {
      legend: {
        orient: "vertical",
        bottom: '12%',
        right: '6%',
        textStyle:{
            color:'#fff'
        bottom: "30%",
        right: "6%",
        textStyle: {
          color: "#fff",
        },
        itemHeight: 5, // 设置图例项的高度
        itemWidth: 5, // 设置图例项的宽度
        data: [
        {
          {
            name: "实际",
            itemStyle: {
              color: "#fff",
@@ -35,12 +37,11 @@
              color: "#01afba",
            },
          },
        ],
      },
      radar: {
        center:['43%','55%'],
        radius:'70%',
        center: ["40%", "50%"], // 更改为更小的百分比以往中间移动
        radius: "30%",
        indicator: [
          { name: "人", max: 100, color: "#fff" },
          { name: "环", max: 100, color: "#fff" },
@@ -52,9 +53,9 @@
        axisLine: {
          show: false,
        },
        axisName:{
            padding:-10
        }
        axisName: {
          padding: -10,
        },
        // splitArea:{
        //   areaStyle:{
@@ -95,10 +96,10 @@
      ],
    };
    this.myChart.setOption(this.option);
    const that=this
    window.addEventListener('resize',()=>{
    const that = this;
    window.addEventListener("resize", () => {
      that.myChart.resize();
    })
    });
    // this.defineEvent();
    // this.selectPie();
    // timer = setInterval(this.selectPie, 1500);
@@ -126,7 +127,7 @@
        type: "highlight",
        seriesIndex: 0,
        dataIndex: this.currentIndex,
      })
      });
    },
    // 鼠标触摸轮播悬停事件
@@ -161,6 +162,19 @@
  },
};
</script>
        <style>
</style>
<style>
#echarts2 {
  margin-top: .1rem;
  width: 2.89rem;
  height: 2.5rem;
  transform: scaleY(2);
  /*
          margin-top: .4rem;
          width: 2.89rem;
          height: 2.0rem;
        transform: scaleY(2); */
  /* border: 1px solid red; */
}
</style>