You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/09/28 09:36:35 UTC
[GitHub] [echarts] leekbillow opened a new issue #15805: 图例颜色能否单独设置,不与数据项关联?
leekbillow opened a new issue #15805:
URL: https://github.com/apache/echarts/issues/15805
### What problem does this feature solve?
数据项设置了渐变颜色(主色 边缘渐变),图例想使用主色展示
The data item has a gradient color set (primary color edge gradient). The legend wants to use the primary color for display
https://www.makeapie.com/editor.html?c=xd370ntR39&v=3
### What does the proposed API look like?
legend的color能够支持function
The legend "color" supports "function"
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
--
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
[GitHub] [echarts] Ovilia commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929976663
可以的,配置项:[legend.data.itemStyle](https://echarts.apache.org/zh/option.html#legend.data.itemStyle)
```
legend: {
data: ['男'],
itemStyle: {
color: 'red'
}
},
```
--
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
[GitHub] [echarts] Ovilia commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929976663
--
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
[GitHub] [echarts] leekbillow commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-930001161
> 哦我例子写错了,应该是
>
> ```
> legend: {
> data: [{
> name: '男',
> itemStyle: {
> color: 'red'
> }
> }]
> },
> ```
问题解决,感谢你抽出时间进行回复
--
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
[GitHub] [echarts] leekbillow closed issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow closed issue #15805:
URL: https://github.com/apache/echarts/issues/15805
--
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
[GitHub] [echarts] leekbillow closed issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow closed issue #15805:
URL: https://github.com/apache/echarts/issues/15805
--
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
[GitHub] [echarts] echarts-bot[bot] commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929024341
--
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
[GitHub] [echarts] Ovilia commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929993593
哦我例子写错了,应该是
```
legend: {
data: [{
name: '男',
itemStyle: {
color: 'red'
}
}]
},
```
--
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
[GitHub] [echarts] echarts-bot[bot] commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929024341
--
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
[GitHub] [echarts] Ovilia commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929981438
动态是什么意思?`setOption` 的时候重写设置 legend.data.itemStyle 是可以的
--
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
[GitHub] [echarts] leekbillow commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929979797
--
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
[GitHub] [echarts] leekbillow commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929979797
> 可以的,配置项:[legend.data.itemStyle](https://echarts.apache.org/zh/option.html#legend.data.itemStyle)
>
> ```
> legend: {
> data: ['男'],
> itemStyle: {
> color: 'red'
> }
> },
> ```
统一设置图例颜色是可以的,但是能否动态设置呢?function我试过不支持,设置color数组的话会被数据项的颜色覆盖
--
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
[GitHub] [echarts] leekbillow commented on issue #15805: 图例颜色能否单独设置,不与数据项关联?
Posted by GitBox <gi...@apache.org>.
leekbillow commented on issue #15805:
URL: https://github.com/apache/echarts/issues/15805#issuecomment-929982806
> 动态是什么意思?`setOption` 的时候重写设置 legend.data.itemStyle 是可以的
根据数据项来取值(其实就是支持function),比如这个图我使用渐变色渐变边缘,但是图例希望使用原本的主色

--
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