当前位置:网站首页>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
边栏推荐
- Pikachuxss how to get cookie shooting range, always fail to return to the home page
- Amazon and epic will be settled, and the Microsoft application mall will be opened to third parties
- Automatic heap dump using MBean
- Tensorflow realizes gradient accumulation, and then returns
- Solve importerror: cannot import name 'imread' from 'SciPy misc‘
- 3-5 obtaining cookies through XSS and the use of XSS background management system
- Pipes and xargs
- Selenium displays webdriverwait
- Is qiniu school useful and is the recommended securities account safe
- Minecraft 1.12.2 module development (43) custom shield
猜你喜欢
Pipes and xargs
电脑越用越慢怎么办?文件误删除恢复方法
小米手机全球已舍弃“MI”品牌,全面改用“xiaomi”全称品牌
Mysql database common sense storage engine
On the three paradigms of database design
Deep analysis of C language pointer (Part I)
Common commands of MySQL in Linux
2. Finishing huazi Mianjing -- 2
Minecraft 1.12.2 module development (43) custom shield
[leetcode refers to offer 32 - III. print binary tree III from top to bottom (medium)]
随机推荐
Selenium displays webdriverwait
Arm architecture assembly instructions, registers and some problems
setInterval、setTimeout、requestAnimationFrame
DW basic tutorial (I)
IIS cannot load * woff,*. woff2,*. Solution of SVG file
Chrome 94 引入具有争议的 Idle Detection API,苹果和Mozilla反对
[leetcode refers to offer 52. The first common node of two linked lists (simple)]
Deep analysis of C language function
一文解决浏览器跨域问题
Normalized transforms in pytorch The real calculation process of normalize
Pycharm download and installation
C, print the source program of beautiful bell triangle
Norm normalization in tensorflow and pytorch of records
引入结构化并发,Swift 5.5 发布!
[leetcode refers to the two numbers of offer 57. And S (simple)]
1.整理华子面经--1
[※ leetcode refers to offer 32 - II. Print binary tree II from top to bottom (simple)]
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:app:stripDe
Problem brushing plan -- dynamic programming (IV)
South Korea may ban apple and Google from offering commission to developers, the first in the world