您的位置:首页 > Web前端 > JavaScript

ExtJS Pie Chart: Define slices colors

2015-09-07 14:46 603 查看

Background

While using Pie Chart of ExtJS, you may want to define every slice yourself.

ExtJS Version

ExtJS 5.1.0

Code

xtype: 'polar',
… ...
series: [{
type: 'pie',
renderer: function(sprite, record, attr, index, store) {
return Ext.apply(attr, {
fill: [ "#ead22c","#ff0101","#1fba07"][index%3]
});
},
… …
}]


Reference

PieChart : Define slices colors
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: