Reload chart data via JSON with Highcharts

前端 未结 8 2268
借酒劲吻你
借酒劲吻你 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条回答
  •  独厮守ぢ
    2020-11-28 02:52

    Actually maybe you should choose the function update is better.
    Here's the document of function update http://api.highcharts.com/highcharts#Series.update

    You can just type code like below:

    chart.series[0].update({data: [1,2,3,4,5]})

    These code will merge the origin option, and update the changed data.

提交回复
热议问题