Skip to content

Commit

Permalink
docs(examples): Bar Chart with Full-Height Hover Targets for Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 13, 2022
1 parent 9d4164f commit a7af902
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/specs/interactive_bar_full_height_hover.vl.json
@@ -0,0 +1,30 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/movies.json"},
"layer": [
{
"params": [
{
"name": "hover",
"select": {"type": "point", "on": "mouseover", "clear": "mouseout"}
}
],
"mark": {"type": "bar", "color": "#eee", "tooltip": true},
"encoding": {
"x": {"bin": true, "field": "IMDB Rating"},
"opacity": {
"condition": {"test": {"param": "hover", "empty": false}, "value": 0.5},
"value": 0
},
"detail": [{"aggregate": "count"}]
}
},
{
"mark": "bar",
"encoding": {
"x": {"bin": true, "field": "IMDB Rating"},
"y": {"aggregate": "count"}
}
}
]
}
4 changes: 4 additions & 0 deletions site/_data/examples.json
Expand Up @@ -791,6 +791,10 @@
"name": "interactive_bar_select_highlight",
"title": "Bar Chart with Highlighting on Hover and Selection on Click"
},
{
"name": "interactive_bar_full_height_hover",
"title": "Bar Chart with Full-Height Hover Targets for Tooltip"
},
{
"name": "interactive_legend",
"title": "Interactive Legend"
Expand Down

0 comments on commit a7af902

Please sign in to comment.