help
Posted: Sun 04 Feb 2018 9:49 pm
hey i dont understand how lto to set the time on them <#RecentTS <#RecentOutsideTemp
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
... giving data values from 1 minute ago, up to 1 week ago, in 1 minute intervals.
...
For example, <#RecentOutsideTemp m=1> will give the temperature one minute ago, <#RecentOutsideTemp h=1> will give the temperature one hour ago (as will <#RecentOutsideTemp m=60>), and <#RecentOutsideTemp d=1> will give the temperature one day ago. <#RecentOutsideTemp d=1 h=1 m=1> will give the temperature one day, one hour and one minute ago. All values supplied for parameters must be whole numbers.
Code: Select all
/* <![CDATA[ */
$(function() {
/* temperature sparkline() function */
var recent_outside_temp = [5.8,5.7,5.7,5.7,
5.7,5.7,5.6,5.6,
5.6,5.6,5.6,5.6];
$('.temperature').sparkline(recent_outside_temp, {
type: "line",
tooltipSuffix: " °C",
width: 60,
tooltipChartTitle: 'Temperatures in the period<br/>12:32 to 01:27'
});
// Insert a second/subsequent sparkline function here
});
/* ]]> */
As Mark says, is the Wiki not clear enough?dazza1223 wrote:Is there a way to show the actual time of each recent data point?
<#RecentTS> Takes parameters like the 'recent data' web tags (e.g. <#RecentOutsideTemp>) and gives the timestamp of the data that will be returned for those web tags with the supplied parameters (it may not have the data for the exact time specified). Format can be specified in the usual way with the 'format' parameter.
Code: Select all
<!-- Temp -->
var temp = [2.1,1.8,1.3,1.2,1.5,2,2,2.2,2,2,2.2,2.5,2.3];
var temptime = ['05.15','05.45','06.15','06.45','07.15','07.45','08.15','08.45','09.15','09.45','10.15','10.45','11.15'];
Code: Select all
$(function() {
$('.temp').sparkline(temptime, {
type: 'line',
lineColor: '#bed8bf',
fillColor: '#bed8bf',
spotColor: '#bed8bf',
minSpotColor: '#bed8bf',
maxSpotColor: '#bed8bf',
numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));},
width: 60,
tooltipClassname: 'spark',
tooltipPrefix: 'Time: ',
tooltipFormat:'<span style="color: {{color}}"></span> {{prefix}}{{y}}{{suffix}}',
tooltipChartTitle: 'Temperature Today.'
});
$('.temp').sparkline(temp, {
composite: true,
type: 'line',
lineColor: '#008000',
fillColor: '#bed8bf',
spotColor: '#00007f',
minSpotColor: '#007fff',
maxSpotColor: '#ff0000',
tooltipClassname: 'spark',
tooltipFormat:'<span style="color: {{color}}"></span>{{prefix}}{{y}}{{suffix}}',
tooltipPrefix: 'Temp: ',
tooltipSuffix: " °C",
width: 60
});
});
Code: Select all
$temp0 ="<#RecentOutsideTemp h=0 m=0>";
$temptime0 ="<#RecentTS h=0 m=0 format=HH.mm>";
$temp1 ="<#RecentOutsideTemp h=0 m=30>";
$temptime1 ="<#RecentTS m=30 format=HH.mm>";
$temp2 ="<#RecentOutsideTemp h=1>";
$temptime2 ="<#RecentTS h=1 format=HH.mm>";
$temp3 ="<#RecentOutsideTemp h=1 m=30>";
$temptime3 ="<#RecentTS h=1 m=30 format=HH.mm>";
$temp4 ="<#RecentOutsideTemp h=2>";
$temptime4 ="<#RecentTS h=2 format=HH.mm>";
$temp5 ="<#RecentOutsideTemp h=2 m=30>";
$temptime5 ="<#RecentTS h=2 m=30 format=HH.mm>";