Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Energieverbruik per dag</title>
- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- var options = {
- chart: {
- renderTo: 'container',
- type: 'column',
- marginRight: 130,
- marginBottom: 25
- },
- title: {
- text: 'Energieverbruik',
- x: -20 //center
- },
- subtitle: {
- text: '',
- x: -20
- },
- xAxis: {
- categories: []
- },
- yAxis: {
- title: {
- text: 'kWh / m3'
- },
- plotLines: [{
- value: 0,
- width: 1,
- color: '#808080'
- }]
- },
- tooltip: {
- formatter: function() {
- return '<b>'+ this.series.name +'</b><br/>'+
- this.y+ ' kWh / m3';
- }
- },
- legend: {
- layout: 'vertical',
- align: 'right',
- verticalAlign: 'top',
- x: -10,
- y: 100,
- borderWidth: 0
- },
- series: []
- }
- $.getJSON("data_maandgrafiek.php", function(json) {
- options.xAxis.categories = json[0]['data'];
- options.series[0] = json[1];
- options.series[1] = json[2];
- options.series[2] = json[3];
- options.series[3] = json[4];
- chart = new Highcharts.Chart(options);
- });
- });
- </script>
- <script src="http://code.highcharts.com/highcharts.js"></script>
- <script src="http://code.highcharts.com/modules/exporting.js"></script>
- </head>
- <body>
- <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement