How do I update a large treemap without redrawing the diagram?

I have a treemap highchart

with 2 levels that is designed to show the price of the stock market and the value of each part changes almost every second and I want to update the value of each part, but as I see in the highchart we can update the chart with the change data and the redraw diagram, and this will cause the diagram to return to the first level. how can the value of every second level part be updated without redrawing the diagram?

here is the jsfiddle link when click on the area in the first level go to the second level and then click the refresh button and go back to the first level but I want to update on the second level http://jsfiddle.net/1e6yay4t/

+3


source to share


2 answers


JSFiddle would be better as we could see your problem for sure. If you don't want the chart to be redrawn after every update, the update()

Highcharts method as a boolean argument exists specifically for this. See this documentation .

You may need to use:



chart.series[0].update({...}, false);

      

+4


source


I modified your code a bit so I can see what's going on. But to stay at level 2 when upgrading, upgrade a point instead of a whole series.

$("#update-map").on('click', function () {
    tag[3].value += 30000000;
    var chart = $('#treemap').highcharts();
    chart.series[0].data[3].update(tag[3]);
})

      



http://jsfiddle.net/1e6yay4t/1/

(this will work for any point, I just chose 3 because the values ​​in this group are closer, so it's more obvious what's going on)

+2


source







All Articles