Dynamic values in a Vega Dropdown

  Kiến thức lập trình

I’m trying to build a custom dropdown in Vega – Writing plain JSON code in Kibana via Custom Visualization and not using any programming for Vega such as VegaJS

The default Vega dropdown supports a static list using an options key.
Ref: https://vega.github.io/vega/docs/signals/#:~:text=Description-,options,-Array

{ "name": "Choose", "value": "A", "bind": {"input": "select", "options": ["A", "B", "C"]} }

Can we use customize this list to set this value based on datasource ? Ex: datum.<some_variable>

PS: There was a discussion happened for the same in the Google group https://groups.google.com/g/vega-js/c/U58eEOv618U – The last comment in that chat and there’s no update to it

Tried datum.<some_variable> and did not worked

LEAVE A COMMENT