Skip to content

Commit

Permalink
Fix Simple Bar Chart Demo, switch use of x and y values (ChartsOrg#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
franqueli authored and liuxuan30 committed Apr 19, 2017
1 parent 33b0811 commit f63fa6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ChartsDemo/Classes/Demos/BarChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ - (void)setDataCount:(int)count range:(double)range
double mult = (range + 1);
double val = (double) (arc4random_uniform(mult));
if (arc4random_uniform(100) < 25) {
[yVals addObject:[[BarChartDataEntry alloc] initWithX:val y:i icon: [UIImage imageNamed:@"icon"]]];
[yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:val icon: [UIImage imageNamed:@"icon"]]];
} else {
[yVals addObject:[[BarChartDataEntry alloc] initWithX:val y:i]];
[yVals addObject:[[BarChartDataEntry alloc] initWithX:i y:val]];
}
}

Expand Down

0 comments on commit f63fa6d

Please sign in to comment.