Skip to content

[Feature] Improve emphasis behavior in a stacked bar chart #18694

@SantiagoGallegoGoni

Description

@SantiagoGallegoGoni

What problem does this feature solve?

Mainly, in stacked bars, sometimes is useful to have the emphasis on the whole category, not on the series.
I'll try to explain with some screenshots:

If we see the example on the docs of a stacked bar (this one https://echarts.apache.org/examples/en/editor.html?c=bar-y-category-stack) when we do hover on some value, the emphasis could be 'none', 'self' and 'series'. None is self-explanatory, 'self' raises some weird behavior that, honestly, I don't understand:

image

And 'series' emphasis on the whole series:

image

But is sometimes useful to have the emphasis just on the category, specially when the label shows info about the category, not about the series, something like this (I made it with paint):

image

What does the proposed API look like?

Add 'category' on the series-bar.emphasis.focus with the expected behavior.

Anyway, if there is a workaround to get this, I want to know! I've tried with events but without result.
Also, I think it would be a good idea to have also the event 'blur' to allow having this behavior programmatically.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions