react-linechart icon indicating copy to clipboard operation
react-linechart copied to clipboard

Feature request: Current datapoint

Open DrummerHead opened this issue 6 years ago • 0 comments

Hi Rafael! Thanks for this project, it was really straightforward to use, and I applaud you for adding the data transformer functions, they really take into account a user of this library.

In my usage of this graph, I'm displaying photos that have associated data (single line of data). So I'm displaying specific info about a datapoint as well as displaying how that data is meaningful in context.

For this usecase, it would be really helpful to have a way to determine "current" datapoint from the model, so that point can be highlighted in some way in the UI.

I got it working by getting the cx svg attribute of the points after render and using that info to render an overlay translucent element. In practice it works, but we both know that's a hack :) going back to the DOM to fecth information is not the way to go.

If you deem this feature in alignment with the project goals, it would be great if you contemplated it. That is, have a way to highlight a specific datapoint.

Thanks!

DrummerHead avatar Feb 26 '18 20:02 DrummerHead