1) in the line chart, sometimes we do not want to let too many polyline display, then hide, click Legend Area text and then display.
For example, we want to hide the line called "affiliate ADS", the code is as follows
1 var selected = {}; 2 false ; 3 option.legend.selected = selected; 4
There's still data about it in the series.
1 series: [2 {3Name: ' Email marketing ',4Type: ' line ',5Stack: ' Total ',6DATA:[120, 132, 101, 134, 90, 230, 210]7 },8 {9Name: ' Affiliate ADS ',TenType: ' line ', OneStack: ' Total ', Adata:[220, 182, 191, 234, 290, 330, 310] - } - ] the};
This way, when we click, the polyline is displayed.
2) is the line axis too coarse and not thin enough? The color is not good to see?
So, you can change that.
1 Xaxis: [2 {3 axisline:{4 linestyle:{5Color: ' #999 ',6Width:1,7 }8 }9 Ten } One],
The y-axis is the same.
3) Separation Line Color setting
1 splitline:{2 linestyle:{3 color: ' #fff '4 } 5 }
4) Add data
1 Option.series.push ({2 name: ' New People ', 3 type: ' line ', 4 stack: ' Total ', 5 data:[20, 18, 10, 5, 5, 5, 7, 20, 44, 80, 34, 33, 35, 60,20, (+, +, 60,50,45,24]6 });
Echart Line Chart Trivia