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

bug(axis): autorotated x axis tick texts are cut off at the end of x axis #1530

Closed
michkami opened this issue Jul 20, 2020 · 2 comments
Closed
Labels

Comments

@michkami
Copy link
Collaborator

michkami commented Jul 20, 2020

Description

Autorotated x axis tick texts are broken in V2.
As you can see in the screenshot below, the texts get cut at the end of the x axis.
Screenshot_2020-07-20 billboard js - examples

How it should look like:
Screenshot_2020-07-20 billboard js - examples(1)

It looks like the x axis clip path is cutting them off, as you can see below :

xAxisClipPathWidth = 524.5437140659369
grafik

7419f44 says, that x axis clip path fits the real axis size. Wouldn't the real axis size include the overflow, if autorotate is enabled and getAxisTickRotate() returns value > 0?

Adding getXAxisTickTextY2Overflow() to https://github.com/naver/billboard.js/blob/master/src/ChartInternal/internals/clip.ts#L61 fixed the problem for me locally.

Steps to check or reproduce

  1. Open https://naver.github.io/billboard.js/demo/#Axis.XAxisTickAutorotate
@netil netil added the question label Jul 21, 2020
@netil
Copy link
Member

netil commented Jul 21, 2020

Hi @michkami, the issue comes from the axes' left/right clip size adjustment(#1449).

To not clipped, you can use axis.x.clipPath option.
Set false to not apply clip-path attribute for x axis.

axis: {
    x: {
       clipPath: false
    }
}

@michkami
Copy link
Collaborator Author

thx @netil :)
Somehow I didn't find this commit.

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