Closed slominskir closed 7 years ago
Note: I see different behavior if I generate the steps myself vs using built-in steps feature of flot. By manually adding points to create steps the tooltip never shows on lines. By using built-in steps feature it seems the tooltip will show on top half of lines going up and on bottom half of lines going down. More investigation needed.
I've also observed the reported x and y values in the tooltip are those of the closest point in the dataset, not what is the closest point under the cursor at the line.
That might be fine, but we need to decide what we need. If we want closest point under the cursor it is somewhat tricky with numbers as you must know what precision / scale to use: for our time series on the x it might be based on zoom (might be second, might be day). For y-axis maybe just default to a precision of 1 decimal place. I suppose the hoverable callback precision (screen resolution) might be a factor here too.
Not using flot anymore due to performance problems
The tooltip plugin for the graphing library flot has a bug where it doesn't work with stepped lines. This feature is needed in order to mimic what the existing viewer does. Adam already has an idea of where the bug is.
See: https://github.com/krzysu/flot.tooltip/issues/88
See: https://github.com/krzysu/flot.tooltip/blob/master/js/jquery.flot.tooltip.source.js