2017-02-16 97 views

回答

0

當談到iOS的策劃我想你想給一個嘗試丹尼爾·科恩的iOS圖表:

https://github.com/danielgindi/Charts

完全可定製的和大量的款式和圖表視圖,快捷, objective-c,也可用於android。我建議你看看演示項目,以全面瞭解這個庫的工作原理。

與自定義視圖條形圖的實施將是這樣的:

MPBarsGraphView *barPlot1 = [MPPlot plotWithType:MPPlotTypeBars frame:CGRectMake(0, 0, width, height)]; 
    barPlot1.minValue = 0; 
    barPlot1.maxValue = 35; 
    barPlot1.waitToUpdate = YES; 
    barPlot1.showTopLabels = YES; 
    barPlot1.topValues = @[@"25.7",@"27.8",@"28.7",@"31.2"]; 
    barPlot1.values = @[@25.7,@27.8,@28.7,@31.2]; 
    barPlot1.graphColor = [UIColor yourColor]; 
    barPlot1.detailView = [UIView yourView]; 
    [self.view addSubview:barPlot1]; 
相關問題