Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Is there a way to rerender a highcharts graph?


Asked by Cara Marsh on Dec 05, 2021 Highcharts



Rerendering a highcharts graph is expensive. You can pass in a isPureConfig option to the ReactHighcharts component, which will keep the highcharts graph from being updated so long as the provided config is referentially equal to its previous value. There is also neverReflow property. Use highcharts-more npm package.
Also Know,
Variable chart is an object of a chart. setData is a method provided by highchart to update data. Method setData contains two parameters, in first parameter we need to pass new value as array and second param is Boolean value. If true then chart updates itself and if false then we have to use redraw () method to update chart (i.e chart.redraw ();)
Moreover, Context: Highcharts.Chart. Fires when the chart is redrawn, either after a call to chart.redraw () or after an axis, series or point is modified with the redraw option set to true. One parameter, event, is passed to the function, containing common event information. Defaults to undefined.
Thereof,
As highcharts doc said: An explicit width for the chart. By default (when null) the width is calculated from the offset width of the containing element. Defaults to null. it works – Nicholas Lu Sep 12 '16 at 2:11 Add a comment | 15 The issue is because of jquery UI. after rendering your chart call this code to reflow the chart.
Likewise,
Render object to html with using HighchartsRenderer. The chart‘s HTML code needs to be received, that is why you need to add a HighchartsRenderer.