previously (2.2.5?) i was using the code below to set my labels at the bottom with dates. how can i do this with 3.0?
NSMutableArray<NSString *> *dates = [NSMutableArray array];
divChartData = [[CombinedChartData alloc] initWithXVals:dates];
i figured it out
- (NSString *)stringForValue:(double)value axis:(ChartAxisBase *)axis{
return dates[(int)value % dates.count];
}
and
cell.chartView.xAxis.valueFormatter = self;
Previously i was able to get my data, put them into entries, entries into dataset all in one method, now with stringForValue:axis: my dates array has to be an instance variable. Is there any specific reason for such a change?
If you look at the release notes for 3.0 there might be the reasoning there. I don't remember off the top of my head.
Theres no reasoning for this on the release notes. Though I'm sure there was good reason for this, it'd be nice to know what that is because from a user standpoint, it's kind of a head ache.
The reasoning is that you don't pass the x values you want on the axis anymore. You pass the x values in the entry and then format the axis to show the value. The reason was to better handle floating point values.
ah ok, that does make sense i guess. thanks for the explanation
Most helpful comment
The reasoning is that you don't pass the x values you want on the axis anymore. You pass the x values in the entry and then format the axis to show the value. The reason was to better handle floating point values.