2016-09-17 61 views
0

@ daniel.gindi我可以繪製圖表,但只有值沒有顯示酒吧。請你幫我一把。無法顯示BarChart的酒吧

set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@"Energy Values (KWh)"]; 
[set1 setColor:[UIColor cyanColor]]; 
NSMutableArray *dataSets = [[NSMutableArray alloc] init]; 
[dataSets addObject:set1]; 

BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets]; 
[data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:10.f]]; 

data.barWidth = 0.9f; 

self.barChartView.data = data; 

enter image description here

感謝

+0

我使用xcode7.3如果我運行theri示例演示,它顯示了很多錯誤,有可能在xcode 7.3中使用此庫,請讓我知道 – ChenSmile

回答

0

我是用X軸錯誤格式化。 x軸值應該採用年份格式。