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

RadialBar Size issue #832

Closed
jicihome opened this issue Aug 7, 2019 · 3 comments
Closed

RadialBar Size issue #832

jicihome opened this issue Aug 7, 2019 · 3 comments
Labels
doc Anything related to documentation

Comments

@jicihome
Copy link

jicihome commented Aug 7, 2019

Hi!
I'm trying to understand Radial bar "size" property.
If I set a number (integer) the chart is render and a kind of calculation happen with the heigth. A little bit like if we set undefined, but the result is different. But it's hard to dynamically set it because we don't know how this is calculated and we cannot replicated the calculation to get what we need.
If I enter "100%", the middle of the chart is rendered but no bar. Same for "100px" for example.
I think that "100%" should work but it doesn't seem to work.
So actually, the size parameters is impossible to use in radial bar (except if you have a specific height that never change, this is possible to find the size integer to use).

@junedchhipa junedchhipa added the doc Anything related to documentation label Jan 5, 2020
@junedchhipa
Copy link
Contributor

Yes, the size property was intended to provide a fixed size to the radial-bars, but it seems they cause more issues in the positions.
The correct way to control the size of any chart type would be to set the chart.height and chart.width properties.
Then to control the size of specific elements of radial bars, setting radialBar.hollow.margin or radialBar.hollow.size would help.

@jicihome
Copy link
Author

@junedchhipa I think I understand what you mean. And I think I didn't explain well enough.
Is this normal that in this example: https://sandboxjc.bubbleapps.io/version-test/radial there's a lot of free space (margin) all around the chart? I would think that if no title and legend are shown, this should be centered and use 100% width. I tested with your codepen example, and this seem fine. So not sure what is causing this issue. I will continue to test and will send all settings later. Thanks

@jicihome
Copy link
Author

After playing a bit more with the demo, it's seem that this is the normal behavior actually. The chart seem to use a specific width and height and keep space for title, legend and anything else around the chart (addtext for example) instead of adjusting automatically to available space. Is this expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Anything related to documentation
Projects
None yet
Development

No branches or pull requests

2 participants