I’m not sure if I’m doing things incorrectly but I noticed an issue recently where some updates being made to the yAxis options (specifically max/softMax) via React state weren’t causing the chart to re-render properly.
Here’s a minimal reproduction case: https://codesandbox.io/p/sandbox/highcharts-react-demo-forked-jhsmq4?file=%2Fdemo.jsx%3A30%2C4
- The example has a chart with points [1,2,3] and yAxis[0].softMax set to 2. Thus the graph shows all points.
- If you hit the toggle button that causes yAxis[0].max to be set to 2 and softMax is removed. The chart updates correctly with the max of the yAxis being set to 2 so the 3rd point is hidden.
- If you hit the toggle button again that causes the chart to go back to the state from step 1: softMax=2 is added and max=2 is removed. Yet, the chart doesn’t update. The max for the yAxis is still 2 and the third point remains hidden.
Maybe this is some specific edge-case with min/max and softMin/softMax because all other updates to the yAxis options object have caused re-renders correctly.