Skip to content

Line-through over inactive legends #15721

@axel-michaud-cdware

Description

@axel-michaud-cdware

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.waiting-for: community

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions