Hi guys,
I'm new to infragistics, I'm using 13.2. I have a WPF application where I want to use a stacked bar data chart but I want to place a dynamic number of series (Max approx. 1000) on the chart but all in line with each other as they will continue from the previous element.
I also need to be able to choose from 3 colours in terms of I have 3 states which need to be identified on a legend for the chart as well.
Thanks in advanced.
Sorry I can now see my data, however my issue of colours still apply.
I need to be able to bind or apply a brush to dynamically created series' based upon a property of the data.
Any advice is greatly appreciated.
Hello Steve,
I'm having difficultly picturing your visual data. Please provide a mockup/screenshot of the desired behavior and post in this thread. You will most likely need to use the SeriesCreated event on the StackedColumnSeries since you are autogenerating the fragment series dynamically. The generated StackedFragmentSeries will be passed as the sender to the event so you can set whatever properties you need to on this object, including the brush it uses.
Let me know if you have any additional quesitons regarding this matter.
See below as an example for what I'm trying to do but this is all one bar hence the stackedbar series. It keeps going and can be any of the 3 states at any time.
Sorry, see attached screenshot.
Thank you very much for following up. I've attached a sample that demonstrates how to style each fragment series based on a unique property defined. The Gap property on the CategoryXAxis will also eliminates the space between the left and right of each series.
Please review my sample, linked below, and let me know if you have any questions.
Thanks for the reply.
I've looked at your example and I can see what you've done however I'm implementing MVVM and my collection is an observable collection within a view model. I also have an add button which takes the user to a separate screen to enter the data to then be added to the collection. Obviously I want this graph to be automatically updated.
Any advice on how to implement this?
Regards.
Hello,
Thank you for following up. The XamDataChart responds to the datasource events provided and will attempt to keep the chart's visual data updated. The ViewModel that is bound to the chart needs to implement INotifyPropertyChanged for the UI to update automatically. There is nothing additional you have to do in the UI.
You can refer to this post for more details on insuring live updates are propagated to the UI.
http://www.infragistics.com/community/forums/p/43595/251071.aspx#251071
Let me know if you have any additional questions.