首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

从highcharts图表中删除所有系列数据的正确方法?

在 Highcharts 中,要删除所有系列数据,可以使用以下方法:

  1. 在图表的 destroy 事件中,调用 clearData 方法来删除所有系列数据。例如:chart.destroy(); chart.clearData();chart.update({ series: null, xAxis: { categories: [], tickmarkPlacement: 'on', lineWidth: 0 }, yAxis: { gridLineInterpolation: 'polygon', lineWidth: 0 } }); chart.clearData();以上两种方法都可以删除所有系列数据,具体使用哪种方法取决于你的需求。
  2. 在图表的 update 事件中,调用 clearData 方法来删除所有系列数据。例如:

如果你想了解更详细的内容,可以参考 Highcharts 官方文档:https://www.highcharts.com/docs/chart-concepts/chart-types-and-options

页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

没有搜到相关的结果

领券