var temp = [21,22,23.7,24.9,25.3,25.6,26.2,26.5,27,26,24.6,25.9,24.5]; var temptime = ['09.30','10.00','10.30','11.00','11.30','12.00','12.30','13.00','13.30','14.00','14.30','15.00','15.30']; var rain = [0,0,0,0,0,0,0,0,0,0,0,0,0]; var raintime = ['09.30','10.00','10.30','11.00','11.30','12.00','12.30','13.00','13.30','14.00','14.30','15.00','15.30']; var wind = [15,17,14,16,14,17,14,12,15,15,18,15,14]; var windtime = ['13.30','13.40','13.50','14.00','14.10','14.20','14.30','14.40','14.50','15.00','15.18','15.20','15.30']; var solar = [0,0,0,18,121,232,345,469,573,515,515,327,248]; var solartime = ['03.30','04.30','05.30','06.30','07.30','08.30','09.30','10.30','11.30','12.30','13.30','14.30','15.30']; var baro = [1013.5,1013,1012.5,1012.2,1011.8,1011.5,1011.5,1011.4,1010.6,1009.8,1009.1,1008.8,1008.1]; var barotime = ['03.30','04.30','05.30','06.30','07.30','08.30','09.30','10.30','11.30','12.30','13.30','14.30','15.30']; $(function() { $('.windd').sparkline([340,20], { type: 'pie', sliceColors: ['#5B7102','#ffffff'], offset: 66, chartRangeMin: 0, chartRangeMax: 360, borderWidth: 1, borderColor: '#ffffff', tooltipClassname: 'spark', tooltipPrefix:'Bearing: 146', tooltipSuffix: '°', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Avg. Wind Dir.' + '
' + ' Last 3 hours' }); }); $(function() { $('.temp').sparkline(temptime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipPrefix: 'Time: ', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Temperature Today.' }); $('.temp').sparkline(temp, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Temp: ', tooltipSuffix: " °C", width: 60, height:16 }); }); $(function() { $('.wind').sparkline(windtime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Wind Speed Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.wind').sparkline(wind, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Wind: ', tooltipSuffix: " kts", width: 60, height:16 }); }); $(function() { $('.rain').sparkline(raintime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipPrefix: 'Time: ', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipChartTitle: 'Rainfall Today.' }); $('.rain').sparkline(rain, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Rain: ', tooltipSuffix: " mm", width: 60, height:16 }); }); $(function() { $('.solar').sparkline(solartime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Solar Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.solar').sparkline(solar, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Sun: ', tooltipSuffix: " w/m²", width: 60, height:16 }); }); $(function() { $('.baro').sparkline(barotime, { type: 'line', lineColor: '#5B7102', fillColor: '#5B7102', spotColor: '#5B7102', minSpotColor: '#5B7102', maxSpotColor: '#5B7102', numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));}, width: 60, height:16, tooltipClassname: 'spark', tooltipChartTitle: 'Barometer Today.', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Time: ' }); $('.baro').sparkline(baro, { composite: true, type: 'line', lineColor: '#ffffff', fillColor: '#5B7102', spotColor: '#ffffff', minSpotColor: '#55a9fd', maxSpotColor: '#f23434', numberDigitGroupCount: 6, tooltipClassname: 'spark', tooltipFormat:'{{prefix}}{{y}}{{suffix}}', tooltipPrefix: 'Baro: ', tooltipSuffix: " mb", width: 60, height:16 }); });