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

Specify GraphArea height for barChart #1611

Open
Priyantha-Kingslake opened this issue Mar 18, 2024 · 2 comments
Open

Specify GraphArea height for barChart #1611

Priyantha-Kingslake opened this issue Mar 18, 2024 · 2 comments
Labels
Bar Chart question Further information is requested

Comments

@Priyantha-Kingslake
Copy link

There are times where I need my bottom titles to be tilted because they are too long. when I tilt them, they occupy a vertical space that otherwise would be used to draw the graph. This causes the vertical space of the drawn graph to differ when the bottomTitles are dynamic.

I want to be able to fix a vertical height for the drawn graph EXCLUDING space occupied by titles.
I am fine with the user having to scroll down if they need to read the titles. I just need the visual graph to be consistent.

example images
image
image

@Priyantha-Kingslake Priyantha-Kingslake changed the title Specify Graph height for barChart Specify GraphArea height for barChart Mar 18, 2024
@imaNNeo
Copy link
Owner

imaNNeo commented May 1, 2024

If you're okay with letting users scroll more, then you can increase the whole height of your chart. This way, you have more space for the bars. Have you tried this approach?

@imaNNeo imaNNeo added question Further information is requested Bar Chart labels May 1, 2024
@Priyantha-Kingslake
Copy link
Author

I kinda ended up with doing something like that.
Here the reserved size for my bottomTitles is dynamically calculated depending on the length of the text that needs to be displayed.
I set the height for the parent of the graph to be (required GraphArea constant + calculated bottomTitles-size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bar Chart question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants