I'm having som trouble with custom tooltips when trying to obtain y-values to create custom formatted string. My problem is that I want to have the y-value for a series, which happens to be stacked on top of another series. I'm able to obtain the stacked value, but not the resulting displayed value.
This happens since the y value for a stacked series - in order to display correctly - is calculated with: stack2value - stack1value. I want stack2value not the difference.
I'm using the following function:
- (void)setDataPoint:(id<SChartData>)dataPoint fromSeries:(SChartSeries *)series fromChart:(ShinobiChart *)chart
What I have tried sofar is:
SChartDataPoint *point = (SChartDataPoint *)dataPoint;
NSNumber *num = point.yValue;
Using num from 1) and run it through:
NSString *str = [chart.xAxis stringForValue:num.doubleValue];
Using point from 1) to find index, then run trough some other API function
int idx = point.index;
SChartDataSeries *dataSeries = series.dataSeries;
NSArray *yValues = [dataSeries allYValues];
NSNumber *y = yValues[idx];
Hopefully some of you guys can help me out!