Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
Highcharts Basic Bar Chart Example
Keywords : How to create basic bar chart using highcharts, Create single series basic bar chart using highcharts with example, Highcharts basic bar charts with examples
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Highcharts Basic Area Chart</title> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <script type="text/javascript"> $(function () { var chartype = { type: 'bar' } var chartitle = { text: 'Historic World Population by Region' } var chartsubtitle = { text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>' } var chartxaxis = { categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'], title: { text: null } } var chartyaxis = { min: 0, title: { text: 'Population (millions)', align: 'high' }, labels: { overflow: 'justify' } } var chartooltip = { valueSuffix: ' millions' } var chartplotoptions = { bar: { dataLabels: { enabled: true } } } var chartlegend = { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -40, y: 80, floating: true, borderWidth: 1, backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), shadow: true } var chartcredits = { enabled: false } var chartseries = [{ name: 'Year 1800', data: [107, 31, 635, 203, 2] }, { name: 'Year 1900', data: [133, 156, 947, 408, 6] }, { name: 'Year 2012', data: [1052, 954, 4250, 740, 38] }] $('#container').highcharts({ chart:chartype, title: chartitle, subtitle: chartsubtitle, xAxis:chartxaxis, yAxis: chartyaxis, tooltip: chartooltip, plotOptions: chartplotoptions, legend:chartlegend, credits:chartcredits, series: chartseries }); }); </script> </head> <body> <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> </body> </html>
Click Here to See Result
Result
Previous
Next