-
复制代码去Echarts的示例里粘贴进去即可看到效果
效果图
option = {
title: {
text: 'Stacked Line'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine'],
itemWidth: 30,
itemHeight: 30,
itemStyle: {
borderWidth:10 // 设置图例标记的边框宽度
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
name: 'Email',
type: 'line',
stack: 'Total',
data: [120, 132, 101, 134, 90, 230, 210],
symbol: "circle", // 实心圆
lineStyle:{
color: "pink",
},
itemStyle: {
color: "#fff", //实圆的背景色
borderWidth: 1,
borderColor: "pink",
},
},
{
name: 'Union Ads',
type: 'line',
stack: 'Total',
data: [220, 182, 191, 234, 290, 330, 310],
symbol: "circle", // 实心圆
lineStyle:{
color: "#DC7828",
},
itemStyle: {
color: "#fff", //实圆的背景色
borderWidth: 1,
borderColor: "#DC7828",
},
},
{
name: 'Video Ads',
type: 'line',
stack: 'Total',
data: [150, 232, 201, 154, 190, 330, 410]
}
]
};
网友评论