Date management
You can set time bound for a pre-zoom, set the timeMode
and the timezone (UTC by default), here is some samples.
Displaying timestamps
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'timeMode' 'timestamp' } }
</discovery-tile>
</div>
Full date display
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'fullDateDisplay' true } }
</discovery-tile>
</div>
Full date and custom format
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'timeFormat' 'ddd DD MMM YY HH:mm:ss' 'fullDateDisplay' true } }
</discovery-tile>
</div>
Custom timezone
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'timeZone' 'America/Buenos_Aires' } }
</discovery-tile>
</div>
Auto timezone
In order to fit the browser timezone
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'timeZone' 'AUTO' } }
</discovery-tile>
</div>
Pre zoom on the X Axis
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="line">
1 2 <% DROP NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g %> FOR STACKTOLIST 'data' STORE
{ 'data' $data 'globalParams' { 'bounds' { 'maxDate' NOW 1 m + 'minDate' NOW 1 m - } } }
</discovery-tile>
</div>