当前位置:网站首页>Echart折线图:当多条折线图的name一样时也显示不同的颜色
Echart折线图:当多条折线图的name一样时也显示不同的颜色
2022-06-13 06:04:00 【HaanLen】
echart折线图,当多条折线图的name一样的,颜色也是一致。
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
tooltip: {
trigger: 'axis'
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
name: 'heeki'
},
{
data: [110, 210, 224, 18, 135, 17, 260],
type: 'line',
name: 'heeki'
}
]
};
要设置不同颜色,需要在series中单独设置不同的颜色
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
tooltip: {
trigger: 'axis'
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
name: 'heeki',
itemStyle: {
normal: {
color: 'red'
}
}
},
{
data: [110, 210, 224, 18, 135, 17, 260],
type: 'line',
name: 'heeki',
itemStyle: {
normal: {
color: 'yellow'
}
}
}
]
};
边栏推荐
- USB 0xc0000011 error
- Leetcode fizz buzz simple
- 微信小程序:全局状态变量的使用
- Working principle of sentinel series (concept)
- Minimum spanning tree (prim+kruskal) learning notes (template +oj topic)
- Leetcode- string addition - simple
- Printf function
- 自我总结ing
- Vagrant virtual machine installation, disk expansion and LAN access tutorial
- 智能数字资产管理助力企业决胜后疫情时代
猜你喜欢
js将文本转成语言播放
[spark]spark introductory practical series_ 8_ Spark_ Mllib (lower)__ Machine learning library sparkmllib practice
Source code analysis of ArrayList
You still can't remotely debug idea? Come and have a look at my article. It's easy to use
Timeout thread log for tongweb
Sentinel series introduction to service flow restriction
Building a stand-alone version of Nacos series
NVIDIA Jetson nano/xavier NX capacity expansion tutorial
零拷贝技术
微信小程序:点击事件获取当前设备信息(基础)
随机推荐
USB debugging assistant 20181018 (v1.3)
Leetcode longest harmonic subsequence simple
Service architecture diagram of Nacos series
Class conflicts caused by tongweb Enterprise Edition and embedded Edition
OpenGL Mosaic (8)
Missing tag identification in cots RFID systems: bringing the gap between theory and Practice
Sentinel series introduction to service flow restriction
ffmpeg 下载后缀为.m3u8的视频文件
MySQL stored procedure
CORS request principle
Leetcode minimum absolute difference of binary search tree simple
Shardingsphere JDBC exception: no table route info
[turn] explain awk (2)_ Combining formatted output with built-in variables to realize requirements
微信小程序:基础复习
Byte buddy print execution time and method link tracking
Leetcode- number of words in string - simple
MySQL stored procedure
Misunderstanding of tongweb due to ease of use
Cmake add -fpic option GCC
Status management --provider