You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When a chart is resized with no configuration changes, onRenderChange fails to fire leaving no way for a consumer to detect the rerender.
To Reproduce
Steps to reproduce the behavior:
Create a chart and instrument onRenderChange with a console statement
Resize the chart canvas (resizing the browser works)
So after playing around with this a bit I noticed that the onRenderChange callback is not necessarily coupled directly with when the canvas is re-rendered.
Below you see console logs for a simple single series area chart from refresh. The logs are on the onRenderChange and the internal render to canvas function.
Current
With proposed changes
Here onRenderChange is initially called 5 time with rendered === false, then draws to canvas, then resized (which now sets the rendered state to false), Then something changes the state to true, the chart renders to canvas, the rendered false and rendered true.
Describe the issue
When a chart is resized with no configuration changes,
onRenderChange
fails to fire leaving no way for a consumer to detect the rerender.To Reproduce
Steps to reproduce the behavior:
onRenderChange
with a console statementSee https://codesandbox.io/s/focused-rubin-n6s97f?file=/src/App.tsx
The chart resizes, but the
onRenderChange
isn't called.Screen.Recording.2023-11-02.at.10.31.09.AM.mp4
The text was updated successfully, but these errors were encountered: