Reload chart data via JSON with Highcharts

前端 未结 8 2265
借酒劲吻你
借酒劲吻你 2020-11-28 02:11

I am trying to reload the data for a Highcharts chart via JSON based on a button click elsewhere in the page. Initially I would like to display a default set of data (spendi

8条回答
  •  -上瘾入骨i
    2020-11-28 02:51

    data = [150,300]; // data from ajax or any other way chart.series[0].setData(data, true);

    The setData will call redraw method.

    Reference: http://api.highcharts.com/highcharts/Series.setData

提交回复
热议问题