score:1
Accepted answer
You need to call chart.reflow
method in onResizeStop
event callback function.
return (
<Rnd
...
onResizeStop={(e, direction, ref, delta, position) => {
const chart = this.chartComponent.current?.chart;
if (chart) {
chart.reflow();
}
...
}}
>
...
</Rnd>
);
From Highcharts API:
reflow( [e])
Reflows the chart to its container. By default, the chart reflows automatically to its container following a window.resize event, as per the chart.reflow option. However, there are no reliable events for div resize, so if the container is resized without a window resize event, this must be called explicitly.
Live demo: https://codesandbox.io/s/cranky-hoover-cz-czw5k?file=/src/index.js
API Reference: https://api.highcharts.com/class-reference/Highcharts.Chart#reflow
Source: stackoverflow.com
Related Articles
- Highcharts automatic resize using drag/resize react-rnd library
- Resize highcharts using react-grid-layout not working
- Library duplication issue using Highcharts in Jaspersoft Studio
- Only one highcharts using react-grid-layout can resize
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- creating a bar chart using Highcharts with React - getting an error that rendering div isn't found
- Resize High Charts based on grid layout width and height using react
- How to scale Highcharts height on window resize with React
- How to draw a bubble map with longitude and latitude using Highcharts in react
- Local Angular library using Highcharts breaks in production mode
- using library highcharts with asp.net mvc 3
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- Update series using Highcharts React wrapper
- How to show 12AM and 12PM on x-axis using highcharts library
- Pie chart slice radius using HighCharts library
- how to render multiple line charts - highcharts on same page using highcharts react wrapper - highcharts-react-offical
- HTML table as data source for highstock charts using highcharts
- Uncaught Error: Highcharts error #17 while creating sunburst chart using react
- Using a flask variable as data source for highcharts
- why is afterSetExtremes function being called twice highcharts using react
- How can I achieve this using HighCharts library
- Highcharts resize chart size using custom export button and replace expand and collapse button dynamically
- Using Highcharts with SPServices jQuery library to create Pie Chart
- Combining drag of jquery to change highcharts Height using CSS
- How can i change the color of a tile which was clicked of a treemap in highcharts using react
- Removing event Listeners in react using highcharts
- ReferenceError: Highcharts is not defined when using lollipop series in react
- Get max of x axis in highcharts using react
- Display Google spreadsheet data using Highcharts library
- Question on Highcharts SVG element create / destroy using Highcharts.SVGRenderer
- Not able to click (Sometimes) categories(Y-axis) of gantt chart after updating series data results
- Highcharts one input of the three not working
- MeanJS Application Fails to Instantiate AngularJS Module After Being Pushed
- How to keep the hover state with Highcharts
- Enable scrollbar using highcharts.js
- Highchart error#15 on trying to plot seperated vertical lines
- Highcharts not displaying JSON data
- Start x axis at minimum value
- Draw a exrta line at specific angle in high chart
- Highcharts - Ignore Series in Pie Percentage
- how to get basic line highchart dynamically through json data
- How to change time in hours on HighChart xAxis from Military to Standard time?
- Highcharts Table y-axis maximum value
- How to draw Euler diagram with highcharts library?
- Highcharts - change values when checkbox checked
- How to replace x-axes with our own timestamp data from API in Highcharts using highstocks
- Apply different colors to different words according to their weight using Highcharts API
- Get highcharts data without parseJSON
- Highcharts - stacked column - order series index dynamically for each category