I am using the coreplot for displaying the graph in iPhone. I want to display the label(10,20,30 .. ) properly in the plotArea. Currently, The bar and label are displaying in uneven format. How to solve this ?
Code :
x.axisLineStyle = nil;
    x.majorTickLineStyle = nil;
    x.minorTickLineStyle = nil;
    x.majorIntervalLength = CPDecimalFromString(@"10");
    x.orthogonalCoordinateDecimal = CPDecimalFromString(@"0");
    x.title = @"Age Limit";
    x.titleLocation = CPDecimalFromFloat(30.0f);
    x.titleOffset = 35.0f;
    x.la开发者_如何学CbelRotation = M_PI/2;![enter image description here][1]
    x.labelOffset = 5.0f;

Two things I would check:
Make sure the
barOffsetproperty of your bar plot is zero (0).Verify that the locations returned by your datasource are what you expect (0, 10, 20, etc.).
Eric
i think you need to maintain array rightly.
currently you having an array xAxisLabels(if you follow code from net) or other one for showing texts labels on x axis you need to remove first value that is 0.0 and then adjust x axis (CPXYAxis) properties according to you.
Its better to use the following method instead of using lables....
plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromInteger(0) length:CPDecimalFromInteger(15)];
Otherwise there is the example in coreplot framework itself for x-axis with label text.....
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
 加载中,请稍侯......
      
精彩评论