Rtholl
22 October 2019 14:56
1
Hey guys,
Is there a way to feed the ui dashboard slider node an integer for the maximum value? My idea is to take the length of an array and feed this as the maximum of the slider node. Something like:
"msg.ui_slider.max = array.length;"
and this would dynamically control the slider node's maximum value.
1 Like
Yes indeedy...
## UI Widget configuration via msg.ui_control
The following configuration properties of ui widget nodes can be set by using a `msg.ui_control` property on a msg.
Multiple properties of the node can be set at the same time. For example you can use a change
node to set msg.ui_control to JSON `{ "min":10, "max":50 }`
**Note**: It is still recommended that nodes are configured via the editor in order to preset the default values.
|widget |property |type | notes / example
|--- |--- |--- |---
|ui_button |color |string | not needed
| |bgcolor |string | not needed
| |icon |string | on refresh
| |format |string | not needed
| |tooltip |string | on refresh
|ui_chart |look |string |"line","bar","horizontalBar","pie","polar-area","radar"
| |legend |boolean |
| |interpolate |string |"linear","step","bezier"
| |nodata |string |
This file has been truncated. show original
3 Likes
Rtholl
22 October 2019 17:26
3
Thanks, this worked perfectly!
I didn't find any option to tag this post as "solved" or "completed" but it is
1 Like
Sorry but I don't exactly understand how use.. it's possible put an example?