Skip to content

Tooltip GetAxisLimits now returns all NaN instead of all zero#811

Merged
swharden merged 1 commit intoScottPlot:masterfrom
bclehmann:tooltip-auto-axis
Feb 20, 2021
Merged

Tooltip GetAxisLimits now returns all NaN instead of all zero#811
swharden merged 1 commit intoScottPlot:masterfrom
bclehmann:tooltip-auto-axis

Conversation

@bclehmann
Copy link
Member

New Contributors:
please review CONTRIBUTING.md

Purpose:
Removes Plottable.Tooltip from AxisAuto calculations to fix #805

New Functionality:

From the demo provided in #805 (comment):

Before:
image

After:
image

@bclehmann
Copy link
Member Author

bclehmann commented Feb 19, 2021

I listed some remaining problems with this approach here #805 (comment):

I'm realizing now that converting things like the coordinates and sizes of the tooltip in coordinate space necessitates already knowing the axis limits...

I think the best solution is to have the tooltips not be considered at all in the axis calculation, which can be achieved by using double.NaN (although I think changing it so that it would accept null may be more appropriate). This does mean that auto-axising can cut off a tooltip, but this isn't that much of an issue because tooltips automatically flow rightwards if there isn't enough space on the left. One can consider a multi-pass AxisAuto function if this is a concern.

@swharden swharden merged commit 91a959c into ScottPlot:master Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding Annotations combined with AxisAuto derivates turn out wierd

2 participants