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
665
Dynamically creating StackedFragmentSeries of a StackedColumnSeries
posted

Hi there

I need to be able to chart a StackedColumnSeries with variable number of StackedFragments – let’s say up to 6 in MVVM environment. My VM has a collection of objects each having Title, Brush and ValueMemberPath string properties. I would like to bind Series property of StackedColumnSeries to that collection. Unfortunately Series property is readonly.

I’ve seen multiple posts related to similar problem in Silverlight forum ( http://community.infragistics.com/forums/p/64311/325421.aspx, http://community.infragistics.com/forums/t/68280.aspx ) and others but the solution presented there is based on Autogenerate feature of StackedColumnSeries and requited the data to be grouped by, which is not the case for our application. Also it’s not clear how to control the colour and the title of the stacked fragment in this case.

Any suggestions?

 

Regards

Boris

Parents
  • 27093
    posted

    Hello Boris,

     

    I have been looking into your enquiry and currently there is no bindable Series property you can use out of the box. I can suggest either creating a control of your own that inherits from the XamDataChart, to which you can add such a dependency property and synchronize it with the original one, or just have a XamDataChart instance in your view model, that you can access.

     

    Regarding your colouring question you can use the XamDataChart’s Brushes property to provide a collection of brushes that is going to be used automatically or set the Brush property of your StackedFragmentSeries instance.

     

    Please let me know if you require any further assistance on the matter.

Reply Children