1 使用详解
series.lineStyle.type
说明:线条类型。
默认值:'solid'。
参数类型:string。
可选值:
(1)'solid',实线。
(2)'dotted',点型虚线。
(3)'dashed',线性虚线。
2 原始效果图
3 实现代码
var option = {
title: {
text: '第一个 ECharts 实例'
},
tooltip: {},
legend: {
data:['销量']
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'line',
data: [5, 20, 36, 10, 10, 20],
itemStyle:{
normal:{
lineStyle:{
width:2,
type:'dotted' //'dotted'点型虚线 'solid'实线 'dashed'线性虚线
}
}
},
}]
};