Refreshing chart after ReloadData not working


#1

Currently im stuck on refreshing the chart after a ReloadData.

I have a smart DataSource that changes its data based on the X-Axis, the more zoomed in a user is, the more detailed data the user will see.
This is the method im using after i have recieved new data.
Where Parent is the viewcontroller containing the chart.

 private bool ReloadDataCallBack(string response)
 {
FeedClass DeserFeed = Newtonsoft.Json.JsonConvert.DeserializeObject<FeedClass> (response);
feed = DeserFeed;
//parent.chart.AutoCalculateAxisRanges = false;
parent.chart.ReloadData ();
parent.chart.RedrawChart ();
//parent.chart.RedrawChartAndGL (true);

return true;

}

Now what this does is reloading the data but not refreshing it. I have to pann or zoom in the chart before the reloaded data is visible. On top of that i cannot seem to set the axisrange so the range the user was showed is maintained.

I tried the following delegate method, but its never called.

protected override void OnDidFinishLoadingData (ShinobiChart chart)
{
Console.WriteLine ("FINISH LOADING DATA");
parent.chart.XAxis.SetRange (oldRange.Minimum, oldRange.Maximum);
parent.chart.RedrawChart ();
}

Same with the "OnRenderFinished", also never called.

I know the ugly way, by creating a new chart with the data and replace that one with the old one. But thats not really a good way to solve this problem. It seems highly unlikly that the chart is unable to refresh its view.

Hope there is a solution to this.

Greetins,
Radjoe Ramautar

Edit:
I was testing this only on an iPad 2. It seems that those methods are called on the emulator, but once deployed to a device they stop working. Seems odd… The functionality i wanted works almost flawlessly on the simulator in under 3 days. Sadly it doesnt work on a device =(


#2

Hi Kamikze,

I edited our “GettingStarted” sample application to reload two different datasets on the click of a button. I also added a delegate to my chart and implemented the OnDidFinishLoadingData method.

My chart reloaded its data and redrew as expected. It also called its OnDidFinishLoadingData delegate method as expected.

Are you still having trouble with this? If you are, would it be possible for you to send in a cut down project to demonstrating the issue to info@shinobicontrols.com? This would give me the opportunity to have a look at the issue first hand.

Thanks,
Jan Akerman