historian.html:13 Uncaught ReferenceError: highcharts is not definedReferenceError: highcharts is not defined
highcharts.setOptions({
Any idea what this is caused by. It was working great and all I changed were these "/home/pi/PiCentral/humidity.csv" paths. Thanks,DON |
<html><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>PiCentral - Historian</title> <script type="text/javascript" src="/webiopi.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="/home/pi/PiCentral/highcharts/js/highcharts.js"></script> <script type="text/javascript" src="/home/pi/PiCentral/highcharts/js/modules/data.js"></script> <script type="text/javascript" src="/home/pi/PiCentral/highcharts/js/date.js"></script> <script type="text/javascript">
highcharts.setOptions({ global: { timezoneOffset: 5*60 } });
$(document).ready(function() { $.get('/home/pi/PiCentral/humidity.csv', function(csv) { $('#container3').highcharts({ chart: { zoomType: 'x', panning: true, panKey: 'shift' }, credits: { enabled: false }, data: { csv: csv, endColumn: 2 }, title: { text: 'Humidity' }, xAxis: { type: 'datetime', labels: { format: '{value:%d %b %H:%M}', rotation: 30, align: 'left' }, minRange: 3600000, // one hour title: { text: 'Time' }, }, plotOptions: { series: { enableMouseTracking: false } }, yAxis: { title: { text: 'Humidity (%)' } } }); }); $.get('/home/pi/PiCentral/indoortemp.csv', function(csv) { $('#container2').highcharts({ chart: { zoomType: 'x', panning: true, panKey: 'shift' }, credits: { enabled: false }, data: { csv: csv, endColumn: 6 }, title: { text: 'Indoor Temperature' }, xAxis: { type: 'datetime', labels: { format: '{value:%d %b %H:%M}', rotation: 30, align: 'left' }, minRange: 3600000, // one hour title: { text: 'Time' }, }, plotOptions: { series: { enableMouseTracking: false } }, yAxis: { title: { text: 'Temperature (deg C)' } } }); }); $.get('/home/pi/PiCentral/outdoortemp.csv', function(csv) { $('#container1').highcharts({ chart: { zoomType: 'x', panning: true, panKey: 'shift' }, credits: { enabled: false }, data: { csv: csv, endColumn: 3 }, title: { text: 'Outdoor Temperature' }, xAxis: { type: 'datetime', labels: { format: '{value:%d %b %H:%M}', rotation: 30, align: 'left' }, minRange: 3600000, // one hour title: { text: 'Time' }, }, plotOptions: { series: { enableMouseTracking: false } }, yAxis: { title: { text: 'Temperature (deg C)' } } }); }); $.get('/home/pi/PiCentral/pressure.csv', function(csv) { $('#container4').highcharts({ chart: { zoomType: 'x', panning: true, panKey: 'shift' }, credits: { enabled: false }, data: { csv: csv, endColumn: 2 }, title: { text: 'Atmospheric Pressure' }, xAxis: { type: 'datetime', labels: { format: '{value:%d %b %H:%M}', rotation: 30, align: 'left' }, minRange: 3600000, // one hour title: { text: 'Time' }, }, plotOptions: { series: { enableMouseTracking: false } }, yAxis: { title: { text: 'Pressure (kPa)' } } }); }); $.get('/home/pi/PiCentral/windspeed.csv', function(csv) { $('#container5').highcharts({ chart: { zoomType: 'x', panning: true, panKey: 'shift' }, credits: { enabled: false }, data: { csv: csv, endColumn: 3 }, title: { text: 'Wind Speed' }, xAxis: { type: 'datetime', labels: { format: '{value:%d %b %H:%M}', rotation: 30, align: 'left' }, minRange: 3600000, // one hour title: { text: 'Time' }, }, plotOptions: { series: { enableMouseTracking: false } }, yAxis: { min: 0, title: { text: 'Speed (km/hr)' } } }); });
}); </script> </head>
<body> <br>
<div id="container1" style="min-width: 800px; height: 400px; margin: 0 auto"></div> <br> <div id="container2" style="min-width: 800px; height: 400px; margin: 0 auto"></div> <br> <div id="container3" style="min-width: 800px; height: 400px; margin: 0 auto"></div> <br> <div id="container4" style="min-width: 800px; height: 400px; margin: 0 auto"></div> <br> <div id="container5" style="min-width: 800px; height: 400px; margin: 0 auto"></div> <br> <a href="javascript:history.go(0)">Refresh</a> <br>
</body>
</html>