Allow Title and Legend bottom positioning and improve chart spacing #25
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.
This change was initially motivated to add
bottom
as a value that can be specified for the legend or title when rendering on the bottom is desired.When adding that feature it was discovered that the title and legend spacing was inconsistent. For example if no title was specified the chart would extend into the legend. This change attempts to make that spacing more predictable and controllable:
OverlayChart
to*true
in theLegendOptions
In general the change here is pretty minor, but I believe this will be more predictable for the user, and given our tests overall this produced better spaced charts.
In the future we may enable
OverlayChart
to accept a*false
to provide different behavior for vertical legends. This is why I felt a pointer may be better than a simple bool field.