Closed jwilber closed 2 weeks ago
I’ll just comment on the histogram hover value design choice: The reasoning is that you’re still selecting a range start/end even within a single bun, that’s why showing a precise value is more appropriate, imho. Also I think replicating Observable datatable 1 to 1 is not the goal (but Trevor might have a different opinion)
Fair points! I have no strong opinions, as I'm not the author of the library, but here's my though process regarding proposed PR changes:
Sure!
So, I'll move the percent formatting into it's own separate PR, and add that to the valuecounts plot as well.
For histogram interactions, I've noticed that Observable only shows the highlighted bin when hovering below the bins. When in crosshair selection mode, no hover information is displayed (including bins). I think we could adopt a similar approach, but with an added feature: in crosshair mode, we could display the current precise hover value (as is currently implemented).
I'm not sure I follow 100% here. My take is: keep the functionality I've added here, but only trigger when the user hovers below the bins, otherwise, keep the current crosshair functionality? Is that right?
So, I'll move the percent formatting into it's own separate PR, and add that to the valuecounts plot as well.
awesome!
My take is: keep the functionality I've added here, but only trigger when the user hovers below the bins, otherwise, keep the current crosshair functionality?
Couldn't have said it better myself (clearly 😂)!
Sweet, decided to just update in this MR, since it's not much code change.
See:
https://github.com/user-attachments/assets/f1f15b6a-7d3c-4ccf-991c-d415874e0cc9
Thanks @jwilber !!
A little Friday night PR: adding hover effects to the histogram (see video).
https://github.com/user-attachments/assets/ad946fd3-7640-4c73-bfc7-03248c6bbc95
In addition, I also created a
percentFormatter
, that formats percents in a cleaner manner, and added this to theValueCountsPlot
as well.One note here, hovering over the histogram currently shows the x-axis value -- it may be more appropriate to show the actual bin interval (see image below, which is what Observable does). A different PR can add that in pretty easily given the current setup, if that's desired.