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

Adjust x axis height when tick labels are rotated using a negative value #1994

Closed
GDFaber opened this issue Mar 19, 2021 · 1 comment
Closed
Labels

Comments

@GDFaber
Copy link
Collaborator

GDFaber commented Mar 19, 2021

Description

The x axis labels can be rotated using the rotate setting. If no axis height was given explicitly, it is calculated in a way that fits the rotated texts. This works for positive values, but if you set rotate: -45 for example, the height is not adjusted properly.

Steps to check or reproduce

  1. On the billboard.js homepage, visit the RotateXAxisTickText example.
  2. Modify the rotate setting: rotate: -45.
  3. Remove the height setting (and the trailing comma in the line before).
@GDFaber
Copy link
Collaborator Author

GDFaber commented Mar 19, 2021

I think this can be solved by modifying getHorizontalAxisHeight(id) to use the absolute rotation value for its calculations in case of x axis. I'll add a PR later.

@netil netil closed this as completed in fe42e64 Mar 23, 2021
@netil netil added the bug label Mar 23, 2021
github-actions bot pushed a commit that referenced this issue Mar 26, 2021
## [3.0.1](3.0.0...3.0.1) (2021-03-26)

### Bug Fixes

* **axis:** calculate x axis height correctly for negative tick rotation settings ([fe42e64](fe42e64)), closes [#1994](#1994) [#1995](#1995)
* **candlestick:** fix exporting candlestick module ([1a9b75b](1a9b75b)), closes [#2007](#2007)
* **deploy:** fix deploying gh-pages ([baec455](baec455))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants