当前位置:网站首页>Echerts add pie chart random color
Echerts add pie chart random color
2022-04-23 21:25:00 【Sister Chunfeng】

option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [
120,
200,
150,
80,
70,
110,
130
],
// Random color
// itemStyle: {
// normal: {
// color:function(){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
// },
// },
// Assign colors
itemStyle: {
normal: {
color: function(params) {
var colorarrays = ['#0769CB', '#00ABBD', '#ffd886', "#9F2E61", "#4D670C",'#0769CB', '#00ABBD'];
return colorarrays[params.dataIndex];
}
}
},
type: 'bar'
}
]
};
版权声明
本文为[Sister Chunfeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/110/202204200620163682.html
边栏推荐
- opencv应用——以图拼图
- Mysql database common sense storage engine
- unity 功能扩展
- Pycharm Chinese plug-in
- Ubutnu20 installer centernet
- Alibaba cloud responded to the disclosure of user registration information
- Opencv application -- jigsaw puzzle
- Express③(使用Express编写接口、跨域有关问题)
- 3-5 obtaining cookies through XSS and the use of XSS background management system
- Tensorflow1. X and 2 How does x read those parameters saved in CKPT
猜你喜欢

Centos7 builds MySQL master-slave replication from scratch (avoid stepping on the pit)

Use 3080ti to run tensorflow GPU = 1 X version of the source code

On the three paradigms of database design

Deno 1.13.2 发布


Deep analysis of C language function

DW basic course (II)

go defer

DW basic tutorial (I)

Pycharm download and installation
随机推荐
Norm normalization in tensorflow and pytorch of records
Unit function expansion
Automatic heap dump using MBean
Lunch on the 23rd day at home
matplotlib. Pyplot partition drawing
Centos7 builds MySQL master-slave replication from scratch (avoid stepping on the pit)
Express ③ (use express to write interface and cross domain related issues)
Detectron2 usage model
setInterval、setTimeout、requestAnimationFrame
Minecraft 1.12.2 module development (43) custom shield
Deno 1.13.2 发布
一文解决浏览器跨域问题
Gsi-ecm digital platform for engineering construction management
Reentrant function
UKFslam
DW basic course (II)
Getting started with detectron2
go defer
Crisis is opportunity. Why will the efficiency of telecommuting improve?
1. Finishing huazi Mianjing -- 1