-
Notifications
You must be signed in to change notification settings - Fork 140
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
Redundant Space at top of Bar Chart #71
Comments
Sorry, also, is there a way that we can set the space on the left of the chart to 0 for times when we don't want the y axis showing? |
Hi @verofy-simon-denny 👋 Regarding your first question - Yes, we can remove the extra padding at the top, by using the Here's a chart without using the const barData = [{value: 15}, {value: 30}, {value: 26}, {value: 40}];
<BarChart backgroundColor={'red'} data={barData} /> Now, if we add const barData = [{value: 15}, {value: 30}, {value: 26}, {value: 40}];
<BarChart backgroundColor={'red'} maxValue={40} data={barData} /> The output becomes- Notice the padding at the top is now gone!How it works- If we don't provide the |
Regarding your second question @verofy-simon-denny, you can wrap the Although it's a workaround, but for now this is the best way, and doesn't break anything as long as as we have hidden the y axis labels using the |
Thank you for the answers, appreciate the time and the great library. It makes sense, but I can't seem to set the height and max value at the same time, am I doing something wrong here? I've used your example, but added height:
Many Thanks, Simon. |
Yes @verofy-simon-denny, Even I faced the same issue. But the fact is there's no issue as such. I reloaded the app and it worked like a charm💫✨ Please try reloading the app after changing any of these props- |
Thanks that works now. |
Hi @verofy-simon-denny , I am facing the same issue. But it only happens when I use the topLabelComponent. Otherwise, it is working fine. Please suggest any answer. Thanks in advance. |
Hi,
Just wondering if it's possible to get rid of the redundant space at the top of the bar chart - highlighted the background in red to show the space at the top:
Thanks
.
The text was updated successfully, but these errors were encountered: