"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.option2 = exports.option = void 0;
var rich = {
    white: {
      color: "black",
      align: "center",
      padding: [5, 0]
    }
  },
  placeHolderStyle = {
    normal: {
      label: {
        show: !1
      },
      labelLine: {
        show: !1
      },
      color: "rgba(0, 0, 0, 0)",
      borderColor: "rgba(0, 0, 0, 0)",
      borderWidth: 0
    }
  },
  getDataInfo = function(e, o, t) {
    for (var a = [], l = [{
        name: "采集设备",
        value: t,
        color: "#0099cc"
      }, {
        name: "传输设备",
        value: o,
        color: "#ff9900"
      }, {
        name: "控制设备",
        value: e,
        color: "#009966"
      }], r = 0; r < l.length; r++) a.push({
      value: l[r].value,
      name: l[r].name,
      itemStyle: {
        normal: {
          borderWidth: 5,
          shadowBlur: 30,
          color: "black",
          borderColor: l[r].color,
          shadowColor: "rgba(142, 152, 241, 0.6)"
        }
      }
    }, {
      value: 0,
      name: "",
      itemStyle: placeHolderStyle
    });
    return a
  },
  seriesObj = function(e, o, t) {
    var l = [{
      name: "采集设备",
      value: t,
      color: "#0099cc"
    }, {
      name: "传输设备",
      value: o,
      color: "#ff9900"
    }, {
      name: "控制设备",
      value: e,
      color: "#009966"
    }];
    return [{
      name: "",
      type: "pie",
      clockWise: !1,
      radius: [95, 100],
      hoverAnimation: !1,
      startAngle: [180],
      itemStyle: {
        normal: {
          label: {
            textStyle: {
              fontSize: 16,
              color: "#235894"
            },
            show: !0,
            position: "outside",
            color: "black",
            formatter: function(e) {
              for (var o = 0, t = 0, a = 0; a < l.length; a++) t += l[a].value;
              return o = (0 === t ? 0 : e.value / t * 100).toFixed(0), "" !== e.name ? "".concat(e.name, "\n{white|") + "占比".concat(o, "%}") : ""
            },
            rich: rich
          },
          labelLine: {
            show: !0
          }
        }
      },
      data: getDataInfo(e, o, t)
    }]
  },
  option = function(e, o, t) {
    return console.log("".concat(e, "------").concat(o, "------").concat(t)), {
      title: {
        text: "总纳管设备数",
        left: "center",
        textStyle: {
          color: "black"
        }
      },
      tooltip: {
        show: !1
      },
      legend: {
        show: !1
      },
      toolbox: {
        show: !1
      },
      series: seriesObj(e, o, t)
    }
  };
exports.option = option;
var dataBJ = [
    [234, 185, 230, 4.09, 123]
  ],
  dataGZ = [
    [26, 37, 27, 1.163, 27, 13]
  ],
  dataSH = [
    [91, 45, 125, .82, 34, 23]
  ],
  lineStyle = {
    normal: {
      width: 1,
      opacity: .5
    }
  },
  option2 = function(e, o, t, a, l) {
    return {
      title: {
        text: "设备模型分别统计",
        left: "center",
        textStyle: {
          color: "black"
        }
      },
      legend: {
        bottom: 5,
        data: [],
        itemGap: 20,
        textStyle: {
          color: "#fff",
          fontSize: 15
        },
        selectedMode: "single"
      },
      radar: {
        indicator: [{
          name: "消防",
          max: 100
        }, {
          name: "网络",
          max: 100
        }, {
          name: "电力",
          max: 100
        }, {
          name: "工业控制",
          max: 100
        }, {
          name: "其他",
          max: 100
        }],
        shape: "circle",
        splitNumber: 5,
        radius: 100,
        name: {
          textStyle: {
            color: "black"
          }
        },
        splitLine: {
          lineStyle: {
            color: ["#0099cc", "#fcbd4d", "#fb352e", "#7ed142", "#f33af6"].reverse()
          }
        },
        splitArea: {
          show: !1
        },
        axisLine: {
          lineStyle: {
            color: "rgba(238, 197, 102, 0.5)"
          }
        }
      },
      series: [{
        name: "消防",
        type: "radar",
        lineStyle: lineStyle,
        data: [e, t, o, a, l],
        symbol: "none",
        itemStyle: {
          normal: {
            color: "#F9713C"
          }
        },
        areaStyle: {
          normal: {
            opacity: .1
          }
        }
      }]
    }
  };
exports.option2 = option2;
