apache / apache/echarts

[Feature]Theme settings for graphic elements

Open
#18,189 1 comment 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

Add a possibility to configure theme settings for graphic elements e.g. text or rectangle etc.

We use graphic elements to [add our Logo and website URL](https://arcticrisk.org/latest-data/global-risks/). Along with extra information e.g. Data source, last updated etc.
They are standardized across all plots. We always had dark theme and it worked. We now implemented light theme as well, but we can change the text color for these elements or borders etc. in the theme json. Other texts e.g. title:text, title:subtext and so on works fine.

At the moment, we would have to go with a trade-off as in[ the example](https://echarts.apache.org/examples/en/editor.html?c=line-graphic). But, this takes away the color scheme from the plot.

if this is not possible and an alternative method must be used or is better than configuring themes, then your suggestion would be helpful.

### What does the proposed API look like?

Frankly, I do not know how it can be implemented, but would like to configure below settings in theme e.g. to switch colors with theme switch.

```
dark theme:
{
graphic: {
text: {
style: {
fill: "white"
}
}
}
}

light theme:
{
graphic: {
text: {
style: {
fill: "black"
}
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.