apache / echarts

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

[Feature] Legend text color #19969

Open admin3w opened 4 months ago

admin3w commented 4 months ago

What problem does this feature solve?

Legend cannot set the font color, but we want to be able to make the text color match the legend shape color This effect can be achieved by defining legend.textStyle.color as a function and returning undefined in echarts v5.5.0

What does the proposed API look like?

{
 legend:{
  textStyle:{
   color(e){
    // e have series info
     return "#000"
   },
  }
 }
}
echarts-bot[bot] commented 4 months 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.