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 2019/12/27 08:34:41 UTC
[GitHub] [incubator-echarts] luozhi1024 opened a new issue #11925: angular下echarts柱状图下多颜色设置不生效
luozhi1024 opened a new issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925
### Version
4.2.1
### Steps to reproduce
```
itemStyle : {
normal:{
borderColor: 'rgba(0,122,255,1)',
color: '#749f83'
// color: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [{
// offset: 0, color: '#007AFF' // 0% 处的颜色
// } , {
// offset: 1, color: 'rgba(0,122,255,0.35)' // 100% 处的颜色
// }],
// global: false // 缺省为 false
// },
}
},
}
]
```

```
itemStyle : {
normal:{
borderColor: 'rgba(0,122,255,1)',
color: ['#749f83','#ca8622','#bda29a','#6e7074','#546570','#c4ccd3']
// color: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [{
// offset: 0, color: '#007AFF' // 0% 处的颜色
// } , {
// offset: 1, color: 'rgba(0,122,255,0.35)' // 100% 处的颜色
// }],
// global: false // 缺省为 false
// },
}
},
}
]
```

设置多颜色后颜色为黑色
### What is expected?
每条柱体为设置的颜色
### What is actually happening?
柱体颜色为黑色,后续设置对应数量的颜色同样为黑色,使用
```
color: function (params){
var colorList = ['#ff4844','#9ac3e5','#66ac52','#ffc032','#549bd3','#f47e39'];
return colorList[params.dataIndex];
}
```
报错
<!-- This issue is generated by echarts-issue-helper. 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925#issuecomment-569221235
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
Have a nice day! 🍵
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [incubator-echarts] pissang commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
Posted by GitBox <gi...@apache.org>.
pissang commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925#issuecomment-569580059
It's global color palette at the top level of `option`.
You can use a callback 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [incubator-echarts] 100pah commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
Posted by GitBox <gi...@apache.org>.
100pah commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925#issuecomment-569534849
`itemStyle.color` should not be an array.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [incubator-echarts] luozhi1024 commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
Posted by GitBox <gi...@apache.org>.
luozhi1024 commented on issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925#issuecomment-569570557

The official document is an array, or what data structure should I use? thanks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [incubator-echarts] luozhi1024 closed issue #11925: angular下echarts柱状图下多颜色设置不生效
Posted by GitBox <gi...@apache.org>.
luozhi1024 closed issue #11925: angular下echarts柱状图下多颜色设置不生效
URL: https://github.com/apache/incubator-echarts/issues/11925
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org