JQuery. Highcharts. js plot bar chart pie chart Curve Graph _ jquery

Source: Internet
Author: User
This article mainly introduces jQuery. Highcharts. js's method of drawing a bar chart and a pie chart. It is very practical and can be directly used in projects. In data statistics and analysis, customers sometimes need to display the column chart, pie chart, and graph in a chart, that is to say, we can see the specific data from the bar chart, the change trend from the graph, and the proportion of each part of the data from the pie chart. Highcharts allows you to easily implement the three-in-one effect.

The Code is as follows:


Var chart;
$ (Document). ready (function (){
Chart = new Highcharts. Chart ({
Chart :{
RenderTo: 'Container ',
DefaultSeriesType: 'region'
},
Title :{
Text: 'historic and Estimated Worldwide Population Growth by region'
},
Subtitle :{
Text: 'source: Wikipedia.org'
},
XAxis :{
Categories: ['20160301', '20160301', '20160301', '20160301', '20160301', '20160301'],
TickmarkPlacement: 'on ',
Title :{
Enabled: false
}
},
YAxis :{
Title :{
Text: 'billions'
},
Labels :{
Formatter: function (){
Return this. value/1000;
}
}
},
Tooltip :{
Formatter: function (){
Return ''+
This. x + ':' + Highcharts. numberFormat (this. y, 0, ',') + 'millions ';
}
},
PlotOptions :{
Area :{
Stacking: 'normal ',
LineColor: '#666666 ',
LineWidth: 1,
Marker :{
LineWidth: 1,
LineColor: '#666666'
}
}
},
Series :[{
Name: 'asa ',
Data: [502,635,809,947,140 2, 3634,526 8]
},{
Name: 'Africa ',
Data: [106,107,111,133,221,767,176 6]
},{
Name: 'Europe ',
Data: [163,203,276,408,547,729,628]
},{
Name: 'America ',
Data: [18, 31, 54,156,339,818,120 1]
},{
Name: 'oceana ',
Data: [2, 2, 2, 6, 13, 30, 46]
}]
});
});

The above is all the content described in this article. I hope it will be helpful for you to use jQuery to draw a pie chart.

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.