-
-
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
Unable to display empty bars in barcharts #911
Comments
So basically, if you are drawing a bar on the x-Axis, it should calculate the space/gaps based on the x-axis maximum or chart width before drawing the bar at that point.
it doesn't seems to do this, instead it draws the bar to fill the entire width and recalculate the bar widths when new points is added to the dataset. |
I don't understand what the problem is here. |
You don't have to add values for each xIndex. |
@danielgindi I've a requirement to display bar at a particular x-axis, for example: I've got an x-axis in the range of What I want to do is for each update, draw a bar at a particular point once data is available and putting spaces between those points with no data:
|
So where is the problem?... |
Are you looking for ignoring bars at specific index? for (int i = 0; i < biodata.count; i++)
{
float y = ...
NSInteger xIdx = ....
if ([self hasDataAt:xIndx]) {
BarChartDataEntry *entry = [[BarChartDataEntry alloc] initWithValue:val xIndex:xIdx];
[_yAxisVals addObject:entry];
}
} should do the job. |
I think this can be closed. If it's a bug you think, just reopen |
Failed to draw bar at specify xIndex when there is no data in between.
The text was updated successfully, but these errors were encountered: