2016-05-08 3 views
1

私は自分のアプリケーションにMPAndroidChartsとios-chartsを使用しています。 I need additional absciss at custom y!=0 to be drawed. And it would be great if points above that level will painted to custom color.グリッドに追加の横棒を描画するには?

これを実現するには?あなたは追加の行として限界線を使用することができます

+0

あなたには、いくつかのスクリーンショットを作成し、そこに何のいくつかの例を描くことができますあなたは達成したいですか? – keyv

+0

画像にリンクが追加されました –

答えて

0

は、次のようになめらか:

ChartLimitLine *ll1 = [[ChartLimitLine alloc] initWithLimit:YOUR_NUMBER label:@""]; 
ll1.lineColor = [UIColor greenColor]; 
ll1.lineWidth = 1.0; 

は、円の色を変更するには、あなたがLineChartRendererprivate func drawCircles(context context: CGContext)方法を変更する必要があります。

forループラインであります。

CGContextSetFillColorWithColor(context, dataSet.getCircleColor(j)!.CGColor) 

あなたが好きなめらかにそれを変更することができます。

if e.value > YOUR_VALUE { 
    CGContextSetFillColorWithColor(context, UIColor.greenColor().CGColor) 
} 
else { 
    CGContextSetFillColorWithColor(context, dataSet.getCircleColor(j)!.CGColor) 
} 

And will be smth like this:

関連する問題