Search code examples
cssrshinyright-to-leftdygraphs

r dygraph plot not correctly displayed in right to left Shiny app


I have made a shiny app in Persian language which the Shiny admin css has been changed completely to rtl direction. I have only a problem with my dygraph plot which not displayed correctly. My screenshots are shown below. As you can see, when I inspect the part which is not displayed on the correct place and then I change text-align from left to right in element.style{}, everything will be OK. But how can I change the css for this element.style? This is a div within my plot1 div! I tried many ways to change the css but it didn't work. Moreover in the css file of dygraph I changed all of left-aligns to right but it didn't work too. Thanks in advance for any comment.

enter image description here

enter image description here


Solution

  • I’ve fixed as many RTL issues as I can in Dygraph 2.2.0 so please upgrade to that version. If there are still any left afterwards, please provide an MVCE so that they can be fixed; it’s hard for people who don’t normally use an RTL environment.

    https://dygraphs.com/tests/rtl.html works (I’m not sure if you’d flip the axis label or something…) and most things can be done using just CSS now.