Is there some method that will refresh pivot chart because pivotchar.refresh() or pivotchart.reload() does not work.
I made a page that loads data once and then every time user change something I need to update data without reload. Saving into database is done in the background. The issue I have comes after I update data for pivot chart. Then I use $$(“Chart1”).data.clearAll(); to clear previous data and $$(“Chart1”).parse(ChartData); to insert new set. That part works fine except that my chart uses some filters and initial state is blank chart. It is just - white. Without grid, without bars… I need to select some filter manually in order to show bars and values etc. So, the data is there but it seems that chart visible part is not updated for some reason. What can cause it and is it possible to refresh pivot chart programatically or at least to re-filter pivot chart.
The data was OK, the code was OK. Reason for this behavior comes because I am using list as menu and pivot chart is not visible when I clear and parse the data. I am adding new quotes at separate view and pivot chart is showing total quoted value vs total recovered value vs total invoiced value. When I add new quote, total quote value has to be changed but it is showed at different view. After I click chart menu that behaviour occures.
Solution: Show pivot-chart first and then replace the data. Use onItemClick event. I do not need to show data immediately. Update array and replace pivot chart data after chart renders.