Forum Discussion
Deneb - Vega Lite - Format Slider Parameter
Hi,
I have gone throught he vega -lite documentation but its not to clear, can you format a slider thats created from a parameter like the below:
"params": [
{
"name": "Data_Label_Size",
"value": 11,
"bind": {"input": "range", "min": 6, "max": 16, "step": 1}
}
]
Are you able to format:
a) Can the name of the slider include spaces when multiple words?
b) The color & font size of the name of the slider?
Thanks in advance.
Hey DW868990. You can change the label of the slider by updating the "name" in the bind property.
{ "$schema": "https://vega.github.io/schema/vega/v5.json", "background": "white", "padding": 5, "data": [], "signals": [ { "name": "Data_Label_Size", "react": true, "value": 11, "bind": {"input": "range", "min": 6, "max": 16, "step": 1, "name": "Data Label Size"} } ], "marks": [] }
As for adjusting the look and feel, I do not believe this can be done directly in vega/vega-lite (not 100% certain). I think the intention was to have the application containing the visual be responsible for all input formatting. You can see that Deneb has done some of this formatting by comparing your screenshot to the mine that was created in the vega-lite editor. It'd be nice to make this, and other input formatting properties, customizable. I have created a feature request with dm-p (the creator of Deneb) for this.
2 Replies
- giammariam
Solution Sage
Hey DW868990. You can change the label of the slider by updating the "name" in the bind property.
{ "$schema": "https://vega.github.io/schema/vega/v5.json", "background": "white", "padding": 5, "data": [], "signals": [ { "name": "Data_Label_Size", "react": true, "value": 11, "bind": {"input": "range", "min": 6, "max": 16, "step": 1, "name": "Data Label Size"} } ], "marks": [] }
As for adjusting the look and feel, I do not believe this can be done directly in vega/vega-lite (not 100% certain). I think the intention was to have the application containing the visual be responsible for all input formatting. You can see that Deneb has done some of this formatting by comparing your screenshot to the mine that was created in the vega-lite editor. It'd be nice to make this, and other input formatting properties, customizable. I have created a feature request with dm-p (the creator of Deneb) for this.- DW868990
Helper IV
Fantastic, thank you and thanks for raising the feature request.