# Vega Lite tooltip

**URL:** <https://forums.losant.com/t/vega-lite-tooltip/2477>\
**Category:** Help\
**Tags:** dashboard\
**Created:** [December 16, 2019, 3:28pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477 "2019-12-16T15:28:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 16, 2019, 3:28pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/1 "2019-12-16T15:28:10Z")

</div>

I’m trying to use tool tips in vega lite, but I can’t get them to show up.  
Is this not available in the Vega versions you have?

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [December 16, 2019, 3:38pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/2 "2019-12-16T15:38:03Z")

</div>

Hi @Lars_Andersson,

Could you include a screenshot of your block configuration? And any other relevant data?

Thanks!  
Julia

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 16, 2019, 3:41pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/3 "2019-12-16T15:41:01Z")

</div>

```json
{
  "width": {{block.width}},
  "height": {{block.height}},
  "autosize": {
    "type": "fit",
    "contains": "padding"
  },
  "config": {
    "axis": {
      "labelColor": "#888c95",
      "titleColor": "#888c95",
      "domain": false
    },
    "legend": {
      "labelColor": "#888c95",
      "titleColor": "#888c95"
    },
    "view": {
      "fill": "white",
      "stroke": "transparent"
    }
  },
"layer":[
  
  {
  "data": {
    "name": "time-series-0"
  },
  "mark": {"type": "line", "tooltip": true},
  "encoding": {
    "x": {
      "field": "time",
      "type": "temporal"
    },
    "y": {
      "field": "value",
      "type": "quantitative"
    }
      
  }}
  

  
  ,
      
  {
"data": {
        "values": 
          {"max": 88}
      },
  "mark": "rule",
   
   "encoding": {
          "y": {"field": "max", "type": "quantitative"},
        "color" : {"value":"red"}
        
  }
         }
   ,
      
  {
"data": {
         "values": 
          {"min": 72}
        
      },
  "mark": "rule",
   
   "encoding": {
          "y": {"field": "min", "type": "quantitative"},
        "color" : {"value":"red"}
        
  }
         }
  
  
]

}

```

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 17, 2019, 2:47pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/5 "2019-12-17T14:47:35Z")

</div>

Am I doing something wrong or is the Tooltip feature not supposed to work currently?  
I would like to know soon, if I need to go another route.

Thanks

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [December 17, 2019, 4:11pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/6 "2019-12-17T16:11:23Z")

</div>

Hi Lars,

I messed with this for a good amount of time and believe you have some incorrect syntax in your configuration. I would recommend checking out the following articles:

> **[Tooltip](https://vega.github.io/vega-lite/docs/tooltip.html#channel)**
>
> Vega-Lite - a high-level grammar for statistical graphics. Vega-Lite provides a higher-level grammar for visual analysis, comparable to ggplot or Tableau, that generates complete Vega specifications. Vega-Lite specifications consist of simple...

> **[Tooltip](https://vega.github.io/vega-lite/docs/tooltip.html#plugin)**
>
> Vega-Lite - a high-level grammar for statistical graphics. Vega-Lite provides a higher-level grammar for visual analysis, comparable to ggplot or Tableau, that generates complete Vega specifications. Vega-Lite specifications consist of simple...

See the last example on this page.

The following is an example from the Forums:

> [@Custom Charts not rendering tooltips on mobile devices](https://forums.losant.com/t/custom-charts-not-rendering-tooltips-on-mobile-devices/2192):
>
> I’ve been noticing some problems with displaying Vega-lite tooltips when using a touchscreen device (iphone or iphone) to view the dashboard. There is some sample code: { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "description": "A simple bar chart with embedded data.", "data": { "values": [ {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, {"a": "G", "b": 19}, {"a": "…

I would recommend checking out these resources, then, should you still not be successful, reading through Vega-Lite’s [GitHub issues](https://github.com/vega/vega-lite/issues) and opening one if you do not see it already.

Thanks!  
Julia

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 17, 2019, 4:37pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/7 "2019-12-17T16:37:45Z")

</div>

So it has nothing to do with which Vega version I select?

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 17, 2019, 5:55pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/8 "2019-12-17T17:55:48Z")

</div>

I figured out what was wrong. If I switched to mark:“point” instead of “line”, they showed up.

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 18, 2019, 4:37pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/9 "2019-12-18T16:37:10Z")

</div>

Shouldn’t I be able to copy in the code shown at [https://vega.github.io/vega-lite/examples/interactive\_multi\_line\_tooltip.html](https://vega.github.io/vega-lite/examples/interactive_multi_line_tooltip.html)

or is that not supposed to work?

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [December 18, 2019, 5:10pm UTC](https://forums.losant.com/t/vega-lite-tooltip/2477/11 "2019-12-18T17:10:34Z")

</div>

Never mind I figured it out. coped over example csv to local file
