var temp = [22.2,21.8,21,20.3,19.9,19.3,19.3,18.6,18.4,18.4,18.3,19.6,18.9];
var temptime = ['19.45','20.15','20.45','21.15','21.45','22.15','22.45','23.15','23.45','00.15','00.45','01.15','01.45'];
var rain = [0,0,0,0,0,0,0,0,0,0,0,0,0];
var raintime = ['19.45','20.15','20.45','21.15','21.45','22.15','22.45','23.15','23.45','00.15','00.45','01.15','01.45'];
var wind = [8,7,3,5,5,3,5,10,12,11,11,10,10];
var windtime = ['23.45','23.55','00.05','00.15','00.25','00.35','00.45','00.55','01.05','01.15','01.25','01.35','01.45'];
var solar = [856,455,250,174,382,36,29,10,0,0,0,0,0];
var solartime = ['13.45','14.45','15.45','16.45','17.45','18.45','19.45','20.45','21.45','22.45','23.45','00.45','01.45'];
var baro = [1018.1,1017.7,1017.6,1017.6,1017.5,1017.9,1018,1018.4,1018.6,1018.8,1018.9,1018.7,1018.4];
var barotime = ['13.45','14.45','15.45','16.45','17.45','18.45','19.45','20.45','21.45','22.45','23.45','00.45','01.45'];
$(function() {
$('.windd').sparkline([340,20], {
type: 'pie',
sliceColors: ['#5B7102','#ffffff'],
offset: 118,
chartRangeMin: 0,
chartRangeMax: 360,
borderWidth: 1,
borderColor: '#ffffff',
tooltipClassname: 'spark',
tooltipPrefix:'Bearing: 198',
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 });
});