Search the Community
Showing results for tags 'setchartdata update'.
Found 1 result
dojchek posted a topic in General usageHello, I need to update the chart data - (from the JSON). However I am slightly confused on how to do it properly. The first solution is to render the chart on init and use setJSONData() method for data updates. The thing which confuses me is the remark from fusioncharts documentation : So, my second solution was to re-render the chart every time new data appears, by disposing the "chart" and then creating a new chart object (with datasource set to new data) and finally render it with render() function. Both approaches seems to work, where the 2nd one is a bit faster in most cases (depends on chart type/data size). My question is - What are the pros/cons for each approach and which one is actually preferable? All the fiddle examples and documentation point me to use setChartData/setJSONData, but there is that one remark which makes me think it should be done via FusionCharts constructor and dataSource attribute. Thanks