# Vega bind selection using select

**URL:** https://discuss.elastic.co/t/vega-bind-selection-using-select/174301
**Category:** Kibana
**Tags:** vega
**Created:** [March 28, 2019, 10:13am UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301 "2019-03-28T10:13:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Gregoire\_Rouet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoire_rouet/32/42233_2.png) [@Gregoire\_Rouet](https://discuss.elastic.co/u/Gregoire_Rouet)
#### Post date: [March 28, 2019, 10:13am UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301/1 "2019-03-28T10:13:41Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [April 17, 2019, 1:43pm UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301/2 "2019-04-17T13:43:18Z")

</div>

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

Thanks  
Rashmi

---

<div class="post-metadata">

### Author: ![Gregoire\_Rouet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoire_rouet/32/42233_2.png) [@Gregoire\_Rouet](https://discuss.elastic.co/u/Gregoire_Rouet)
#### Post date: [April 25, 2019, 1:11pm UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301/3 "2019-04-25T13:11:19Z")

</div>

Hi, thanks for your answer. I have found the solution since that. Thanks a lot though!

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [April 25, 2019, 3:01pm UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301/4 "2019-04-25T15:01:12Z")

</div>

Awesome,  
It would be great if you post your answer for the benefit of others in the community.

Thanks  
Rashmi

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 23, 2019, 3:02pm UTC](https://discuss.elastic.co/t/vega-bind-selection-using-select/174301/5 "2019-05-23T15:02:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
