You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@objorke I think it works (I just copied and pasted existing code) although I did not test the code, a reason for this is that I do not know for what hit testing for axes will be used excepting tooltips. Please let me know if you agree with the creation of the pull request based on the commit from the link above. Thank you.
I would prefer if the hit testing code was in the Axis class, and not the PlotModel, similar to the Series and Annotations. I think the GetAxesFromPoint has slightly different usage (it is used for zoom and pan handlers I think) where it also needs to find axes when clicking inside the "plot area". I would prefer not adding the overload on GetAxesFromPoint.
Yes, tooltips is probably the first need for hit testing on axes, but I think it can also be useful if you have a user interface where you can click on an axis to select it and edit min/max values.
@objorke I think I have remade it in the way you suggested. There is just one commit. I have also tested it with this example. Please let me know if I can make the PR (I will include the example in the PR only if you suggest this). Thank you.
Can you create a branch and include both the example and the changes?
Do we need to add all the position tier logic in the hit test code? can the axis simply keep a bounds rectangle (that it updates during rendering) that we can check against?
I think the hit test code could be something like "return this.axisBounds is not empty && this.axisBounds
contains args.Point"
Can you create a branch and include both the example and the changes?
Yes.
Do we need to add all the position tier logic in the hit test code?
No.
can the axis simply keep a bounds rectangle (that it updates during rendering) that we can check against?
I think the hit test code could be something like "return this.axisBounds is not empty && this.axisBounds
contains args.Point"
@objorke I think I have remade it in the way you suggested. There is just one commit. I have also tested it with this example. Please let me know if I can make the PR (I will include the example in the PR only if you suggest this). Thank you.
Activity
objorke commentedon Nov 3, 2019
See #1415
objorke commentedon Nov 3, 2019
@silviubogan You have implemented this in your fork, can you create a PR for this change only?
https://github.com/oxyplot/oxyplot/pull/1415/files#diff-2c8edecb3bf6753459205e53722c4c22R1758
Implemented hit testing for axes (oxyplot#1419)
silviubogan commentedon Nov 4, 2019
@objorke I think it works (I just copied and pasted existing code) although I did not test the code, a reason for this is that I do not know for what hit testing for axes will be used excepting tooltips. Please let me know if you agree with the creation of the pull request based on the commit from the link above. Thank you.
objorke commentedon Nov 5, 2019
I would prefer if the hit testing code was in the
Axisclass, and not thePlotModel, similar to theSeriesandAnnotations. I think theGetAxesFromPointhas slightly different usage (it is used for zoom and pan handlers I think) where it also needs to find axes when clicking inside the "plot area". I would prefer not adding the overload onGetAxesFromPoint.Yes, tooltips is probably the first need for hit testing on axes, but I think it can also be useful if you have a user interface where you can click on an axis to select it and edit min/max values.
Implemented hit testing for axes (oxyplot#1419)
silviubogan commentedon Nov 6, 2019
@objorke I think I have remade it in the way you suggested. There is just one commit. I have also tested it with this example. Please let me know if I can make the PR (I will include the example in the PR only if you suggest this). Thank you.
objorke commentedon Nov 6, 2019
Can you create a branch and include both the example and the changes?
Do we need to add all the position tier logic in the hit test code? can the axis simply keep a bounds rectangle (that it updates during rendering) that we can check against?
I think the hit test code could be something like "return this.axisBounds is not empty && this.axisBounds
contains args.Point"
silviubogan commentedon Nov 7, 2019
@objorke
Yes.
No.
I think that it is possible. I have started working on what you requested. I have made a commit with the example from the gist in the same branch as the one in my previous message.
Thank you.
23W commentedon May 14, 2023
Nice change, will we see it merged to OXYPlot?
VisualMelon commentedon May 14, 2023
Could be something to incorporate into #1966