ECharts experience & lt;/title>
<style>
The box {
width: 100%;
Height: 800 px;
}
</style>
<script SRC="https://bbs.csdn.net/topics/js/echarts.min.js" & gt; </script>
<body>
<script>
//3. Initialization echarts instance objects
Var myChart=echarts. Init (document. QuerySelector (" box "));
//4. Specify the configuration items and data
Var option={
Tooltip: {
The trigger: "axis"
},
XAxis: [
{
Type: "category",
Data: [" 2016 ", "2017", "2018", "2019"]
//boundaryGap: 0
}
],
YAxis: [
{
Type: "value"
}
],
Series: [
{
Name: "Ⅳ ~ Ⅴ class,"
Type: "line",
SymbolOffset: [" 60 ", 0],
Data: [6.3, 16, 31.1, 42.7],
Graphics.linestyle: {
Normal: {
Width: 0,
Color: {
Type: "linear",
ColorStops: [
{
Offset: 0,
Color: "# efefef"//0% color
},
{
Offset: 1,
Color: "# efefef"//100% color
}
],
GlobalCoord: false//default is false
},
ShadowColor: "rgba (72216191, 0.3),"
ShadowBlur: 10,
ShadowOffsetY: 20
}
},
//circle
ItemStyle: {
Normal: {
Color: # 3 fa7dc,
BorderWidth: 40,
/* shadowColor: 'rgba (72216191, 0.3),
ShadowBlur: 100, */
BorderColor: "# 3 fa7dc
"}
},
Smooth: true
},
{
SymbolOffset: [60, 0],
Name: "Ⅳ ~ Ⅴ class,"
Type: "line",
Data: [8, 12, 40, 25],
Graphics.linestyle: {
Normal: {
Width: 0,
Color: {
Type: "linear",
ColorStops: [
{
Offset: 0,
Color: "# efefef"//0% color
},
{
Offset: 1,
Color: "# efefef"//100% color
}
],
GlobalCoord: false//default is false
},
ShadowColor: "rgba (72216191, 0.3),"
ShadowBlur: 10,
ShadowOffsetY: 20
}
},
//circle
ItemStyle: {
Normal: {
Color: # 3 fa7dc,
BorderWidth: 40,
/* shadowColor: 'rgba (72216191, 0.3),
ShadowBlur: 100, */
BorderColor: "# 3 fa7dc
"}
},
Smooth: true
}
//circle line
//{
//name: "the trend line parallel to the y axis",
//the type: "line",
//markLine: {
//symbol: "none",//remove the arrow
//the name: "aa",
//graphics.linestyle: {
//width: 2,
//the type: "solid"//"dotted" dotted lines' solid 'solid lines
//},
//data: [
///
//{
//coord: [" 2018 ", 25]//line began to coordinate y
//},
//{
//coord: [" 2018 ", 35]//end of line y coordinates
//}//how to obtain the grid upper maximum, is currently the write die
//]
//]
//}
//},
//circle line
//{
//name: "parallel to the y axis trend line 1",
//the type: "line",
//symbolOffset: [to 60, 0],
//markLine: {
//symbol: "none",//remove the arrow
//the name: "aa",
//graphics.linestyle: {
//width: 2,
//the type: "solid"//"dotted" dotted lines' solid 'solid lines
//},
//data: [
///
//{
//coord: [" 2016 ", 5]//line began to coordinate y
//},
//{
//coord: [" 2016 ", 12]//end of line y coordinates
//}//how to obtain the grid upper maximum, is currently the write die
//]
//],
//symbolOffset: [to 60, 0]
//}
//}
]
};
//5. Set the configuration items and data (option) for instance objects (myChart)
myChart.setOption(option);
</script>