"use strict";
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const chart = require("../../../../public/chart.js");
const publicConfig = require("../../../../public/publicConfig.js");
const index = require("./index.js");
const cloneDeep = require("../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js");
const data = require("./data.json.js");
const includes = ["legend"];
var PieTypeEnum = /* @__PURE__ */ ((PieTypeEnum2) => {
  PieTypeEnum2["NORMAL"] = "常规图";
  PieTypeEnum2["RING"] = "环形图";
  PieTypeEnum2["ROSE"] = "玫瑰图";
  return PieTypeEnum2;
})(PieTypeEnum || {});
const PieTypeObject = {
  [
    "常规图"
    /* NORMAL */
  ]: "nomal",
  [
    "环形图"
    /* RING */
  ]: "ring",
  [
    "玫瑰图"
    /* ROSE */
  ]: "rose"
};
const otherConfig = {
  // 轮播动画
  isCarousel: false
};
const option = {
  ...otherConfig,
  type: "ring",
  tooltip: {
    show: true,
    trigger: "item"
  },
  legend: {
    show: true
  },
  dataset: { ...data.default },
  series: [
    {
      type: "pie",
      radius: ["40%", "65%"],
      center: ["50%", "60%"],
      roseType: false,
      avoidLabelOverlap: false,
      itemStyle: {
        show: true,
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 2
      },
      label: {
        show: false,
        position: "center",
        formatter: "{b}",
        fontSize: 12
      },
      emphasis: {
        label: {
          show: true,
          fontSize: "40",
          fontWeight: "bold"
        }
      },
      labelLine: {
        show: false
      }
    }
  ]
};
class Config extends publicConfig.PublicConfigClass {
  constructor() {
    super(...arguments);
    __publicField(this, "key", index.PieCommonConfig.key);
    __publicField(this, "chartConfig", cloneDeep.default(index.PieCommonConfig));
    // 图表配置项
    __publicField(this, "option", chart.echartOptionProfixHandle(option, includes));
  }
}
exports.PieTypeEnum = PieTypeEnum;
exports.PieTypeObject = PieTypeObject;
exports.default = Config;
exports.includes = includes;
