You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "tokyohost (via GitHub)" <gi...@apache.org> on 2024/03/27 02:51:50 UTC
[I] [Bug] make pie chart labels different in color [echarts]
tokyohost opened a new issue, #19762:
URL: https://github.com/apache/echarts/issues/19762
### Version
5.4.2
### Link to Minimal Reproduction
https://codepen.io/QWQ-QAQ/pen/OJGjXQQ
### Steps to Reproduce
[Make pie chart labels different in color](https://codepen.io/QWQ-QAQ/pen/OJGjXQQ)
### Current Behavior

### Expected Behavior
<img width="307" alt="1711507763420" src="https://github.com/apache/echarts/assets/36682592/cd958dec-0a25-488f-8189-1beaf3fc2c44">
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
我通过rich 里的a,b 参数尝试控制不同的颜色,但是只会生效a 的,b部分的颜色一直跟着a走
`textStyle: { // 字符串模板
rich: {
b: {
align: 'left',
// color: '#8D97A4',
color: '1',
width: 55,
padding: [0, 8, 0, 0]
},
a: {
align: 'left',
color: 'rgb(128, 134, 149)',
width: 130,
padding: [0, 8, 0, 0]
},
}
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] make pie chart labels different in color [echarts]
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19762:
URL: https://github.com/apache/echarts/issues/19762#issuecomment-2022262330
You can set the color in [legend data](https://echarts.apache.org/en/option.html#legend.data.textStyle.color) for each item individually.
[Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=G4QwTgBAJiAuIGcIF4IG0BQEIG8vYgDsQBbAUwC4IByQLS1BvzUDbtQWr1ACv0Ha_agGn21ABsArpQgBGAAw8CEMGQAO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rt16kCFDe9CJrIJpFAQP850vEZLmoYp8HPLFZzkLGCGYlC0JoUr3M7Mw3EAN7kqZR_A-umsgEDB4xtqIZ4_C5MwLAQJByTABQSFeiA200Pw5D3FWwEB-NBBF9BqHutLuBoKE7BNhEmjRjH-EZ7SEBxvGxoJ62meQuBWeoHAoHSlWhgUEmsIfGg0xJvQ-eonrqLIEg5BAxB4wN8Wbcxo6Had5awFW-H3asZt4wAL30UQoX9vPYH_MgZpA2A_EdLEoEjzrEbd_h0f6gAZNMttzx3caz4RW-yqCqEU4xo7htwkSAA)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] make pie chart labels different in color [echarts]
Posted by "plainheart (via GitHub)" <gi...@apache.org>.
plainheart closed issue #19762: [Bug] make pie chart labels different in color
URL: https://github.com/apache/echarts/issues/19762
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Bug] make pie chart labels different in color [echarts]
Posted by "tokyohost (via GitHub)" <gi...@apache.org>.
tokyohost commented on issue #19762:
URL: https://github.com/apache/echarts/issues/19762#issuecomment-2022298056
> You can set the color in [legend data](https://echarts.apache.org/en/option.html#legend.data.textStyle.color) for each item individually.
>
> [Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=G4QwTgBAJiAuIGcIF4IG0BQEIG8vYgDsQBbAUwC4IByQLS1BvzUDbtQWr1ACv0Ha_agGn21ABs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yqZsq6hGHlRGiQEdfrt16kCFDe9CJrIJpFAQP850vEZLmoYp8HPLFZzkLGCGYlC0JoUr3M7Mw3EAN7kqZR_A-umsgEDB4xtqIZ4_C5MwLAQJByTABQSFeiA200Pw5D3FWwEB-NBBF9BqHutLuBoKE7BNhEmjRjH-EZ7SEBxvGxoJ62meQuBWeoHAoHSlWhgUEmsIfGg0xJvQ-eonrqLIEg5BAxB4wN8Wbcxo6Had5awFW-H3asZt4wAL30UQoX9vPYH_MgZpA2A_EdLEoEjzrEbd_h0f6gAZNMttzx3caz4RW-yqCqEU4xo7htwkSAA)
thanks !, it's worked. really solve my urgent need :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org