Duplicated bind signals and not sorting Y axes keys after event

hi im using kibana 6.4.1
and vega schema's url is 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

  "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)

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/

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'.

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

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

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

this is critical. like following case.


and in using below transform config

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

how can i fix this?

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

1 Like

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