fix(axis): add axisTitleHeight to axis increments#29
Merged
emmacunningham merged 2 commits intoelastic:masterfrom Feb 5, 2019
Merged
fix(axis): add axisTitleHeight to axis increments#29emmacunningham merged 2 commits intoelastic:masterfrom
emmacunningham merged 2 commits intoelastic:masterfrom
Conversation
Collaborator
|
@emmacunningham could you please add a story with multiple Y and X axes on top, bottom, left and right with debug knobs so we can add a test for this in the future? |
Collaborator
|
and maybe some knobs to show and hide the axes |
Previously, without the axisTitleHeight offset, multiple axes with the same position would overflow into each other with margins less than the title height. fixes elastic#26
3ee982b to
4607394
Compare
Contributor
Author
markov00
approved these changes
Feb 5, 2019
Collaborator
markov00
left a comment
There was a problem hiding this comment.
Code LGTM.
I'm not sure if the chart.margin has to be applied outside the chart and also between axes, but for the moment I think it's super fine and we can later add a new props that describe the space between axes
markov00
pushed a commit
that referenced
this pull request
Feb 7, 2019
# 1.0.0 (2019-02-07) ### Bug Fixes * reflect specs ids on legend items when using single series ([8b39f15](8b39f15)) * **axis:** add axisTitleHeight to axis increments ([#29](#29)) ([e34f0ae](e34f0ae)), closes [#26](#26) * **axis:** fix horizontal title positioning to account for title padding ([08d1f83](08d1f83)) * **axis:** scale tick labels to fix text truncation on chrome ([#38](#38)) ([99c2332](99c2332)), closes [#18](#18) * **axis:** use titleFontSize for debug rect for horizontal axis title ([#17](#17)) ([af4aa58](af4aa58)), closes [#11](#11) * **dimensions:** use chart top padding in computation of chart height ([42585f7](42585f7)), closes [#13](#13) * **x_domain:** fix x value asc sorting using numbers ([26b33ff](26b33ff)) ### Features * add tickLabelRotation and showGridLines features ([#7](#7)) ([47f118b](47f118b)) * **axis:** draw grid lines separately from axis tick and customize style with config ([#8](#8)) ([ab7e974](ab7e974))
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
# 1.0.0 (2019-02-07) ### Bug Fixes * reflect specs ids on legend items when using single series ([ecbe4c6](elastic/elastic-charts@ecbe4c6)) * **axis:** add axisTitleHeight to axis increments ([opensearch-project#29](elastic/elastic-charts#29)) ([1f4b48b](elastic/elastic-charts@1f4b48b)), closes [opensearch-project#26](elastic/elastic-charts#26) * **axis:** fix horizontal title positioning to account for title padding ([d167af6](elastic/elastic-charts@d167af6)) * **axis:** scale tick labels to fix text truncation on chrome ([opensearch-project#38](elastic/elastic-charts#38)) ([3e6a400](elastic/elastic-charts@3e6a400)), closes [opensearch-project#18](elastic/elastic-charts#18) * **axis:** use titleFontSize for debug rect for horizontal axis title ([opensearch-project#17](elastic/elastic-charts#17)) ([7e5f7d6](elastic/elastic-charts@7e5f7d6)), closes [#11](elastic/elastic-charts#11) * **dimensions:** use chart top padding in computation of chart height ([4bc5ac8](elastic/elastic-charts@4bc5ac8)), closes [#13](elastic/elastic-charts#13) * **x_domain:** fix x value asc sorting using numbers ([f64c6aa](elastic/elastic-charts@f64c6aa)) ### Features * add tickLabelRotation and showGridLines features ([#7](elastic/elastic-charts#7)) ([ced76ce](elastic/elastic-charts@ced76ce)) * **axis:** draw grid lines separately from axis tick and customize style with config ([#8](elastic/elastic-charts#8)) ([411950b](elastic/elastic-charts@411950b))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

fixes #26
Previously, without the axisTitleHeight offset, multiple axes with the same position would overflow
into each other with margins less than the title height. Also it would appear to give the chart additional padding because the axis nearest to the chart wasn't positioned correctly.
Now, the title won't overflow into the next axis:
(Has been tested with multiple axes for each of the positions)