This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
Sample Project/SimpleLineChart Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 170170@property (nonatomic ) BOOL autoScaleYAxis;
171171
172172
173- // / Draws a translucent vertical lines along the graph for each X-Axis label, when set to YES. Default value is NO.
174- @property (nonatomic ) BOOL enableReferenceAxisLines;
173+ // / Draws a translucent vertical lines along the graph for each X-Axis when set to YES. Default value is NO.
174+ @property (nonatomic ) BOOL enableReferenceXAxisLines;
175+
176+ // / Draws a translucent horizontal lines along the graph for each Y-Axis label, when set to YES. Default value is NO.
177+ @property (nonatomic ) BOOL enableReferenceYAxisLines;
175178
176179/* * Draws a translucent frame between the graph and any enabled axis, when set to YES. Default value is NO.
177- @see enableReferenceAxisLines must be set to YES for this property to have any affect. */
180+ @see enableReferenceXAxisLines or enableReferenceYAxisLines must be set to YES for this property to have any affect. */
178181@property (nonatomic ) BOOL enableReferenceAxisFrame;
179182
180183
Original file line number Diff line number Diff line change @@ -437,13 +437,12 @@ - (void)drawLine {
437437 } else {
438438 line.xAxisBackgroundColor = self.colorBackgroundXaxis ;
439439 }
440- if (self.enableReferenceAxisLines == YES ) {
441- if (self.enableReferenceAxisFrame ) line.enableRefrenceFrame = YES ;
442- else line.enableRefrenceFrame = NO ;
440+ if (self.enableReferenceXAxisLines || self.enableReferenceYAxisLines ) {
441+ line.enableRefrenceFrame = self.enableReferenceAxisFrame ;
443442
444443 line.enableRefrenceLines = YES ;
445- line.arrayOfVerticalRefrenceLinePoints = xAxisLabelPoints;
446- line.arrayOfHorizontalRefrenceLinePoints = yAxisLabelPoints;
444+ line.arrayOfVerticalRefrenceLinePoints = self. enableReferenceXAxisLines ? xAxisLabelPoints : nil ;
445+ line.arrayOfHorizontalRefrenceLinePoints = self. enableReferenceYAxisLines ? yAxisLabelPoints : nil ;
447446 }
448447
449448 line.frameOffset = self.XAxisLabelYOffset ;
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ - (void)viewDidLoad {
5757 self.myGraph .enableYAxisLabel = YES ;
5858 self.myGraph .autoScaleYAxis = YES ;
5959 self.myGraph .alwaysDisplayDots = NO ;
60- self.myGraph .enableReferenceAxisLines = YES ;
60+ self.myGraph .enableReferenceXAxisLines = YES ;
61+ self.myGraph .enableReferenceYAxisLines = YES ;
6162 self.myGraph .enableReferenceAxisFrame = YES ;
6263 self.myGraph .animationGraphStyle = BEMLineAnimationDraw;
6364
You can’t perform that action at this time.
0 commit comments