Obtain y values for custom tooltips with stacked series


#1
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:
 
1) 

SChartDataPoint *point = (SChartDataPoint *)dataPoint;

NSNumber *num = point.yValue;

2)
Using num from 1) and run it through:

NSString *str = [chart.xAxis stringForValue:num.doubleValue];

3)
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!

Thx


#2

Try using the other method on the tooltip:

- (void) setResolvedDataPoint:(SChartPoint)datapoint fromSeries:(SChartSeries *)series fromChart:(ShinobiChart *)chart

The datapoint argument provides you with the stacked position of the crosshair. Hope this helps.

Cheers!

Rob