Closed mrxprt closed 8 years ago
It's a good idea to check the ChartDemo for questions like these. For instance, if you look at the LineChart1ViewContoller, you'll see that it has limit lines, which I think will accomplish what you want. Here's a snippet from the Demo that might help.
ChartLimitLine *ll1 = [[ChartLimitLine alloc] initWithLimit:130.0 label:@"Upper Limit"];
ll1.lineWidth = 4.0;
ll1.lineDashLengths = @[@5.f, @5.f];
ll1.labelPosition = ChartLimitLabelPositionRightTop;
ll1.valueFont = [UIFont systemFontOfSize:10.0];
ChartLimitLine *ll2 = [[ChartLimitLine alloc] initWithLimit:-30.0 label:@"Lower Limit"];
ll2.lineWidth = 4.0;
ll2.lineDashLengths = @[@5.f, @5.f];
ll2.labelPosition = ChartLimitLabelPositionRightBottom;
ll2.valueFont = [UIFont systemFontOfSize:10.0];
ChartYAxis *leftAxis = _chartView.leftAxis;
[leftAxis removeAllLimitLines];
[leftAxis addLimitLine:ll1];
[leftAxis addLimitLine:ll2];
yep, it's either limitline or guide line, both supported.
Extremely thank full , you are right i have to check the Demos but i was building a POC with a very Limited time , really you saved my day 👍
Hi ,
it's not an issue . am just wandering if i can draw a line horizontally on Bar Chart like that in image
thanks