Skip to content

Instantly share code, notes, and snippets.

@Ramshandilya
Created September 22, 2015 04:06
Show Gist options
  • Save Ramshandilya/4dd7ae8e500d1edb4266 to your computer and use it in GitHub Desktop.
Save Ramshandilya/4dd7ae8e500d1edb4266 to your computer and use it in GitHub Desktop.
# pragma mark - APCBarCharViewDataSource
- (NSInteger)barGraph:(APCLineGraphView *)graphView numberOfPointsInPlot:(NSInteger)plotIndex
{
return 6;
}
- (NSInteger)numberOfPlotsInBarGraph:(APCLineGraphView *)graphView
{
return 1;
}
- (APCStackedDataPoint *)barGraph:(APCLineGraphView *)graphView plot:(NSInteger)plotIndex valueForPointAtIndex:(NSInteger)pointIndex
{
NSInteger random1 = arc4random() % 70;
NSInteger random2 = arc4random() % 20;
NSInteger random3 = arc4random() % 10;
APCStackedDataPoint *stackedData = [[APCStackedDataPoint alloc] initWithStackedValues:@[@(random1), @(random3), @(random2)]];
return stackedData;
}
- (CGFloat)maximumValueForBarGraph:(APCBarGraphView *)graphView
{
return 100;
}
- (CGFloat)minimumValueForBarGraph:(APCBarGraphView *)graphView
{
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment