I have a collection of objects that contain everything that I need to create a series and I want to use a DataTemplate to create series for however many objects are in the collection. Unfortunately, it seems that there are no DataTemplate examples in any of your explanations and I don't know if this is even possible.
Is it possible to create a number of series at runtime using DataTempates?
Hello Ed,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
After reviewing the multiple series examples, I was forced to change from a MVVM ViewModel which contained the data, to the less desirable data code behind. I am almost finished with the changeover, but I feel this is far from ideal.
I was also hoping I could place all of my Series into the SeriesCollection and have them automatically displayed, but I don't see how to bind the SeriesCollection with the XamDataSource or ItemsSource.
Additionally, the documentation link for SeriesCollection is broken, so I can't review any code samples about this.
Thank you for the sample code, it was very helpful. I am having a problem with additions to the DataTable not showing up in the XamDataChart. Is there another step that needs to occur in order for live DataTables to display series in the XamDataChart?
Thanks,
Ed
I am not aware of a specific step that needs to be done in order to achive the functionality you want. Basically it doesn't matter how your DataTable is filled, static or dynamic, if you follow the approach I gave yo uin my previos post, everything should works correctly.
That's the problem, I updated your example to add rows to your DataTable on a DispatchTimer expecting to see them represented in the xamDataChart and there were no updates. I attached the modified project for your viewing here.
Ooops! I made a mistake with the file link, here is the correct link here
I have logged this with development under ID: 128170 and I have also created a support ticket on your behalf: CAS-104366-S0R1H4 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://ko.infragistics.com/Membership/MySupport.aspx
Hi Team,
Can we display dynamic multiple series in bar chart type.Do you have any sample to do that.
Regards,
Sridhar
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thanks Stefan, I will use this information moving forward!
Our developers said that this behavior is expected since the DataTable doesn't implement INotifyPropertyChanged interface and the XamDataChart cannot be notified when the DT changes, so I can suggest you use reset the DataContext like this in the timer_Tick event handler:
private void timer_Tick(object sender, EventArgs e) { int x, y; x = rand.Next(3, 23); y = rand.Next(3, 26); table.Rows.Add(new object[] { "Point", x, y }); this.DataContext = null; this.DataContext = table.DefaultView; }
Hope this heslp you.
Thank you much for your help Stefan!