Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
Updating model behind ChartGridView
posted

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.

Parents Reply Children