option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true, // 线型曲线(平滑)
showSymbol: true, // 是否显示点
symbol: 'circle', // 点类型
symbolSize: 10, // 折线点的大小
color: 'green', // 折线点的颜色
lineStyle: {
type: 'dashed', // 线型 solid-实线 dotted-点型 dashed-虚线
width: 4, // 线的粗细
color: 'green' // 线的颜色
},
itemStyle: {
normal: {
color: 'red', // 折线点的颜色
lineStyle: { // 优先级高
type: 'dashed', // 线型 solid-实线 dotted-点型 dashed-虚线
width: 8, // 线的粗细
color: 'pink' // 折线的颜色
}
}
}
},
{
data: [720, 832, 801, 834, 1190, 1230, 1220],
type: 'line',
smooth: true,
showSymbol: false, // 是否显示点
symbolSize: 10, //设定实心点的大小
lineStyle: {
type: 'dashed', // solid-实线 dotted-点型 dashed-虚线
width: 4, // 线的粗细
color: 'blue' // 线的颜色
}
}
]
};
ECharts的基本配置-折线图的折线折点
最新推荐文章于 2024-05-29 11:15:29 发布