-
Notifications
You must be signed in to change notification settings - Fork 985
Axis margin #1623
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
Axis margin #1623
Conversation
|
@Jonarw just wondering if I could get your opinion on some naming. I'm wondering if OuterMargin should be Margin, and Margin should be Inset (I would have called it padding, but that's taken). |
|
I've finally addressed all the little concerns I was putting off, so I'm opening this for review. |
|
Regarding naming, just as an idea: How about we call the Other than that I'll take a look at the code soon. |
|
@Jonarw that's a great idea! I'd be tempted to go for |
Jonarw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I like this feature!
For simplicity's sake, when I talk about DisplayMinimum and ActualMinimum in the following of course this also applies to DisplayMinimum and ActualMaximum.
I do have some concerns about the 'silent' breaking change this introduces: People might not realize they are supposed to use DisplayMinimum now instead of ActualMinimum. Also it may not be completely obvious why the ActualMinimum is not the 'actual' minimum value that is shown.
On the other hand, this only becomes an issue if MinimumMargin != 0, correct? So people upgrading from older versions should not have any problems with this, because ActualMinimum == DisplayMinimum in that case? Then maybe it's fine as it is.
I still wonder if we could make the difference between DisplayMinimum and ActualMinimum more obvious from the naming (i.e. rename ActualMinimum to something more descriptive, and maybe keep it as deprecated to make people aware). I can't think of a better name for this at the moment, do you have any ideas? But if we don't find anything better I suppose it's also fine as it is...
Yeah, that's absolutely the idea.
Yeah, I'm by no means attached to any names, and an option I've still not fully would be to 'rename' |
630be5e to
ac41a14
Compare
|
Sorry, squashed everything because I thought I'd made a mistake with the revert, but it was just conflicts in the changelog... |
|
Over the weekend I concluded it would be perfectly reasonable to change I think names for the 'outer' stuff (i.e. what is now
Again, I'm not attached to any of the names, so any suggestions are welcome. Because |
|
Looks like Snyk is unhappy with me again. |
Jonarw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think the naming is a lot more intuitive this way!
I am not completely happy with the name Logical either, it seems a bit generic to me. But I also can't think of anything better. Series would be more intuitive, but also not completely true - after all this also applies to annotations. Data might be a viable alternative, I don't think I have a clear preference between Logical and Data. So unless a compelling alternative occurs to one of us, I'd say let's leave it at Logical.
Apart from a few nitpicks I have no other complaints.
Source/OxyPlot/Axes/Rendering/HorizontalAndVerticalAxisRenderer.cs
Outdated
Show resolved
Hide resolved
|
@Jonarw feedback addressed. For the record, my only reservation with @objorke I wondered if you might have time to provide an opinion on the naming? It's probably easiest just to look at the grey screenshot above to see the current state of naming. [ ] Update the changelog when we settle on the naming |
|
A big issue has just occurred to me while looing through the axis tests: the I've not noticed any weirdness anywhere, but someone could be calling |
|
Maybe a slightly crazy idea: A possible naming scheme could be:
Just brainstorming, feel free to completely dismiss all of this ;) |
|
I think I'm slowly coming coming to like Obsoleting and redirecting |
f3bee39 to
9861a30
Compare
|
I've gone with I'm not happy with |
|
If we can expedite #1556, then we can hopefully do a nice job of #391 (because we can split |
|
@Jonarw any other comments on this? By keeping the The only thing that I'm not especially happy with is the
Note that the |
|
Sorry, I was away for a couple of days.
I don't think there is a perfect option, but I guess So I'd say, if there is nothing more from your side, this should be good to go. |
|
@Jonarw thanks. I'll hold on for the moment, but when I have time to start working on things properly again I'll get this merged (assuming no other problems comes up). |
|
Plan for the weekend:
|
9861a30 to
82978ff
Compare
82978ff to
b2abc3a
Compare
|
@Jonarw I've not checked if there are conflicts, but if #1661 goes through today, I'll try to get this though as well (nothing much else to do today). Then I think it's worth thinking about a 2.1 release to get Skia out there, but I'd like this feature too ;). If we think a release is a good idea, we should quickly decide whether #1556 should be included or not. My main concern is that I don't know who to test it properly with non-latin script. I think by bringing the test trimming 'in-house', issues like #1659 should stop occurring. |
|
@Jonarw How about this? I don't think anything has changed; I think I was just working on the examples. I still need to go through all the documentation again for my sanity, which I'll get on with now. |
|
Yes, I think that's good. |
b2abc3a to
1fa3e20
Compare
|
Rebased. I've nothing else to add. |




Fixes #1569 .
Checklist
Changes proposed in this pull request:
MinimumMargin,MaximumMargin, which apply to all axes except angle axes, adding an absolute screen-space margin within the axis (as described in Screen space axis padding #1569) (whereMinimumPaddingandMaximumPaddingpad in relative data-space).DisplayMinimumandDisplayMaximumproperties toAxis, and replaces most usages ofActualMinimumandActualMaximumwith these: theActualbounds are those determined from data min/max or user zooming/panning; theDisplaybounds are theActualbounds with the margin added.MinimumOuterMargin, andMaximumOuterMarginwhich only apply to horizontal/vertical axes, which limit the axis bounds in absolute screen space (whereStartPositionandEndPositionlimit them in relative screen space).0, and should have no impact on any existing behaviour by design when they are<= 0Here is an example with extra annotations to show what is going on:
(Axis Examples > All margins and padding)
Outstanding Concerns
ActualMinimumandActualMaximumis probably now broken: most things wantDisplayMiniumandDisplayMaximuminstead.@oxyplot/admins