Echart Line Chart Trivia

Source: Internet
Author: User
Tags polyline

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.