diff --git a/Source/BarGraph/GKBarGraph.m b/Source/BarGraph/GKBarGraph.m index b947002..c0f3b41 100644 --- a/Source/BarGraph/GKBarGraph.m +++ b/Source/BarGraph/GKBarGraph.m @@ -97,10 +97,14 @@ - (void)_construct { if ([self _hasLabels]) [self _removeLabels]; [self _constructBars]; - [self _constructLabels]; - [self _positionBars]; - [self _positionLabels]; + + if([self.dataSource respondsToSelector:@selector(titleForBarAtIndex:)]) + { + [self _constructLabels]; + [self _positionLabels]; + } + } - (BOOL)_hasBars {