Vega bind selection using select

vega

(Gregoire Rouet) #1

Hello, I'm getting myself used to vega-lite, and pretty much everything is do-able I guess. Only I got a problem with the selection binding. I can't seem to link color and selection here is what I did:

selection: {
        Pick: {
          type: single
          fields: ["Voie"]
          bind: {
            input: select
            options: [
              V_S012105_S013403
              V_S012110_S013404
              V_S013601_S013505
              V_S013602_S013506
            ]
          }
        }

and in the encoding part :

color: {
          condition: {
            selection: Pick
            field: _source.voie_id
            type: ordinal
            legend: {title: "Voie"}
          }
          value: grey
        }

The _source.voie_id would be the values I put in bind options

Thanks a lot!


(kulkarni) #2

HI
My team mate @nyuriks can help when he finds time.

Thanks
Rashmi