I spent a while investigating alternatives for implementing this functionality. From what I understand about Vega selections, there doesn't seem to be an easy way to expand the clickable area for a facet bar, short of doing manual click location calculations. It's even more difficult for the tooltip since we don't have any control over what event(s) triggers the tooltip, we can only customize it's look and provide the actual Handler for customizing the UI.
This solution ended up being quite simple to implement. That being said, it is still a bit 'hacky' so I can post an issue about this on the vega repo if we'd still like to look for other options.
Precursor PR: https://github.com/DataBiosphere/data-explorer/pull/270
I spent a while investigating alternatives for implementing this functionality. From what I understand about Vega selections, there doesn't seem to be an easy way to expand the clickable area for a facet bar, short of doing manual click location calculations. It's even more difficult for the tooltip since we don't have any control over what event(s) triggers the tooltip, we can only customize it's look and provide the actual
Handler
for customizing the UI.This solution ended up being quite simple to implement. That being said, it is still a bit 'hacky' so I can post an issue about this on the vega repo if we'd still like to look for other options.