# Duplicated bind signals and not sorting Y axes keys after event

**URL:** <https://discuss.elastic.co/t/duplicated-bind-signals-and-not-sorting-y-axes-keys-after-event/161624>\
**Category:** Kibana\
**Tags:** elastic-stack-graph, vega\
**Created:** [December 20, 2018, 5:47am UTC](https://discuss.elastic.co/t/duplicated-bind-signals-and-not-sorting-y-axes-keys-after-event/161624 "2018-12-20T05:47:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teemoGod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teemogod/32/40817_2.png) [@teemoGod](https://discuss.elastic.co/u/teemoGod)\
**Post date:** [December 20, 2018, 5:47am UTC](https://discuss.elastic.co/t/duplicated-bind-signals-and-not-sorting-y-axes-keys-after-event/161624/1 "2018-12-20T05:47:22Z")

</div>

hi im using kibana 6.4.1  
and vega schema's url is [https://vega.github.io/schema/vega/v3.json](https://vega.github.io/schema/vega/v3.json).

im drawing graphs via kibana's vega visualization.

in graph, i want to add binded signal like this

```auto
  "signals" : [
    // Key Search bar
    {
      "name": "KeyQuery", "value": "",
      "on": [
        {
          "events": "@keyFilterButton:click!",
          "update": "datum.keys.key"
        },
        {
          "events": "dblclick",
          "update": "''"
        }
      ],
      "bind": {
        "input": "text",
        "placeholder": "search key",
        "autocomplete": "off"
      }
    },
    
    // Caller Search bar
    {
      "name": "CallerQuery", "value": "",
      "on": [
        {
          "events": "@callerFilterButton:click!",
          "update": "datum.caller.key"
        },
        {
          "events": "dblclick",
          "update": "''"
        }
      ],
      "bind": {
        "input": "text",
        "placeholder": "search caller",
        "autocomplete": "off"
      }
    }
  ]

```

in graph, i have to using 2 Search bars.

the problem is, search bar in screen is duplicated.  
and when i clicked both '@callerFilterbutton' and '@keyFilterButton', the button's values(datum.key, datum.keys.key) are not injected in this this duplicated bar.

but another one's value is injected like this. (click please)

 ![duplicated](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c44b3b1d9f9a44ce72d8bf75e5bc72296c89abb.jpeg)

i clicked '@keyFilterButton', and it's value(datum.keys.key) is 'db'.  
as you see, one search bar's value was injected but another one is not.

above 2 search bars are working when i clicked '@keyFilterButton' and when i typing (like 'db')  
below 2 search bars are not injected values when i clicked '@keyFilterButton', but it is working when i typing (like 'db')

is this the bug? or my configuration miss?

im referencing this example [https://vega.github.io/vega/examples/job-voyager/](https://vega.github.io/vega/examples/job-voyager/)

there are same problems in Dashboard, in visualize menu.

and i found another problem.

as you can see,  
my @keyFilterButton, @callerFilterButton buttons' events are defined with 'click' and 'dbclick' both.

in key search bar,  
when i click @keyFilterButton, search bar's value will be replaced with 'datum.keys.key.  
and when i double click @keyFillterbutton, search bar's value will be replaced with ''.  
this is working well.

but, Y axes keys are not sorting like this.  
first, i didn't clicked any keyFilterbuttons. so, Y axes keys will sorted by alphabetical.  
in this case, first key is 'curl', second key is 'db' and third key is 'mcache'.

 ![no%20input](https://us1.discourse-cdn.com/elastic/original/3X/6/2/62593c2a21820283cd66a4265c117222ff506883.jpeg)

i clicked 'db' keyFilterbutton. so, graph showing only one Key.

 ![filtered](https://us1.discourse-cdn.com/elastic/original/3X/5/f/5f0172b8e123c95d6671bf47aec3af982762e3a9.jpeg)

and then i double clicked graph, so graph showing whole keys.  
but Y axes keys are not sorted by alphabetical.

 ![dbclick](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dcb90713543d582f3e8e58b4c1a3786d8d4ab2f0.jpeg)

and then, when i typed ' ' (space bar) and delete, graph showing whole keys sorted by alphabetical.

this is critical. like following case.

 ![caller_not_filtered](https://us1.discourse-cdn.com/elastic/original/3X/c/d/cd0c6a8075f0e945ecaa849e25645b4214be18af.jpeg)  
 ![caller_after_filtered](https://us1.discourse-cdn.com/elastic/original/3X/8/4/84ffd78a0748248be9fc38158f2655e9cae7c4b1.jpeg)

and in using below transform config

```auto
      "transform": [
        ...,
        {
          "type": "filter",
          "expr": "(!KeyQuery || test(regexp(KeyQuery,'i'), datum.keys.key))"
        },
        {
          "type": "collect",
          "sort": {"field": "keys.key"}
        }
      ]

```

how can i fix this?

---

<div class="post-metadata">

**Author:** ![nyuriks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nyuriks/32/26171_2.png) [@nyuriks](https://discuss.elastic.co/u/nyuriks)\
**Post date:** [January 10, 2019, 5:38pm UTC](https://discuss.elastic.co/t/duplicated-bind-signals-and-not-sorting-y-axes-keys-after-event/161624/2 "2019-01-10T17:38:49Z")

</div>

I think this is a known bug - [https://github.com/elastic/kibana/issues/23514](https://github.com/elastic/kibana/issues/23514) .

---

<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:** [February 7, 2019, 5:50pm UTC](https://discuss.elastic.co/t/duplicated-bind-signals-and-not-sorting-y-axes-keys-after-event/161624/3 "2019-02-07T17:50:31Z")

</div>

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