1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Highcharts Example</title>
- <style type="text/css">
- </style>
- </head>
- <body>
- <script src="../../code/highcharts.js"></script>
- <script src="../../code/modules/exporting.js"></script>
- <script src="../../code/modules/export-data.js"></script>
- <div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
- <script type="text/javascript">
- Highcharts.chart('container', {
- chart: {
- type: 'bar'
- },
- title: {
- text: 'Historic World Population by Region'
- },
- subtitle: {
- text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>'
- },
- xAxis: {
- categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
- title: {
- text: null
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: 'Population (millions)',
- align: 'high'
- },
- labels: {
- overflow: 'justify'
- }
- },
- tooltip: {
- valueSuffix: ' millions'
- },
- plotOptions: {
- bar: {
- dataLabels: {
- enabled: true
- }
- }
- },
- legend: {
- layout: 'vertical',
- align: 'right',
- verticalAlign: 'top',
- x: -40,
- y: 80,
- floating: true,
- borderWidth: 1,
- backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
- shadow: true
- },
- credits: {
- enabled: false
- },
- series: [{
- name: 'Year 1800',
- data: [107, 31, 635, 203, 2]
- }, {
- name: 'Year 1900',
- data: [133, 156, 947, 408, 6]
- }, {
- name: 'Year 2000',
- data: [814, 841, 3714, 727, 31]
- }, {
- name: 'Year 2016',
- data: [1216, 1001, 4436, 738, 40]
- }]
- });
- </script>
- </body>
- </html>
|