synmetrix
synmetrix copied to clipboard
Categories in tooltips
Categories should be visible in tooltip by value: to make this work we have to pivot categories.
Example conf:
{
"mark": {"type": "rule"},
"transform": [{"pivot": "Events\\.eventType", "value": "Events\\.count", "groupby": ["Events\\.timestampHour"]}],
"name": "tooltip",
"selection": {
"hover": {
"type": "single",
"empty": "none",
"on": "mouseover",
"nearest": false
}
},
"encoding": {
"x": {
"field": "Events\\.timestampHour",
"type": "temporal",
"title": null,
"scale": {"domain": {"selection": "brush"}, "type": "time"}
},
"tooltip": [
{
"field": "Events\\.timestampHour",
"type": "temporal",
"title": "Events Timestamp Hour",
"format": "%y, %b %d, %a, %H:%M"
},
{
"field": "NEW_ANOMALIES_GENERATED",
"type": "quantitative"
},
{
"field": "NEW_INSIGHTS_GENERATED",
"type": "quantitative"
}
],
"color": {
"condition": {
"selection": {"not": "hover"},
"value": "transparent"
}
}
}
}
not actual