Skip to main content

Posts

Showing posts with the label axis

Y axis positioning

I have added extra y axis in the graph. When i am trying to display the graph the added Y axis is not visible. I am able to draw graph with that y axis. How can i make that Y axis visible? My code is as below.. CPTXYAxis *rightY = [[CPTXYAxis alloc] init]; rightY.coordinate = CPTCoordinateY; rightY.orthogonalCoordinateDecimal = CPTDecimalFromFloat(3600 * 7); //rightY.majorGridLineStyle = lineStyle; rightY.axisLineStyle = lineStyle2; [rightY setAxisTitle:[[CPTAxisTitle alloc] initWithText:@"New Axis" textStyle:whiteText]]; rightY.gridLinesRange = [[CPTPlotRange alloc] initWithLocation:CPTDecimalFromInt(0) length:CPTDecimalFromInt(15)]; rightY.plotSpace = plotSpace1; NSMutableArray *newAxes = [graph.axisSet.axes mutableCopy]; [newAxes addObject:rightY]; graph.axisSet.axes = newAxes; [newAxes release]; [graph addPlotSpace:plotSpace1];