ldionne / metabench

A simple framework for compile-time benchmarks
metaben.ch
Other
181 stars 17 forks source link

Hover info doesn't increment past the shortest dataset's max X value #158

Open badair opened 7 years ago

badair commented 7 years ago

chart_point

The hover info in this screenshot shows 280, even though the point is at the 300 vertical. This might be a bug in a different project, I don't know. Either way, it's really minor. live example

Edit: love the tool, by the way.

ldionne commented 7 years ago

I'm not sure whether it's actually a bug. The thing is that you're really looking at two different points, one on the blue curve and the other one on the orange curve. These two points have a different X value, but the tooltip is only showing one X value. Which one should it show? Should it stop showing the blue point when you're out of range? Also note that the Y value of the orange curve is updating properly, i.e. it does not stay stuck at the X=280.

badair commented 7 years ago

Which one should it show? Should it stop showing the blue point when you're out of range?

Yes, I would think so. I think ideally the X axis value would update to the hovered point (e.g. 300 would show in the screenshot above, since that's where my cursor is), and the datasets that do not cross the vertical would disappear from the tooltip. I guess I wouldn't spend my free time changing it (it's already far more polished than I would expect), but I wanted to bring it to your attention in case it's something you'd want to change.