var temp = [15.4,15.5,15.4,14.1,13.9,14.1,13.3,13.5,13.2,13.1,12.8,12.6,12.4]; var temptime = ['13.40','14.10','14.40','15.10','15.40','16.10','16.40','17.10','17.40','18.10','18.40','19.10','19.40']; var rain = [0,0,0,0.7,0.7,1.5,2,2,2,2,2.2,2.2,2.2]; var raintime = ['13.40','14.10','14.40','15.10','15.40','16.10','16.40','17.10','17.40','18.10','18.40','19.10','19.40']; var wind = [9,7,6,7,8,6,5,4,4,4,4,3,4]; var windtime = ['17.40','17.50','18.00','18.10','18.20','18.30','18.40','18.50','19.00','19.10','19.20','19.30','19.40']; var solar = [25,172,330,615,220,243,218,144,81,134,46,25,0]; var solartime = ['07.40','08.40','09.40','10.40','11.40','12.40','13.40','14.40','15.40','16.40','17.40','18.40','19.40']; var baro = [1003.3,1003.7,1004.4,1004.7,1004.9,1005.7,1006.2,1006.7,1007.7,1008.1,1008.6,1009.1,1009.7]; var barotime = ['07.40','08.40','09.40','10.40','11.40','12.40','13.40','14.40','15.40','16.40','17.40','18.40','19.40']; $(function() { $('.windd').sparkline([340,20], { type: 'pie', sliceColors: ['#5B7102','#ffffff'], offset: 190, chartRangeMin: 0, chartRangeMax: 360, borderWidth: 1, borderColor: '#ffffff', tooltipClassname: 'spark', tooltipPrefix:'Bearing: 270', 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 }); });