Fix needle plot domain annotations and add textangle prop #565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #546
Closes #517
About
Description of changes
This PR reduces the
XSPAN_RATIO
for the NeedlePlot component so that domain annotations are more regularly aligned to the domains they belong to, and only alignedright
when the domain length is short enough for it to be appropriate.This should make for a more consistent annotation scheme. This PR also exposes the
textangle
prop to allow the domain annotation orientation to be rotated relative to the horizontal axis.@alexcjohnson Do you have any thoughts on the
ANGLE_OFFSET
calculation? It's intended to increase the distance between the domain divider and the annotation as the text is angled more sharply, but I'm curious if there's a better method of doing so rather than using ratios.