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;
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);
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.
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 =(