gauge, circle, linear-gauge, compass
Name | Default |
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Params
Name | Type | Description |
maxValue | number | Max value for gauge |
Samples
Simple gauge
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="gauge" unit="°C">
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
</discovery-tile>
</div>
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
<div style="height: 500px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="gauge">
0 3 <%
'j' STORE
NEWGTS 'serie' $j TOSTRING + RENAME NOW NaN NaN NaN RAND ADDVALUE
%> FOR 4 ->LIST
<%
'gts' STORE
{
'key' $gts NAME
'value' $gts VALUES 0 GET
}
%> F LMAP 'data' STORE
{ 'data' $data 'params' [ { 'maxValue' 5 } { 'maxValue' 2 } { 'maxValue' 1 } ] }
</discovery-tile>
</div>
0 3 <%
'j' STORE
NEWGTS 'serie' $j TOSTRING + RENAME NOW NaN NaN NaN RAND 100.0 * ROUND 100.0 / ADDVALUE
%> FOR 4 ->LIST
<%
'gts' STORE
{
'key' $gts NAME
'value' $gts VALUES 0 GET
}
%> F LMAP 'data' STORE
{ 'data' $data 'params' [ { 'maxValue' 5 } { 'maxValue' 2 } { 'maxValue' 1 } ] }
Circular gauge
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="circle" unit="°C">
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
</discovery-tile>
</div>
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
Circular gauge with auto-refresh and changing color
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="circle" unit="°C"
options='{ "autoRefresh": 5 }'
>
RAND 100 * ROUND 'v' STORE
{
'data' $v
'params' [
{
'maxValue' 100
'datasetColor'
<% $v 33 < %> <% '#77BE69' %>
<% $v 66 < %> <% '#FF9830' %>
<% '#F24865' %> 2 SWITCH
}
]
}
</discovery-tile>
</div>
RAND 100 * ROUND 'v' STORE
{
'data' $v
'params' [
{
'maxValue' 100
'datasetColor'
<% $v 33 < %> <% '#77BE69' %>
<% $v 66 < %> <% '#FF9830' %>
<% '#F24865' %> 2 SWITCH
}
]
}
compass
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="compass" unit="°"
options='{ "autoRefresh": 5, "maxValue": 360 }'
>
{ 'data' RAND 360 * ROUND 'params' [ { 'datasetColor' '#DC143C' } ] }
</discovery-tile>
</div>
{ 'data' RAND 360 * ROUND 'params' [ { 'datasetColor' '#DC143C' } ] }
linear-gauge
Name | Default |
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
Name | Type | Description |
data | GTS , GTS[] , custom data | Data to display |
globalParams | Option | Global options (see above) concerning this tile |
params | Option[] | List of options (see above) concerning each displayed dataset depending of the index of this array |
events | Events[] | List of events to emit (see below) |
Options
Name | Type | Description |
gauge.horizontal | boolean | Gauge orientation |
Params
Name | Type | Description |
maxValue | number | Max value for gauge |
Samples
Simple linear gauge
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="linear-gauge" unit="°C">
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
</discovery-tile>
</div>
{ 'data' 42 'params' [ { 'maxValue' 100 } ] }
Horizontal linear gauge
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="linear-gauge" unit="°C">
{ 'data' 42 'params' [ { 'maxValue' 100 } ] 'globalParams' { 'gauge' { 'horizontal' true } } }
</discovery-tile>
</div>
{ 'data' 42 'params' [ { 'maxValue' 100 } ] 'globalParams' { 'gauge' { 'horizontal' true } } }