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

Multiple Y axis cause the axis to crop #98

Closed
Carniatto opened this issue Sep 13, 2018 · 12 comments
Closed

Multiple Y axis cause the axis to crop #98

Carniatto opened this issue Sep 13, 2018 · 12 comments
Labels
bug Something isn't working

Comments

@Carniatto
Copy link

Carniatto commented Sep 13, 2018

When using multiple Y axis the positioning of the left axis is wrong resulting in copping of the title

screen shot 2018-09-13 at 17 50 24

@junedchhipa
Copy link
Contributor

No, that space shouldn't exist.
Some other users have also reported the same issue when using multiple y-axis - and it's on my roadmap.

@junedchhipa junedchhipa added the bug Something isn't working label Sep 13, 2018
@Carniatto
Copy link
Author

@junedchhipa if you point me in the right direction I can help fix this and open a PR

@junedchhipa
Copy link
Contributor

@Carniatto This is fixed in 8817230
Not merged into master yet, because other related y-axis issues are being processed.

The code for this is located in src/modules/axes/Yaxis.js & src/modules/Dimensions.js
Thanks for offering help

@Carniatto
Copy link
Author

@junedchhipa This is still happening in ver 1.5.3

@junedchhipa
Copy link
Contributor

Can you please show me your example code for which this is happening?
Maybe I have missed some config - here it works correctly
https://apexcharts.com/javascript-chart-demos/mixed-charts/multiple-yaxis/

@Carniatto
Copy link
Author

@junedchhipa just tried with the latest version 2.0.6 and the problem persists :(
here's an example: https://stackblitz.com/edit/angular6-apexcharts

I think the problem is when you use formatters for labels it will not consider it

@junedchhipa
Copy link
Contributor

junedchhipa commented Oct 7, 2018

Hi @Carniatto
I will take a look again. Seems like the yaxis labels needs extra attention when there are multiple y-axes. Thanks for providing the example, will be helpful.
Re-opening this.

@Carniatto
Copy link
Author

Hi @junedchhipa this bug is still happening under the same circumstances. Do you mind to check it?

@junedchhipa junedchhipa reopened this Jan 20, 2019
@junedchhipa
Copy link
Contributor

I need to rewrite the routine for yaxis titles calculations for multi-axes or write better tests. Thanks for reporting.

@saurabhnemade
Copy link

This is still breaking.

Screenshot 2021-09-01 at 12 19 34 AM

@saurabhnemade
Copy link

I ended up adding:

yaxis: {
     title: { offsetX: 10 }
}

but it would be nice if we can fix it permanently without adding offset.

@znfgnu
Copy link

znfgnu commented Oct 5, 2022

I met similar problem today with single Y axis. In my project I use Vue flavor of ApexCharts alongside Quasar framework.

In my case the chart is contained in a dialog box that is hidden by default. I noticed that the amount of Y axis title that is cropped varies every time I open this dialog. By default the dialog has opening/closing animation time of 300 ms.

I tried to change this time to 0 ms and 1000 ms. In the first case the problem with cropped description disappeared. Making it very long causes cropping even worse (crops some of the numerical values).

I don't know much about ApexCharts' internals but it looks like dimensions used for Y-axis titles calculation are fetched too early - when the containing element hasn't achieved it's final size.

0 ms / 1000 ms: Zrzut ekranu z 2022-10-05 17-54-18 Zrzut ekranu z 2022-10-05 17-54-40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants