echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Unable to distinguish the disabled legend in the dark mode

Open MNHarshitha opened this issue 3 years ago • 1 comments

Version

5.3.0

Link to Minimal Reproduction

https://codepen.io/Harshitha19/pen/wvmgbeZ

Steps to Reproduce

  1. Open the sample and click on any one of the legends to toggle the series line.
  2. Observe that it is hard to distinguish between the enabled legend text and the disabled legend text. image

Current Behavior

There is hardly any difference between enabled and disabled legend text in the dark theme.

Expected Behavior

Disabled text color should be applied according to the theme selected.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

MNHarshitha avatar Jul 18 '22 09:07 MNHarshitha

Hi, This is something we are also looking for the solution. Any suggestions/ workaround in this regard would be much appreciated.

RahulVishK avatar Sep 12 '22 07:09 RahulVishK

They seems to have changed the way they store the themes, and so the theme builder is not working anymore...

In the meantime, you can "update" the color by hand:

import dark from 'echarts/lib/theme/dark';
dark.legend.textStyle.color = "#ffffff";

Or you can register a new theme, and specify the correct color:

echarts.registerTheme("xdark", {
    legend: {
        textStyle: {
            color: "#ffffff"
        }
    },
});

Problem location: https://github.com/apache/echarts/blob/27415e3b82e473525707d1621ceb9f6a0d388f20/theme/dark.js#L99-L103

Caceresenzo avatar Jan 11 '23 12:01 Caceresenzo

Is there any plan for this bug?

JayAhn2 avatar Dec 01 '23 14:12 JayAhn2