Hi,
I'm trying to create the attached mockup but I'm having issues hiding the last major stroke of the y axis and extending the strokes a bit so that they do not end exactly at the topmost x axis major stroke. To hide the last major stroke I'm trying to do a workaround by adding a dummy right axis. But it's getting added to the left side. Please see the code below:
IGNumericYAxis *y2 = [[IGNumericYAxis alloc]initWithKey:@"y2"]; y2.minimum = 0; y2.maximum = 1; y2.majorStrokeThickness = 0; y2.stroke = [[IGBrush alloc] initWithColor:[UIColor purpleColor]]; y2.strokeThickness = 20.0f; y2.labelsVisible = NO; y2.labelsLocation = IGAxisLabelsLocationOutsideRight; [_chart addAxis:y2];
As for the stroke extension, is this something that could be done?
Hi Anna,
I think the easiest way to get your vertical gridlines to extend past the topmost line is to set the range and interval on your y axis, like this:y.minimum = 0;y.maximum = 5.1;y.interval = 1;There isn't really a way to remove any specific gridlines from an axis, because all gridlines are part of the same geometry, but I think the above method should help you get what you want. As for the location of your secondary y axis, setting labelsLocation only affects axis labels and not the axis line itself. Typically, axis lines cross in the bottom left corner or at 0. Axes have crossingAxis and crossingValue properties for when you want to adjust where they meet.
This is what I'm getting: