KoalaPlot / koalaplot-core

Koala Plot is a Compose Multiplatform based charting and plotting library written in Kotlin
https://koalaplot.github.io/
MIT License
387 stars 18 forks source link

Feature Request: Implement mouse tracking lines on chart #55

Open darkerthan-black opened 5 months ago

darkerthan-black commented 5 months ago

I want to implement vertical and horizontal lines tracking the mouse cursor on the chart.

To do this, a feature that converts the mouse cursor's absolute coordinates into relative coordinates on the chart is needed.

And for this, an API that can determine the size of the chart is necessary.

gsteckman commented 5 months ago

This is also required for #50.

The VerticalLineAnnotation and HorizontalLineAnnotation functions can be used to draw lines on the graph, avoiding the need to leak the size of the chart. But you need to provide it with a coordinate at which to draw the line, which is where the missing mouse position is needed.

joffrey-bion commented 5 months ago

I would love to see this feature built-in too! I can't seem to find how to get hover effects in general with values of the different series where the mouse cursor is