Skip to content
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

fix(axis): rotated label positioning #709

Merged

Conversation

nickofthyme
Copy link
Collaborator

Summary

Fixes #673

Used rotated maxLabelBboxWidth to position vertical axis instead of maxLabelTextWidth.

Checklist

  • Proper documentation or storybook story was added for features that require explanation or tutorials

@nickofthyme nickofthyme added bug Something isn't working :axis Axis related issue :xy Bar/Line/Area chart related labels Jun 15, 2020
@nickofthyme nickofthyme requested a review from markov00 June 15, 2020 01:42
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2020

Codecov Report

Merging #709 into master will increase coverage by 0.35%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #709      +/-   ##
==========================================
+ Coverage   74.80%   75.16%   +0.35%     
==========================================
  Files         264      280      +16     
  Lines        8514     8842     +328     
  Branches     1709     1759      +50     
==========================================
+ Hits         6369     6646     +277     
- Misses       2093     2138      +45     
- Partials       52       58       +6     
Impacted Files Coverage Δ
...ypes/partition_chart/renderer/canvas/partition.tsx 32.39% <ø> (ø)
...chart_types/xy_chart/renderer/canvas/axes/title.ts 12.50% <0.00%> (ø)
src/utils/commons.ts 95.93% <ø> (-0.07%) ⬇️
src/state/chart_state.ts 87.09% <50.00%> (+0.21%) ⬆️
src/utils/logger.ts 54.54% <54.54%> (ø)
src/chart_types/xy_chart/domains/x_domain.ts 97.64% <71.42%> (-1.15%) ⬇️
src/chart_types/xy_chart/utils/series.ts 96.58% <88.88%> (-0.82%) ⬇️
src/chart_types/xy_chart/state/utils/utils.ts 92.95% <100.00%> (+0.50%) ⬆️
src/mocks/scale/index.ts 100.00% <0.00%> (ø)
src/mocks/store/store.ts 86.95% <0.00%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed49bbb...4656528. Read the comment docs.

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM tested locally this fixes the issue

@nickofthyme nickofthyme merged commit 2e26430 into elastic:master Jun 15, 2020
@nickofthyme nickofthyme deleted the fix/rotated-axis-label-positioning branch June 15, 2020 16:18
markov00 pushed a commit that referenced this pull request Jun 16, 2020
## [19.5.1](v19.5.0...v19.5.1) (2020-06-16)

### Bug Fixes

* graceful scale fallbacks and warnings ([#704](#704)) ([ed49bbb](ed49bbb)), closes [#678](#678)
* **axis:** rotated label positioning ([#709](#709)) ([2e26430](2e26430)), closes [#673](#673)
* **tooltip:** popper scroll issue ([#712](#712)) ([0c97c67](0c97c67))
@markov00
Copy link
Member

🎉 This PR is included in version 19.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jun 16, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:axis Axis related issue bug Something isn't working released Issue released publicly :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right Axis rotation pushes label off chart
3 participants