2017-02-16 7 views
-3

棒グラフを指でドラッグすると、ツールチップで棒グラフを実現するにはどうすればいいですか?添付画像にある棒グラフが好きです。棒グラフを目的のcで表示する

私は、目的地cのツールチップを含む棒グラフのライブラリをお勧めします。私はあなたがダニエル・コーエンのiOSチャートに試してみるのが好きだと思うプロットのiOSに来る

Bar chart with tooltip

答えて

0

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]; 

カスタムビューと棒グラフの実装は、このようなものになるだろう

関連する問題