-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Line-through over inactive legends #15721
Copy link
Copy link
Closed as not planned
Labels
enThis issue is in EnglishThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.waiting-for: community
Metadata
Metadata
Assignees
Labels
enThis issue is in EnglishThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.waiting-for: community
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this feature solve?
For accessibility reason, we want to add a line-through decoration over the legend if it is inactive. A bit like "legend.inactiveColor". People with less ease with computer have difficulties to see if a legend is active or not, so they contact our support because they cannot see all the data. And it's hard to add the "inactiveColor" without disturbing the style of the page.
For now I'm using the border with a negative padding to simulate the line-through. I have checked in the doc of Echart and Zrender and I found nothing.
What does the proposed API look like?
The way I would like the most is like the tooltip, in the formatter option you can inject html, so you have full control over the style. Another idea would be to add more options like: "legend.lineThroughColor", "legend.lineThroughWidth" and "legend.inactiveLineThroughColor", "legend.inactiveLineThroughWidth". Or another one is to add the option "text-decoration" like in css.