[Use Only] Use highcharts and highstock for graph Creation

Source: Internet
Author: User
Highcharts is a JS drawing component that is relatively mature and compatible in the industry. Its implementation is based on native Js. It adopts VML implementation in IE and SVG implementation in other browsers. The most important thing is that it is open source; Currently, it supports line, spline, area, area and line, column chart, bar chart, pie chart, and scatter chart types. Official Website: http://www.highcharts.com contains the source code, demo, API   I. first look at some achievable figures Omitted Ii. usage (for basic render, refer to the API on the official website) 1. Remove some common elements. //Unified ConfigurationHighcharts. setoptions ({
 
Global: {useutc:False // time zone settings}, Credits: {enabled:False // remove the flag in the lower right corner}, Animation: {enabled:False // remove Animation}, Exporting: {enabled:False // remove}});

2. dynamically add series

 
Chart =Chartcontainer [chartid]; _. Each (item. series,Function(I) {chart. addseries (I,False); // The second parameter to prevent re-painting}); Chart. redraw (); // All are added and re-painted.


3. dynamically remove Series

Serieslist =Chart. Series; // chart objectFor(VaRI = serieslist. Length-1; I> = 0; I --){If(Serieslist [I]. Name =N) {// You can also use the ID to retrieve serieslist [I]. Remove (False);}}
 
 
 
Chart. redraw (); // All are added and re-painted.

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.