Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend values as JavaScript object #229

Closed
mrkurt opened this issue May 21, 2020 · 2 comments
Closed

Legend values as JavaScript object #229

mrkurt opened this issue May 21, 2020 · 2 comments
Labels
question Further information is requested

Comments

@mrkurt
Copy link
Contributor

mrkurt commented May 21, 2020

We're trying to do a bit more with legends, is there and event/hook that'll let us get at the current values for a legend?

@leeoniya
Copy link
Owner

leeoniya commented May 22, 2020

the raw data values for what the legend displays can be pulled from the data array via u.cursor.idx at any time. there is also a setCursor hook that fires when the cursor moves.

take a look at https://github.com/leeoniya/uPlot/blob/master/demos/tooltips.html

@leeoniya leeoniya added the question Further information is requested label May 22, 2020
@mrkurt
Copy link
Contributor Author

mrkurt commented May 22, 2020

Oh nice, that should do it. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants