There seems to be a bug in the SChartCategoryAxis class that doesn’t allow the initial view of the graph to use a set minimum and maximum range. If in the code below I use SChartNumberAxis, then it works perfectly and shows the subset of category values. Switching it back to SChartCategoryAxis causes the complete category range to appear when the chart is displayed. If this is a bug, do you have a workaround?
SChartNumberRange *r = [[SChartNumberRange alloc] initWithMinimum:[NSNumber numberWithInt:minimumRange] andMaximum:[NSNumber numberWithInt:maximumRange]]; SChartCategoryAxis *xAxis = [[SChartCategoryAxisalloc] initWithRange:r];
Additional Information: The category axis categories array is empty until the second reload and redraw of the chart. If I load the chart a second time and try to set a range min and max, then it works. I can’t figure out a shortcut to getting the first pass to set the min and max range. It simply reports that it can’t find a category for the indexes.