Rumah > Soal Jawab > teks badan
已经试过了两种方法
通过设置两个折线图
series: [{
name: '月销售总额',
type: 'line',
stack: '总额',
symbol: "circle",
symbolSize: 10,
smooth: false,
/*lineStyle: {
normal: {
type: 'dashed'
}
},*/
itemStyle: {
normal: {
color: '#f77440',
label: {
show: true,
formatter: '{c}万',
textStyle: {
color: '#6E6E6E',
fontWeight: 'bold'
}
}
}
},
data: [moneys[0],
moneys[1],
moneys[2],
moneys[3], '-'
]
}, {
name: '月销售总额',
type: 'line',
stack: '总额',
symbol: "circle",
symbolSize: 10,
smooth: false,
lineStyle: {
normal: {
width: 2,
color: '#f77440',
type: 'dashed'
}
},
itemStyle: {
normal: {
color: '#f77440',
label: {
show: true,
formatter: '{c}万',
textStyle: {
color: '#6E6E6E',
fontWeight: 'bold'
}
}
}
},
data: ['-',
'-',
'-',
'-', moneys[4]
]
}]
series: [{
name: '月销售总额',
type: 'line',
stack: '总额',
symbol: "circle",
symbolSize: 10,
smooth: false,
/*lineStyle: {
normal: {
type: 'dashed'
}
},*/
itemStyle: {
normal: {
color: '#f77440',
label: {
show: true,
formatter: '{c}万',
textStyle: {
color: '#6E6E6E',
fontWeight: 'bold'
}
}
}
},
data: [moneys[0],
moneys[1],
moneys[2],
moneys[3], {
value: moneys[4],
itemStyle: {
normal: {
borderType: 'dashed'
}
},
lineStyle: {
normal: {
type: 'dashed'
}
}
}
]
}
]
都是无法实现最后一段是折线。。
天蓬老师2017-04-11 11:58:39
参考这个
series: [{
name: '月销售总额',
type: 'line',
stack: '总额',
symbol: "circle",
symbolSize: 10,
smooth: false,
/*lineStyle: {
normal: {
type: 'dashed'
}
},*/
itemStyle: {
normal: {
color: '#f77440',
label: {
show: true,
formatter: '{c}万',
textStyle: {
color: '#6E6E6E',
fontWeight: 'bold'
}
}
}
},
data: [moneys[0],
moneys[1],
moneys[2],
moneys[3]
]
}, {
name: '月销售总额',
type: 'line',
stack: '总额',
symbol: "circle",
symbolSize: 10,
smooth: false,
lineStyle: {
normal: {
width: 2,
color: '#f77440',
type: 'dashed'
}
},
itemStyle: {
normal: {
color: '#f77440',
label: {
show: true,
formatter: '{c}万',
textStyle: {
color: '#6E6E6E',
fontWeight: 'bold'
}
}
}
},
data: [,
,
,
, moneys[4]
]
}]