"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", "xAxis", "yAxis", "grid"];
const seriesItem = {
  type: "scatter",
  emphasis: {
    focus: "series"
  },
  symbolSize: 12,
  markArea: {
    silent: true,
    itemStyle: {
      color: "transparent",
      borderWidth: 1,
      borderType: "dashed"
    },
    data: [
      [
        {
          xAxis: "min",
          yAxis: "min"
        },
        {
          xAxis: "max",
          yAxis: "max"
        }
      ]
    ]
  },
  markPoint: {
    symbol: "pin",
    symbolSize: 50,
    data: [
      { type: "max", name: "Max" },
      { type: "min", name: "Min" }
    ]
  }
};
const option = {
  dataset: data.default,
  tooltip: {
    showDelay: 0,
    formatter: (params) => {
      return params.value.length > 1 ? `${params.seriesName}：<br />${params.value[0]} ${params.value[1]}` : `${params.seriesName}：<br />${params.name} ${params.value}`;
    },
    axisPointer: {
      show: true,
      type: "cross",
      lineStyle: {
        type: "dashed",
        width: 1
      }
    }
  },
  xAxis: {
    scale: true
  },
  yAxis: {
    scale: true
  },
  series: data.default.map((item, index2) => ({
    ...seriesItem,
    datasetIndex: index2
  }))
};
class Config extends publicConfig.PublicConfigClass {
  constructor() {
    super(...arguments);
    __publicField(this, "key", index.ScatterCommonConfig.key);
    __publicField(this, "chartConfig", cloneDeep.default(index.ScatterCommonConfig));
    // 图表配置项
    __publicField(this, "option", chart.echartOptionProfixHandle(option, includes));
  }
}
exports.default = Config;
exports.includes = includes;
exports.option = option;
exports.seriesItem = seriesItem;
