Ganesh Kumar Ganesh Kumar - 1 year ago 142
Objective-C Question

Core plot graph with grid lines in ios 8.1

How to get graph shown below in the image using core plot in iOS 8.1.
I tried for custom labels in x axis

x.labelingPolicy = CPTAxisLabelingPolicyNone;

But I didn't get how to get the grid lines vertically in the graph?

Help me with this

enter image description here

Answer Source
//Add plot space

    CPTXYPlotSpace *plotSpace       = (CPTXYPlotSpace *)graph.defaultPlotSpace;

    plotSpace.delegate              = self;

    plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromInt(0.0) length:CPTDecimalFromInt(25)];

then change x axis label policy like this

x.labelingPolicy = CPTAxisLabelingPolicyFixedInterval;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download