Our XamDataChart has numeric X and multiple numeric Y axes with 5 to 15 curves plotted and also new data points added to each curve at about 1 point per second.
Is there a way to force a series to redraw its curve or to force all of the curves to redraw on the graph?
When we have a transformation operation applied to the graph, such as changing each curve from English units of measure to metric, some, but not all, of the curves do not get redrawn.
Changing from English to metric steps:
For each series on the graph a. nc = new ObservableCollection<DataPoint>() b. For each data point in the series collection nc.Add ( copy the existing data point and then transform the new point units of measure ) c. On the user interface thread { Series.DataCollection = nc }This happens quickly and some of the series do not show up on the graph even though they have data in their collection.We have not been able to determine the root cause but a guess is that it happens when we have multiple data series going to the same Y axis.
HI,
What Version of NetAdvantage are you using?
Does you r DataPoint Class implement INotifyPropertyChanged?
If it does not, you should implement it.
Is it possible for you to instead of creating a new collection, to just update the values in the existing collection? If so then with INotifyPropertyChange, the XamDataChart will update each point.
If you need to create a new collection, you could try settng the new collection to the series before adding data to it.
You could try calling the XamDataChart's UpdateLayout or the Series.UpdateLayout methods.
If these suggestions don't work, can you provide a small isolated sample that replicates this issue.
Sincerely,
Matt Developer Support Engineer
We cannot update each data point indivually since there are up to 200,000 points on the graph and we cannot force the graph to refresh for each data point.
We will look into the series.UpdataLayout and XamDatachart.UpdataLayout.Part of our challenge is that the user may apply the global transform to the graph while real time data is being collected. This should support collecting usually 5 - 15 data curves with 1 new data point for each curve comming in every second at random times during the second.
The chart series should automatically update if you change their data, provided they implement inotifypropertychanged and inotifycollectionchanged for the collection. Also, if you modify axis ranges, etc, it should automatically update the series.
If you are finding that you are making a change that isn't reflected, it could be a bug. So could you submit a small sample that replicates the issue?
If your items or collection are not notifying the chart, then you may need to manually notify the chart that you have modified the bound collections. You could do this by making your collection raise an INotifyCollectionChanged event.
If you are using 12.1, or, I think the latest version of 11.2 then you could call RenderSeries on the series to indicate that it should refresh its visual. But, this should not be necessary if your data sources are notifying the chart in some other manner.
Actually, I see that you are swapping out the whole itemsource at once? Notification events should not be necessary in that instance. Could you provide any kind of repro for this? I haven't witnessed this behavior before.
I am just following up on this post.
Please let me know if you need further assistance.
Sincerely, Matt Developer Support Engineer