import merge from "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/merge.mjs";
import pick from "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.mjs";
import { globalThemeJson } from "../../settings/chartThemes/index.mjs";
const mergeTheme = (option, themeSetting, includes) => {
  return option = merge({}, pick(themeSetting, includes), option);
};
const echartOptionProfixHandle = (option, includes) => {
  option["backgroundColor"] = "rgba(0,0,0,0)";
  return mergeTheme(option, globalThemeJson, includes);
};
const setOption = (instance, data) => {
  if (!instance)
    return;
  const option = instance.getOption();
  option.dataset = null;
  instance.setOption(data);
};
export {
  echartOptionProfixHandle,
  mergeTheme,
  setOption
};
