How to create a drilldown on dashboard for Vega-lite vis


I am trying to create drilldown from vega vis to dashboard but it doesn't work. For example, for tables, this works correctly, by clicking on the magnifying glass icon, you can select the drilldown created.

Kibana version - 7.10

Hi @Melok,

I didn't try myself, bit the description from the pr that introduced drilldowns support in Vega might be helpful:

Some tips how to test drilldows in VEGA

  • Range Event:
{
$schema: https://vega.github.io/schema/vega/v5.json
marks: [{
  type: text
  encode: { update: { text: { value: "Click here" } } }
}]
signals: [ {
  on: [{
  events: click
  update: kibanaSetTimeFilter("2019", "2020")
  }]
}]}
  • Filter Event:
{
$schema: https://vega.github.io/schema/vega/v5.json
marks: [{
  type: text
  encode: { update: { text: { value: "Click here" } } }
}]
signals: [ {
  on: [{
  events: click
  update: kibanaAddFilter({ match_phrase: { response: "200" }})
  }]
}]}

Basically drilldowns in Vega are tight to Kibana's filters and time range functionality. This is a guide how to use those in Vega: https://www.elastic.co/guide/en/kibana/master/vega-tutorial-update-kibana-filters-from-vega.html

Thanks! But I use vega-lite.
I can create such drilldown:

"transform": [{ 
       "calculate": "<some_url>", "as": "url"
    }]

...
"href": {"field": "url", "type": "ordinal"}.

But kibana added built-in drilldowns created from the dashboard. It is not clear only how it works with vega-lite vis

I'm not sure that it's possible to use Drilldowns with vega-lite. First of all because vega-lite doesn't support on expressions yet. Vega-lite is only good for simple graphs, and once they become more complicated, it makes no sense to force it into more complicated usecases. Please use vega spec instead of vega-lite.

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