ShinobiChart: How to update a data point?


#1

Hi

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: http://www.shinobicontrols.com/blog/posts/2013/02/12/plotting-live-data-with-shinobicharts/ 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: http://www.shinobicontrols.com/forum/shinobicontrols/2013/6/how-preserve-zoom-state-/)

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

Regards
Lars 

Update

Update 2


#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.

Regards,

Tom.


#3

Hi Tom,

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

Regards
 Lars


#4

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


#5

Hi,

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.

Regards
Lars


#6

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. 


#7

Hi,

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.

Regards,

Dan


#8

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


How to update a data point