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
addPoint() does not return point #10413
Comments
Hi @LaniMoo Thanks for sharing the idea! I agree with you, it would be useful to get that point. Just like we do with |
Wonderful!! Thanks for your understanding, @pawelfus!!!! |
Bummer, I see it got reverted. Any chance |
No ETA @LaniMoo - we will try to add this in the next release. |
The reason we're not returning the point is that there are cases where a Another case is if we have a chart that is zoomed to, say X values 0-500. If you add a point at x=1000, we don't generate a Bottom line, as a CPU/memory optimization, I see two viable solutions:
|
Or a third solution could be to either add a series event on point generated, or refactor the existing |
Thanks for the details! Yup, that makes sense now. How about simply returning This suppose to be a simple fix, but given the complexity of the issue, we may delay this. Honestly, this sounds more like a promise use case. We can try to implement something similar (like your other proposed solutions), but I'm not sure if it's worth it. |
I agree returning a promise would be the most natural solution. Returning the index would help, but would need to come with a warning. Maybe it's best to leave it for now, as the points can already be found using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
The one-liner
return point;
is missing from addPoint() so it returns nothing. Please hear out my use-case:Since there is no way to toggle visibility of categories, I must remove the points manually to "hide" them. If storing the added points were possible:
Expected behaviour
Then I would be able to do this:
Actual behaviour
But instead I have to iterate through the entire series to find the points to remove for one category:
Live demo with steps to reproduce
https://jsfiddle.net/lanimelrok/1b6z8vqk/
Looking at the source code, it looks like just a one-liner to return the point. Could we please return the added point so that I won't have to iterate through possibly hundreds of points in a series just to delete a few? Thank you so much for your understanding.
highcharts/js/parts/Dynamics.js
Lines 825 to 897 in 891c59a
The text was updated successfully, but these errors were encountered: