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;
};
import { echartOptionProfixHandle } from "../../../../public/chart.mjs";
import { PublicConfigClass } from "../../../../public/publicConfig.mjs";
import { ScatterLogarithmicRegressionConfig } from "./index.mjs";
import cloneDeep from "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.mjs";
import dataJson from "./data.json.mjs";
const includes = ["legend", "xAxis", "yAxis", "grid"];
const option = {
  dataset: dataJson,
  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
      }
    }
  },
  legend: {
    data: dataJson.filter((i) => {
      var _a, _b, _c;
      return ((_a = i == null ? void 0 : i.transform) == null ? void 0 : _a.type) === "filter" && ((_c = (_b = i == null ? void 0 : i.transform) == null ? void 0 : _b.config) == null ? void 0 : _c.eq);
    }).map((i) => {
      var _a, _b, _c;
      return (_c = (_b = (_a = i.transform) == null ? void 0 : _a.config) == null ? void 0 : _b.eq) == null ? void 0 : _c.toString();
    })
  },
  xAxis: {
    show: true,
    type: "value",
    splitLine: {
      lineStyle: {
        type: "dashed"
      }
    }
  },
  yAxis: {
    show: true,
    type: "value",
    splitLine: {
      lineStyle: {
        type: "dashed"
      }
    }
  },
  visualMap: {
    show: false,
    dimension: 2,
    min: 2e4,
    max: 15e8,
    seriesIndex: [0, 1],
    inRange: {
      symbolSize: [10, 70]
    }
  },
  series: [
    {
      type: "scatter",
      datasetIndex: 1
    },
    {
      type: "scatter",
      datasetIndex: 2
    },
    {
      type: "line",
      smooth: true,
      datasetIndex: 3,
      symbolSize: 0.1,
      symbol: "circle",
      label: { show: true, fontSize: 16 },
      labelLayout: { dx: -20 },
      encode: { label: 2, tooltip: 1 }
    }
  ]
};
class Config extends PublicConfigClass {
  constructor() {
    super(...arguments);
    __publicField(this, "key", ScatterLogarithmicRegressionConfig.key);
    __publicField(this, "chartConfig", cloneDeep(ScatterLogarithmicRegressionConfig));
    // 图表配置项
    __publicField(this, "option", echartOptionProfixHandle(option, includes));
  }
}
export {
  Config as default,
  includes,
  option
};
