Page MenuHomePhabricator

Charts legend display incorrectly in RTL
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The legend text is overlapping the symbol

Screenshot 2024-09-24 at 3.45.38 PM.png (588×880 px, 64 KB)

What should have happened instead?:

No overlap.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Reedy updated the task description. (Show Details)
Reedy updated the task description. (Show Details)
Jdlrobson triaged this task as Medium priority.Oct 11 2024, 10:32 PM

I was surprised to learn that Apache echarts doesn't support rendering in RTL. https://github.com/apache/echarts/issues/16419
I also understand this might not be a huge problem for RTL readers (at least in Hebrew?)

@santhosh do you know off the top of your head if this is supported?

I was surprised to learn that Apache echarts doesn't support rendering in RTL. https://github.com/apache/echarts/issues/16419
I also understand this might not be a huge problem for RTL readers (at least in Hebrew?)

My understanding is that it is common practice for visualized data to remain LTR, even in RTL contexts.

There is no easy answer here. Quite often charts used in RTL languages can work in LTR orientation, but not always. Hebrew is not unique.

I don't know how does this extension work internally. If I put this example page into <div dir="ltr">, it looks mostly fine, so perhaps if you force all the charts to be RTL, it will be a practical workaround. I'm not even sure that it will always work on RTL wikis, and even if it does, it's probably not so sustainable. What happens if people want RTL labels, for example, which will 100% happen? That's one of the reasons why the EasyTimeline extension is hopelessly broken, and will remain so until it is fully replaced because the development of the rendering engine that powers it was abandoned long ago. We're not starting a new extension in 2024 that will have the same problem, right? :)

I'll be happy to have a meeting with the developers of the Chart extension, to understand how it works, and to try to think of ways to make it functional for RTL languages.

There is no easy answer here. Quite often charts used in RTL languages can work in LTR orientation, but not always. Hebrew is not unique.

I don't know how does this extension work internally. If I put this example page into <div dir="ltr">, it looks mostly fine, so perhaps if you force all the charts to be RTL, it will be a practical workaround. I'm not even sure that it will always work on RTL wikis, and even if it does, it's probably not so sustainable. What happens if people want RTL labels, for example, which will 100% happen? That's one of the reasons why the EasyTimeline extension is hopelessly broken, and will remain so until it is fully replaced because the development of the rendering engine that powers it was abandoned long ago. We're not starting a new extension in 2024 that will have the same problem, right? :)

I'll be happy to have a meeting with the developers of the Chart extension, to understand how it works, and to try to think of ways to make it functional for RTL languages.

Thanks for the input. We're not ready to take this on quite yet but we will come back to it before the project is over. Happy to set up a consultation with you on this when the time comes.

CCiufo-WMF lowered the priority of this task from Medium to Low.Nov 4 2024, 7:44 PM
CCiufo-WMF claimed this task.

Just noting this was resolved by some previous work but we forgot to clean up this task. Can confirm at the link in the task description: https://fa.wikipedia.beta.wmflabs.org/wiki/Charts_2.0?uselang=fa