title
title: {
left: 'center',
text: '标题',
},
legend
data consistent with the property value to the value of the name attribute of the series
legend: {
data: ['数据'],
right: 'top'
},
Photo Download
toolbox: {
feature: {
saveAsImage: {}
}
},
X-axis
boundaryGap attribute value to false, x-axis is aligned with the grid line
name attribute value of the X axis in FIG name polyline
xAxis: {
type: "category",
boundaryGap: false,
data: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002],
name: "year",
nameLocation:'middle',
nameTextStyle:{
fontSize:14,
fontWeight: 600,
padding:10
}
},
y-axis
FIG name attribute value of the Y coordinate axis name polyline
yAxis: {
type: "value",
name: "data",
nameLocation:'middle',
nameTextStyle:{
fontSize:14,
fontWeight: 600,
padding:10
}
}
series
name attribute value to be consistent with the data of the attribute value legend
series: [
{
data: [0.809, 0.786, 0.812, 0.881, 0.685, 0.417, 0.785, 0.845, 0.739, 0.818, 0.810],
type: "line",
name:"数据"
}
]