highcharts-react icon indicating copy to clipboard operation
highcharts-react copied to clipboard

Re-rendering scrollable bar chart causes layering issue

Open hyper-jarrod opened this issue 6 years ago • 1 comments

Hello,

I am rendering a bar chart with scrolling enabled. On the initial render everything shows as expected. When the component is re-rendered the horizontal axis label are no longer fixed to the bottom of the chart.

Screen Shot 2020-10-08 at 1 42 40 pm

I have reproduced the issue in this codesandbox project: https://codesandbox.io/s/frosty-mendel-fkwqf?file=/src/App.tsx

It renders the chart and after 5 seconds forces a state change on App component which re-renders the Chart (no chart values changed). I can see in the DOM that class="highcharts-axis-labels highcharts-yaxis-labels" is nested in the SVG beneath class="highcharts-fixed" on the first render, but on the second render it is nested in the SVG beneath class="highcharts-scrolling".

If I remove all properties from ChartOptions.yAxis then the issue does not occur.

hyper-jarrod avatar Oct 08 '20 02:10 hyper-jarrod

Hello,

Thank you for contacting us.

It seems that it is a general bug in the Highcharts, not in the Highcharts React Wrapper.

Demo: https://jsfiddle.net/BlackLabel/a367g9uv/

I reported it here, where you can follow this thread and expect the workaround: https://github.com/highcharts/highcharts/issues/14323

Basts avatar Oct 08 '20 13:10 Basts