Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The themed legend is not applyed #20665

Open
throrin19 opened this issue Jan 8, 2025 · 3 comments
Open

[Bug] The themed legend is not applyed #20665

throrin19 opened this issue Jan 8, 2025 · 3 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@throrin19
Copy link

Version

5.6.0

Link to Minimal Reproduction

https://codepen.io/throrin19/pen/ogvEgxp

Steps to Reproduce

  1. Create a theme with theme builder and change legend color to a different one (like a ugly red to see it easilly)
  2. Register this theme
  3. init echart with this theme
  4. Create a chart with legend
  5. And voilà, the color is not correct

Current Behavior

The legend works fine in theme builder but not if we use this theme in our project with no reason.
In my example, I set the legend color to red and I want to see that :
image

But Actually I have this result with no modification of the legend. If I inspect the result with SvgRenderer, the legend Text fill is set to #333 and don't change.
image

Expected Behavior

The theme apply the correct legend color.

Environment

- OS: MacOs
- Browser: Chrome
- Framework: Vue@3 but I have same thing without framework

Any additional comments?

No response

@throrin19 throrin19 added the bug label Jan 8, 2025
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jan 8, 2025
@sz-p
Copy link
Contributor

sz-p commented Jan 8, 2025

Try

-   "legendTextColor": "#d21919",
+    legend:{
+       textStyle:{
+         color: "#d21919"
+       }
+    },

image

@throrin19
Copy link
Author

@sz-p ok but in that case all theme builder is wrong and return wrong format.

@sz-p
Copy link
Contributor

sz-p commented Jan 9, 2025

Try to use theme builder the feat [Theme Download] not [Export]. The exported JSON is incorrect.

Follow this step:

  1. Theme Download
  2. JSON version
  3. Download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants