[3, 4],
],
type: “line”,
},
],
};
[](()折线图样式设置
[](()折线图样式
折线图中折线的样式可以通过 lineStyle
设置。可以为其指定颜色、线宽、折线类型、阴影、不透明度等等,具体的可以参考配置项手册 [series.lineStyle
](() 了解。
这里,我们以设置颜色(color)、线宽(width)和折线类型(type)为例说明。
option = {
xAxis: {
data: [“a”, “b”, “c”, “d”, “e”, “f”],
},
yAxis: {},
series: {
data: [1, 2, 3, 4, 5, 6],
type: “line”,
lineStyle: {
normal: {
color: “red”,
width: 3,
type: “dashed”,
},
},
},
};
[](()数据点样式
数据点的样式可以通过 [series.itemStyle
](() 指定填充颜色(color)