SChartDelegate - SchartRenderFinshed called twice



Im using Shinobi Charts v 2.5.6. I noticed (even in your simple example with trigonometric curves) that if I call reload data and then redraw on the chart this will fire one renderStartedWithFullRedraw and two renderFinshed actions - in contrast if I only use redraw then i get a typical renderStarted -> renderFinished in 1:1. Above that thee fullRedraw is always true. What is the workflow of those delegates? In my use case the redrawStarted can get fired twice and the rendere finished can get fired three times! Could you provide more detail - what has an impact on the number of delegate fired? 


Could you provide some help on this subject? It is essential so i can add/remove data on the fly depending on user selection and do not violate the series index. Workflow of the renderStarted->finished while reloading data would be really nice (and in any other ocasion).


Hi Okipol,

Thank you for raising this issue with us. To be honest, this looks like a bug in our system, the renderFinished delegate method shouldn’t be getting called more than once on a chart redraw, regardless of whether the chart data has been reloaded or not. I’ve raised an issue in our backlog to address this.

The current behaviour is as you’ve seen. If you just redraw the chart without a reload, then you get the behaviour you’d expect - you get a single call to renderStarted, followed by a single call to renderFinished.

If you reload your data then redraw your chart, you get a single call to renderStarted, followed by two calls to renderFinished. When we’ve finished reloading data, we make another call to render the chart canvas, which causes the extra call to the delegate. The bug is that renderFinished shouldn’t be called on the delegate until we’ve completely finished rendering, which doesn’t appear to be the case at the moment.

Apologies for the unexpected behaviour you’ve seen, I hope this explanation has helped. We’ll let you know when this issue has been addressed.