当前位置:网站首页>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'
}
}
}
]
};
边栏推荐
- Leetcode- third largest number - simple
- Leetcode- divide candy - simple
- Essays on November 5, 2021
- [spark]spark introductory practical series_ 8_ Spark_ Mllib (upper)__ Introduction to machine learning and sparkmllib
- USB 0xc0000011 error
- 1+1>2,Share Creators可以帮助您实现
- Find out the missing numbers from the natural numbers arranged in order from 0 to 100, and the solution provides
- Pod libwebp error reporting solution
- 中断处理过程
- js-bom
猜你喜欢
Shardingsphere JDBC < bind table > avoid join Cartesian product
SPI primary key generation strategy for shardingsphere JDBC
[compilation and assembly link] coff file and structure description
[spark]spark introductory practical series_ 8_ Spark_ Mllib (upper)__ Introduction to machine learning and sparkmllib
自我总结ing
软件测试——接口常见问题汇总
AUTOSAR实战教程pdf版
微信小程序:点击事件获取当前设备信息(基础)
php 分布式事务 原理详解
Nacos series registry principle and source code analysis
随机推荐
Application virtual directory static resource configuration on tongweb
USB debugging assistant 20181018 (v1.3)
The problem of distinguishing and sharing sessions for multiple applications in tongweb
【DP之01背包】
The technical analysis of ERP systems of the two camps in the world has been picked up many times.
NVIDIA Jetson nano/xavier NX capacity expansion tutorial
Leetcode minimum absolute difference of binary search tree simple
ffmpeg 下载后缀为.m3u8的视频文件
Leetcode- intersection of two arrays ii- simple
Essays on November 5, 2021
Lamda expression
微信小程序:全局状态变量的使用
[spark]spark introductory practical series_ 8_ Spark_ Mllib (lower)__ Machine learning library sparkmllib practice
Leetcode- find all missing numbers in the array - simple
Printf function
Tongweb customs clearance guidelines
Complete USB debugging assistant
Working principle of sentinel series (concept)
Leetcode- longest continuous increasing sequence - simple
AUTOSAR实战教程pdf版