管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-02-27 fb212223fdc2f692896da5483ba2b1a8aec22d5f
src/components/chart/BasePieChart .vue
@@ -69,7 +69,7 @@
      let data = []
      let xAxisData = []
      let yAxisData = []
      let  count = 0
      let count = 0
      if (this.dataList) {
        data = this.dataList
        echartData = data.map(item => {
@@ -90,7 +90,7 @@
        yellow: {
          color: "#ffc72b",
          fontSize: 18 * scale,
          padding: [5, 4],
          padding: [4, 4],
          align: "center",
        },
        total: {
@@ -102,7 +102,7 @@
          color: "#fff",
          align: "center",
          fontSize: 14 * scale,
          padding: [5, 0],
          padding: [4, 0],
        },
        blue: {
          color: "#49dff0",
@@ -122,9 +122,8 @@
          left: "1%", // 与容器左侧的距离
          right: "1%", // 与容器右侧的距离
          top: "1%", // 与容器顶部的距离
          bottom: "1%", // 与容器底部的距离
          bottom: "10%", // 与容器底部的距离
          containLabel: true,
        },
        title: {
          text: "总数",
@@ -145,7 +144,7 @@
            fontFamily: "YouSheBiaoTiHei",
          },
        },
        // legend: {
        //   selectedMode: false,
        //   formatter: function (name) {
@@ -177,9 +176,15 @@
              "#034079",
              "#6f81da",
              "#00ffb4",
              "#3087d6",
              "#f6ce54",
              "#4be1ff",
              "#b6e9ff",
              "#18edc9",
              "#6ac5fa",
            ],
            minAngle: 30, //最小角度
            startAngle: 270, //起始角度
            // minAngle: 15,
            // startAngle: 270,
            label: {
              normal: {
                formatter: function (params, ticket, callback) {
@@ -194,7 +199,7 @@
                    params.name +
                    "}\n{hr|}\n{yellow|" +
                    params.value +
                    "}\n{blue|" +
                    "} {blue|" +
                    percent +
                    "%}"
                  )
@@ -241,7 +246,7 @@
          default:
            break
        }
        this.initData(requsetFn)
        requsetFn && this.initData(requsetFn)
        this.setOptions(this.option)
      },
    },
@@ -304,6 +309,6 @@
<style lang="scss" scoped>
.piechar {
  width: 100%;
  height: 100%;
  height: 85%;
}
</style>