-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
bar width #448
Comments
From the docs:
If the whole space for a bar is 100%, then a The sizes are in percentages as there is no absolute size of the bar on the view. It depends of how many bars you try to fit in the viewport. |
I understand that by setting barspace I get width of bar but how to set space of bar from which it gets barspace? |
@niksdgr8 be more clear, space of bar ? barspace? |
@danielgindi @liuxuan30 Is it possible to fix bar width and bar space will adjust accordingly to number of bars? |
not sure what you mean. But they work fine right now..? |
@liuxuan30 Nop man I just set data.barWidth = 20.0 and now each bar is covering whole graph view. All I want to fix size bar for a different number of bars. |
You set a big bar width and it is wider for sure.. |
@liuxuan30 I want a fixed bar width ... i dont want dynamic bar width.. Like if i have one bar or 10 bar .. The size should be same not dynamically change .. It looks odd when you have 1 or 2 bars ... the bar looks fat ... where as when you have more then 5 - 6 bar they looks fine .. So for less bar say 1 or 2 bar how to make bar width fixed and also they should not be very far away .. it should be close to each other and also looks fixed sizes .. Just to explain .. Look at the very first image in the thread .. the bars are thin but very far away .. I want something close to each other ...Can i decrease barchartview area anyhow so they are closer to each other and not huge gaps for 1 or 2 bars |
@vigyanhoon How did you managed to get fixed bar width via bar space ?? |
@preetirani Do you mean set the bar in fixed width, no matter how many data ? I just found the solution: // the code is in BarChartViewController.m (BarChartViewController.swift)
_chartView.data = data;
[_chartView setVisibleXRangeMaximum:10]; |
Is there any way we can control space between two dataset bars for graph having large width and only one or two x values? I can change bar width via barspace but not space between bars.
Basically I want to modify bar width only to have smaller width bars than bars with giant width taking entire chart view width.
Following is the graph with two datasets array having only one index each.
![screen shot 2015-10-06 at 12 25 02 pm](https://cloud.githubusercontent.com/assets/8503526/10301980/86fcc368-6c25-11e5-9c77-ed6aa6ed622f.png)
The text was updated successfully, but these errors were encountered: