Dynamic Date formatter?


#1

Hello

is there a way to implement a dynamic Date formatter so that it can show MM-YY or DD-MM-YY based on how wide is the xAxis range?

Thank you

Paolo


#2

Yes.

You can subclass SChartTickLabelFormatter and then override:
-(NSString *)stringForObjectValue:(id)obj onAxis:(SChartAxis *)axis;

You may need to also override dateFormatter to get warnings to go away.