Skip to main content

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




Comments

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.