You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "maeln (via GitHub)" <gi...@apache.org> on 2025/04/29 12:50:43 UTC
[I] [Bug/Documentation] Misleading (uncorrect?) documentation regarding series-pie.itemStyle.color [echarts]
maeln opened a new issue, #20948:
URL: https://github.com/apache/echarts/issues/20948
### Version
5.6.0
### Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=pie-simple&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQBKOAZjgE5OzB2wCGsA6jgEYBnCGByUANEXQCArnxHkqAMQ4BrHLAAiHMB3GTYuOhViUAxjmgjGlIgF8J6MMGBZIIAqmIZGEAOa-mKmEcAFsbdHsiXADoABMPfWAfC2NKADcmSFMOLD0vQ1SC8NhIqSYIHAECAG19Ty9YaA4Q_BMAQVNzAQFYRUZgMIcGsABPEFbKEAq8hsYOWIhpKpMAVgAGAFIZr1jtDhr9LyRYNJzpVoBGNYAWAA4xRuaJgGUcDkZTAAtYAFFoXwg0FEJSGDWQJzOrQA7ABmFYPJotKgaCDMUxgSggw7EY6nLDnAgrW5rBFPKg_EIcCC5LFg9C4yEEO7XUlIkwAVWgUDgbViAkxpTpDPxrRhaxJjzZlAAahBYjhgLBefyStiALqg4imFxJAgAChA72aAgAlAgAHyEOmwbXQAQuHAAOnlfGkvgNRpCpoA3Nj0MwwNJGHBKABiABM4ZhMIAnDHKL6wYKvKEQJ8OEJlvUwcEQs9RrgEtapOnYsAAO4AIXxjAIV01YIEpYrAHk6HQBDgwAANAgkv3EJvzCsAYR1tZMjF8fA4eol84ea0dKxNxST2Ns-k36DVKFs3qAA
### Steps to Reproduce
1. Create a chart with a serie of type `pie`
2. In the serie option, add the `color` field and set it to a callback of type `(params: Object) => Color` has mentioned in the documentation
### Current Behavior
The callback is never called.
### Expected Behavior
The [documentation](https://echarts.apache.org/en/option.html#series-pie.itemStyle.color) implies that passing a callback to `color` is valid. Therefor, the callback should have been called.
### Environment
```markdown
- OS:Archlinux
- Browser: Firefox 137
- Framework:React & Vanilla
```
### Any additional comments?
The documentation on the pie serie `color` option says the following:
```
color. Color is taken from [option.color Palette](https://echarts.apache.org/en/option.html#color) by default.
Supports setting as solid color using rgb(255,255,255), rgba(255,255,255,1), #fff, etc. Also supports setting as gradient color and pattern fill, see [option.color](https://echarts.apache.org/en/option.html#color) for details
Supports callback functions, in the form of:
(params: Object) => Color
Input parameters are seriesIndex, dataIndex, data, value, and etc. of data item.
```
And it also shows that a function is a valid parameter for this field. So one would expect that giving it a callback should work, but as shown in the snippet, it does not seem to work. The callback is never called.
Is it a bug ? Or the documentation is missing some precision as to which condition needs to be fulfilled for the function to work ?
--
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/Documentation] Misleading (uncorrect?) documentation regarding series-pie.itemStyle.color [echarts]
Posted by "maeln (via GitHub)" <gi...@apache.org>.
maeln commented on issue #20948:
URL: https://github.com/apache/echarts/issues/20948#issuecomment-2838971089
The color was not wrapped in `itemStyle` in my exemple, which indeed is wrong
--
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/Documentation] Misleading (uncorrect?) documentation regarding series-pie.itemStyle.color [echarts]
Posted by "maeln (via GitHub)" <gi...@apache.org>.
maeln closed issue #20948: [Bug/Documentation] Misleading (uncorrect?) documentation regarding series-pie.itemStyle.color
URL: https://github.com/apache/echarts/issues/20948
--
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