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 Inverted Axes Chart Example
Keywords : How to invert axes in area chart using highcharts, Area chart with inverted axes using highcharts, Invert axes of area chart using highcharts with example
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Highcharts Inverted axes 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: 'area', inverted: true } var chartitle = { text: 'Average fruit consumption during one week' } var chartsubtitle = { style: { position: 'absolute', right: '0px', bottom: '10px' } } var chartlegend = { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -150, y: 100, floating: true, borderWidth: 1, backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF' } var chartxaxis = { categories: [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ] } var chartyaxis = { title: { text: 'Number of units' }, labels: { formatter: function () { return this.value; } }, min: 0 } var chartplotoptions = { area: { fillOpacity: 0.5 } } var chartseries = [{ name: 'John', data: [3, 4, 3, 5, 4, 10, 12] }, { name: 'Jane', data: [1, 3, 4, 3, 3, 5, 4] }] $('#container').highcharts({ chart:chartype, title: chartitle, subtitle: chartsubtitle, legend:chartlegend, xAxis:chartxaxis, yAxis: chartyaxis, plotOptions: chartplotoptions, 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