const clearChart = (chart) => {
  chart.setOption({
    legend: {
      data: [],
    },
    series: chart.getOption().series.map((d) => ({
      ...d,
      data: [],
    })),
  });
};

export default clearChart;
