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.