Vega Tooltip Question


(Alumino) #1

Hi

I am working on some visualizations using Vega-lite syntax. At the moment everything is working with graphic elements, like bars, lines, etc. The only problem is that tooltips are not working.
Here is an example visualization that does not show the specified tooltip:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "title": "Event counts from all indexes",
  "data": {
    "url": {
      "index": "ivr-mx-2018",
      "body": {
        "query": {
          "bool": {
            "must": [
              {
                "query_string": {
                  "query": "platform:gvp AND NOT hostname:srvivr*"
                }
              },
              {
                "range": {
                  "@timestamp": {
                    "gte": {"%timefilter%": "min"},
                    "lt": {"%timefilter%": "max"}
                  }
                }
              }
            ]
          }
        },
        "size": 0,
        "aggs": {
          "servers": {
            "terms": {
              "field": "hostname.keyword",
              "size": 20,
              "order": {"_key": "asc"}
            },
            "aggs": {
              "ns_web": {"sum": {"field": "ns_web"}},
              "ns_cw": {"sum": {"field": "ns_cw"}},
              "ex": {"sum": {"field": "ex"}}
            }
          }
        }
      }
    },
    "format": {"property": "aggregations.servers.buckets"}
  },
  "mark": "bar",
  "encoding": {
    "tooltip": {"field": "key", "type": "ordinal"},
    "x": {"field": "key", "type": "ordinal"},
    "y": {"field": "ns_web.value", "type": "quantitative"}
  }
}

Are they supported in kibana? By looking at some other posts, I suppose they are.
Do tooltips need to be enabled somewhere else to be shown?

Thanks for your help.
-Al


(kulkarni) #2

hmm, am not too sure about Vega-lite tool tip. Pinging @nyuriks for more info here.

Cheers
Rashmi


(Alumino) #3

I did some tests, and found that it is not well supported on firefox (as of v 57.0.3).
Tests on Chrome did work, although they show the native browser tooltip (from "title" attribute)

I found that @nyuriks addressed the issue on the github page of elastic, and included a commit to make it work with the html tooltips.

https://github.com/elastic/kibana/issues/17215

I am wondering if that commit works with firefox.


(system) #4

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