ShinobiChart: How to update a data point?



I am trying to plot realtime feed where I am trying to update the last value slot, but it fails with strange visual artifacts - se pictures below.

First of all I read the blog: but I could not find any API call to update a value, only append last or remove from root - nothing like replace. Anyway my first attempt was trying to use the chart.AppendToEnd(int,int) but it did not work. Next attempt was to update by data and perform a complete reload, and this was not workin either (pcitures below are from this scenario).

(To preserve axis ranges I had to use the hack from:

I am still evaluating ShinobiChart iOS and Android (Xamarin edition), but are concern with the amount of strange issues I have encountered.



Update 2


Hi Lars,

Rather than reloading the data, you should only need to call RedrawChart after appending the data.

If this doesn’t look like its working, check first if the data is being appended, but the axis range is not updated.




Hi Tom,

Appending data (adding to the end) is working fine, but I try to _update_ the last value, that is what not working.



In that case, can you just remove the last point, then add a new one?



This is exactly what I am trying to do, I am removing the last slot of my backing list, then adding a the data point and finally doing the reload/redraw.



Did anyone find a solution to this? Our graph is showing the old data for a few seconds then it will clear and draw the new data. It looks like a mess when trying to update the data. We are only trying to create an equilizer effect. The effect we get is the new set of data ontop of the old set and a straight line connecting the last point of the old set back to the new set. But a count of internal data points shows we don’t have twice the data points. 



Can I check what version of ShinobiCharts you’re using? Up to version 2.5.6, there was a bug which caused the effect of a straight line connecting the last data point back to the first data point. That has been fixed in version 2.5.7. If you’re not working with the latest version of charts, you might find that downloading the latest version might fix the issue you’re seeing.

I hope that helps, let me know how that goes.




A post was split to a new topic: Hot to update a data point

How to update a data point