bar-polar
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="bar-polar">
...
</discovery-tile>
{
'type' 'bar-polar'
...
'macro' <% %>
}
Name | Default |
---|---|
--warp-view-chart-label-color | #8e8e8e |
--warp-view-chart-grid-color | #8e8e8e |
--warp-view-bar-bg-color | #b4b4b440 |
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) |
Supported option per series are:
- datasetColor: Hex CSS color of the series. ie: '#fff00f'
- key: Name the series
- bar
- stacked
- startAngle: 0 by default (at right), at top for custom data
Custom data
{
'title' 'Test'
'columns' [ 'A' 'B' 'C' 'D' ]
'rows' [
[ 'label X' 15 56 44 22 ]
[ 'label Y' 1 5 4 2 ]
[ 'label Z' 14 45 78 12 ]
]
} 'values' STORE
{
'data' $values
}
Samples
Simple bar-polar chart
NOW 'now' STORE
1 4 <%
NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $now $ts STU * - NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g
%> F FOR
Stacked bar-polar chart
NOW 'now' STORE
1 4 <%
NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $now $ts STU * - NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g
%> F FOR STACKTOLIST 'values' STORE
{
'data' $values
'globalParams' {
'bar' { 'stacked' true }
}
}
Custom data bar-polar chart
{
'title' 'Test'
'columns' [ 'A' 'B' 'C' 'D' ]
'rows' [
[ 'label X' 15 56 44 22 ]
[ 'label Y' 1 5 4 2 ]
[ 'label Z' 14 45 78 12 ]
]
} 'values' STORE
{
'data' $values
}
Wind Rose
{
'title' 'Wind rose'
'columns' [ 'N' '' 'E' '' 'S' '' 'W' '' ]
'rows' [ '0.0-0.2 m/s' '0.3-1.5 m/s' '1.6-3.3 m/s' '3.5-5.4 m/s' '5.5-7.9 m/s' '8.0-10.7 m/s' '10.8-13.8 m/s' '13.9-17.1 m/s' ] <% [ SWAP 1 8 <% DROP RAND 10 * ROUND %> FOR ] %> F LMAP
}
'values' STORE
{
'data' $values
'globalParams' { 'bar' { 'stacked' true } 'showLegend' T }
}
Mixed polar chart
NOW 'now' STORE
1 4 <%
NEWGTS 'g' STORE
1 10 <% 'ts' STORE $g $now $ts STU * - NaN NaN NaN RAND ADDVALUE DROP %> FOR
$g
%> F FOR STACKTOLIST 'values' STORE
{
'data' $values
'globalParams' {
'bar' { 'stacked' true 'fillGap' true }
}
'params' [
{ 'datasetColor' 'red' 'type' 'line' }
{ 'datasetColor' 'purple' 'type' 'area' }
]
}
Custom data with a circular bar-polar chart
{
'title' 'Test'
'columns' [ 'A' 'B' 'C' 'D' ]
'rows' [
[ 'label X' 15 56 44 22 ]
[ 'label Y' 1 5 4 2 ]
[ 'label Z' 14 45 78 12 ]
]
} 'values' STORE
{
'data' $values
'globalParams' {
'bar' {
'circular' true
}
}
}
Circular bar-polar chart with some options
{
'title' 'Test'
'columns' [ 'A' 'B' 'C' 'D' ]
'rows' [
[ 'label X' 15 56 44 22 ]
[ 'label Y' 1 5 4 2 ]
[ 'label Z' 14 45 78 12 ]
]
} 'values' STORE
{
'data' $values
'globalParams' {
'bgColor' '#404040'
'fontColor' '#ffffff'
'scheme' 'CTHULHU'
'bar' {
'circular' true
'rounded' true
'track' true
'trackColor' '#77BE6933'
}
}
}
Found an issue on this page or something missing?
Tell us on
The Lounge, the Warp 10 Community Slack.