iOS ShinobiCharts API change question


#1

I have an app which presents several line series charts at the top, and at the bottom has a column chart (tooltip created) which displays all the values from the top series for the specific date the user pressed (a cross section of the values in effect). I used a chart tag to distinguish the charts and for efficiency used the method below to pre-create data points for the larger line charts but returned nil for the column chart. This worked fine under older versions, but when I recompiled under 2.5.7 the bottom chart is blank. I can get things to work if I remove the pre-create method, but of course that reduces performance. Did something change in the interaction of the two methods below? Or do I misunderstand how best to use it? Thanks!

 

(id<SChartData>)sChart:(ShinobiChart*)chart dataPointAtIndex:(int)dataIndex forSeriesAtIndex:(int)seriesIndex;

 

You can pre-create and cache the data points in an array, and present this array to the chart using this method for improved efficiency

(NSArray *)sChart:(ShinobiChart*)chart dataPointsForSeriesAtIndex:(int)seriesIndex;


#2

Hi kklinger,

Sorry to hear you’ve been having problems with these methods. In recent releases, we changed the method definitions slightly to use NSInteger instead of int, which may cause your method signatures not to work properly.

If this doesn’t fix your problem, perhaps you can email us your sample project at info@shinobicontrols.com, so we can better diagnose the issue.