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
The onResize callback doesn't fire when the document (body) has the direction set to rtl.
This affects responsiveness as well, since the chart doesn't scale correctly when the responsive option is set.
Current Behavior
When resizing, it will work when resizing down (narrowing the chart), and will fail when scaling back up (adding more width to the screen).
Possible Solution
A hack around can be achieved by setting a global listener (on the wrapper element, or say globally on the window), and calling chart.resize() explicitly in it that listener's callback.
Steps to Reproduce (for bugs)
Live example
I sat up this quick example, open up the console and change the width in both RTL, and LTR modes and observe.
Context
Trying to use the chart in a multi-locale website didn't work for rtl languages.
Expected Behavior
The
onResize
callback doesn't fire when the document (body) has the direction set tortl
.This affects responsiveness as well, since the chart doesn't scale correctly when the
responsive
option is set.Current Behavior
When resizing, it will work when resizing down (narrowing the chart), and will fail when scaling back up (adding more width to the screen).
Possible Solution
A hack around can be achieved by setting a global listener (on the wrapper element, or say globally on the window), and calling
chart.resize()
explicitly in it that listener's callback.Steps to Reproduce (for bugs)
Live example
I sat up this quick example, open up the console and change the width in both
RTL
, andLTR
modes and observe.Context
Trying to use the chart in a multi-locale website didn't work for
rtl
languages.Environment
The text was updated successfully, but these errors were encountered: