Hi, using the Android Infragistics toolkit, DataChartView. I have a RangeAreaSeries and a LineSeries that are displaying okay, except that as I add elements to the backing model I'm getting a strange horizontal mirroring of the chart. See this pic -- left side is the actual data and the right side is a mirror of the data reversed (minus the timestampy labels).
https://dl.dropboxusercontent.com/u/56947838/temp.png
I don't have much documentation to go on, but what I'm doing is as I add data to the model, I notify each series of the updated element using this call:
mSeries.notifyInsertItem(i, mValues.get(i));
where 'i' is the last index of the added data. For example, if I started with two elements of data and added a 3rd, the effective call would be:
mSeries.notifyInsertItem(2, mValues.get(2));
and mValues.get(2) returns my last row.
Am I notifying the chart/series correctly about the updated data? I'm adding data relatively quickly so I don't want to recalculate the entire chart. If I invalidate everything then the chart displays properly, albeit slowly as the data set increases.
Thanks.
Hi Rob, thank you. I wanted to verify that I was using the notify() APIs correctly before building a standalone repro. I'll try to come up with that and get back to you.
Hi Ben,
notifyInsertItem should be doing the trick. Can you provide me with some more detail about your setup? Currently I'm trying to reproduce this but I haven't had any luck. At the start of my app, I already have some data in the chart. On a button press I add more points to the series data and after each point I'm calling notifyInsertItem. When this happens I can see the new point added to the series, but I don't see any mimicking on the right side of the chart. The jar files I'm using are the ones from the Infragistics website so they should be the same ones you are using.