leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.83k stars 386 forks source link

Default to crosshair cursor in plot area #987

Open PabloAlexis611 opened 3 months ago

PabloAlexis611 commented 3 months ago

I think using a crosshair cursor style over the default pointer allows the user to better understand what data point they're hovering on. Makes it easier to connect x/y axis values visually in the plot .

leeoniya commented 3 months ago

interesting. i'm not sure this is a good default since uPlot has its own crosshairs and cursors often are rendered with shadows and if the alignment isnt perfectly on-center it can be quite distracting:

image

PabloAlexis611 commented 2 months ago

Mmm, that's interesting - I had never noticed that slight off-center issue.

From my experience I found it more distracting to have a regular pointer cursor because I see a different shape that isn't "connected" in a way to what I'm trying to hover - the default uPlot crosshairs are great, but I liked the extra highlight on what I'm selecting with a crosshair cursor instead.

I probably didn't notice the offset/shadow since I set my background to a darker color.