DataBiosphere / data-explorer

BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Expand HistogramFacet tooltip/selection area #272

Closed bfcrampton closed 5 years ago

bfcrampton commented 5 years ago

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.