ios7.1 - Core Plot 1.4 - Reduce the gap between Y-axis and X-axis labels -


I am trying to implement core plot in my iOS application.

1) When my app is run, it should start with the graph (0,0). Because at present it is not displayed anywhere which is not visible. Then I changed the boolean value down in ya and then I saw the scroll and the line which was way above the origin.

  "plotSpace.allowsUserInteraction = Yes;.  
< P> 2) I can manually adjust the position between X-axis and 2-digit on Y-axis lines.

Here is the code that I have to follow the tutorial for the article of WikiLeaks Wenderlich Tried, but as you see I can see only one line in the image. Other lines For that I need to pull up and down to see other lines. And special thanks to Eric Schoch and his team for their wonderful work. Thanks

  //////// Configure X-X CPSTXXis * xAxis = [axisSet XAxis] CPTAxis * x = axisSet.xAxis; x.title = @ ""; x.titleTextStyle = axisTitleStyle; x.titleOffset = 5.0f; x.labelOffset = 5.0f; x.axisLineStyle = axisLineStyle; X.labelingPolicy = CPTAxisLabelingPolicyAutomatic ; X.labelTextStyle = Axis Textstate; X.majorTickLineStyle = Axis Lineline; X.majorTickLength = 4.0f; X.labelRotation = 45.0f; CGFloat dateCount = [Day count]; NSMutableSet * xLabels = [NSMutableSet Set with Capacity: Datacount]; NSMutableSet * xLocations = [NSMutableSet Set with Capacity: dateCount]; NSInteger i = 0; For (NSString * date in dayArray) {CPTAxisLabel * label = [[CPTAxisLabel alloc] initWithText: date textstyle: x.labelTextStyle]; CGFloat location = i ++; Label.tickLocation = CPTDecimalFromCG Float (location); Label.offset = x.majorTickLength; If (label) {[xLabels addObject: label]; [XLocations addObject: [NSNumber Number blast: Location:]]; }} X.axisLabels = xLabels; X.majorTickLocations = xLocations; //////// Y-axis CPTaxis * y = axis Asset.exe; Y.title = @ "HB"; Y.titleTextStyle = axisTitleStyle; Y.titleOffset = -50.0f; Y.axisLineStyle = Axolystyle; Y.majorGridLineStyle = Gridlines Style; Y.labelingPolicy = CPTAxisLabelingPolicyLocations provided; Y.labelTextStyle = Axis Textile; Y.labelOffset = -0.0f; Y.majorTickLineStyle = axisLineStyle; Y.majorTickLength = 1.0f; Y.minorTickLength = 1.0f; NSInteger key increment = 2; NSInteger minor increase = 2; CGFloat yMax = 30.0f; NSMutableSet * yLabels = [NSMutableSet Set]; NSMutableSet * yMajorLocations = [NSMutableSet Set]; NSMutableSet * yMinorLocations = [NSMutableSet Set]; (NSInteger j = 0; j & lt; = yMax; J + = minor increase) {NsiIntergere Mod = J% Major Incident; If (modern == 0) {CPTAxisLabel * label = [[CPTAxisLabel alloc] initWithText: [NSString stringWithFormat: @ "% i", J] textstyle: y.labelTextStyle]; NSDecimal Location = CPTDecimalFromInteger (j); Label.tickLocation = Location; Label.offset = -y.majorTickLength-y.labelOffset; If (label) {[yLabels addObject: label]; } [YMajorLocations addObject: [NSDecimalNumber decimalGroupWidth decimal: location]]; } Other {[yMinorLocations addObject: [NSDC ChamberNumber Decimal Decimal Feature: CPTDecimalFromInteger (j)]]; }} Y.axisLabels = yLabels; Y.majorTickLocations = yMajorLocations;  

If you want to provide a custom axis label, then labelingPolicy :

  x.labelingPolicy = CPTAxisLabelingPolicyNone; Y.labelingPolicy = CPTAxisLabelingPolicyNone;  

Automated labeling policy sets the tick location and label on "good" values ​​based on the length of the plot boundary. The conditions on the places you provided automatically form the label provided for the locations provided.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -