apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.36k stars 19.61k forks source link

[Feature] about legend.emphasis api #18955

Open dmcisgood opened 1 year ago

dmcisgood commented 1 year ago

What problem does this feature solve?

Is set in the legend [emphasis] (https://echarts.apache.org/zh/option.html#legend.emphasis), why doesn't work, is I write the wrong case, or provide the configuration items of chaos here

What does the proposed API look like?

I also tried the same configuration, series.emphasis, but it seems to have no effect, a little confused

echarts-bot[bot] commented 1 year ago

I'm sorry to close this issue for it lacks the necessary title. Please provide a descriptive and as concise as possible title to describe your problems or requests and then the maintainers or I will reopen this issue.

Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.

A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.

Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.

helgasoft commented 1 year ago

legend.emphasis is only for selectorLabel. Try this:

  legend: {
    selector: true,
    selectorLabel: { color: 'green' },
    emphasis: {
      selectorLabel: {
        backgroundColor: 'pink',
        color: 'brown',
      }
    }
  },