In order to do this you would want to set the .minimum, .maximum, and .interval properites on the yAxis.
_defaultSeries.yAxis.minimum = 0;
_defaultSeries.yAxis.maximum = 100;
_defaultSeries.yAxis.interval = 10;
I am setting the min, max and interval parameters but when i do that, chart gets distorted.
I am using the following code to setup the chart; when i remove the min and maximum, i see the indicator without problem. Can hou help me, what i am missing?
IGFinancialPriceSeries *financialPriceSeries = (IGFinancialPriceSeries *)[infraChart addSeriesForType:[IGFinancialPriceSeries class] usingKey:@"financialPriceCandlestickSeries" withDataSource:source firstAxisKey:@"xAxis" secondAxisKey:@"yAxis"];
financialPriceSeries.xAxis.labelsVisible = financialPriceSeries.yAxis.labelsVisible = NO;
financialPriceSeries.displayType = IGPriceDisplayTypeCandlestick;
financialPriceSeries.outline = [[IGBrush alloc] initWithColor:[[UIColor alloc] initWithWhite:0.5 alpha:1.0]];
financialPriceSeries.transitionDuration = 1.0;
financialPriceSeries.xAxis.majorStroke = [[IGBrush alloc] initWithColor:[INVColor getColorFromHex:@"dbdbdb"]];
financialPriceSeries.yAxis.majorStroke = financialPriceSeries.xAxis.minorStroke;
financialPriceSeries.brush = [[IGBrush alloc]initWithColor:[INVColor getColorFromHex:@"009343"]];
financialPriceSeries.negativeBrush = [[IGBrush alloc]initWithColor:[INVColor getColorFromHex:@"fd4040"]];
financialPriceSeries.outline = [[IGBrush alloc] initWithColor:[UIColor clearColor]];
financialPriceSeries.dataSource = source;
financialPriceSeries.xAxis.labelsVisible = NO;
And then
IGSlowStochasticOscillatorIndicator *financialIndicator = (IGSlowStochasticOscillatorIndicator*) [infraChart addSeriesForType:[IGSlowStochasticOscillatorIndicator class] usingKey:@"financialIndicator" withDataSource:source firstAxisKey:@"xAxisIndicator" secondAxisKey:@"yAxisIndicator"];
financialIndicator.xAxis.labelsVisible = financialIndicator.yAxis.labelsVisible = YES;
financialIndicator.thickness = 3.0f;
financialIndicator.transitionDuration = 1.0;
financialIndicator.negativeBrush = [[IGBrush alloc] initWithColor:negativeColor];
financialIndicator.brush = financialIndicator.negativeBrush;
financialIndicator.xAxis.minorStroke = [[IGBrush alloc]initWithColor:[INVColor getColorFromHex:@"dbdbdb"]];
financialIndicator.yAxis.minorStroke = financialIndicator.xAxis.majorStroke;
financialIndicator.trendLineBrush = [[IGBrush alloc] initWithColor:trendlineColor];
financialIndicator.trendLineThickness = 2;
financialIndicator.xAxis.majorStrokeThickness = .5;
financialIndicator.yAxis.majorStrokeThickness = .5;
financialIndicator.xAxis.minorStrokeThickness = .5;
financialIndicator.yAxis.minorStrokeThickness = .5;
financialIndicator.xAxis.strokeThickness = .5;
financialIndicator.yAxis.strokeThickness = .5;
financialIndicator.yAxis.minimum = minVal;
financialIndicator.yAxis.maximum = maxVal;
financialIndicator.yAxis.interval = step;
financialIndicator.xAxis.labelsVisible = NO;