You must be logged in to post your query.
Home › Forums › Chart Support › set() slow?
I have multiple charts on one page and I want to the user to be able to configure certain colors. The charts have around 10,000 points each. When the user selects a new color for the labels, I run this loop and it’s very slow. It freezes the browser for up to 15 seconds before it completes for 3 charts. Is there a way to do this faster/inbulk. Perhaps disable rerender, apply all changes and then only rerender once? Also, could I do this through a css trick?
$.each(charts, function (index, chart) { hexColor = color.toHexString(); chart.title.set(“fontColor”,hexColor); chart.legend.set(“fontColor”,hexColor); $.each(chart.axisX, function(xIndex, xAxis) { // could be multiple xAxis xAxis.set(“titleFontColor”,hexColor); xAxis.set(“labelFontColor”,hexColor); }); $.each(chart.axisY, function(yIndex, yAxis) { // could be multiple yAxis yAxis.set(“titleFontColor”,hexColor); }); $.each(chart.axisY2, function(yIndex, yAxis) { // could be multiple yAxis2 yAxis.set(“titleFontColor”,hexColor); }); })
Thanks!
You must be logged in to reply to this topic. Login/Register