Setting up a Stacked Bar with nested collections

2 posts, 0 answers
  1. Danny
    Danny avatar
    2 posts
    Member since:
    Jan 2012

    Posted 06 Jan 2012 Link to this post


    I don't understand how to set up a stacked bar.
    I need a QueryableCollectionView that contains a list of months with nested lists of department values.

    Public Class MonthDepartmentList
        Public Property Month As String
        Public DepartmentValueList As List(Of DepartmentValue)
        Sub New(_month As String, _departmentValueList As List(Of DepartmentValue))
            Month = _month
            DepartmentValueList = _departmentValueList
        End Sub
    End Class
    Public Class DepartmentValue
        Public Property Department As String
        Public Property Value As Decimal
        Sub New(_department As String, _value As Decimal)
            Department = _department
            Value = _value
        End Sub
    End Class

    I created a list with some example values:

    Dim departmentValueMarch1 As New DepartmentValue("North", 10D)
    Dim departmentValueMarch2 As New DepartmentValue("West", 10D)
    Dim departmentValueMarch3 As New DepartmentValue("South", 10D)
    Dim departmentValuesMarch As New List(Of DepartmentValue)
    Dim marchDepartmentList As New MonthDepartmentList("032011", departmentValuesMarch)
    Dim departmentValueApril1 As New DepartmentValue("North", 10D)
    Dim departmentValueApril2 As New DepartmentValue("West", 11D)
    Dim departmentValueApril3 As New DepartmentValue("South", 8D)
    Dim departmentValuesApril As New List(Of DepartmentValue)
    Dim aprilDepartmentList As New MonthDepartmentList("042011", departmentValuesApril)
    Dim yearDepartmentValues As New List(Of MonthDepartmentList)
    YearData = New QueryableCollectionView(yearDepartmentValues)

    YearData is bound to RadCharts ItemSource.

    How do I get the look of my attached example?
    I have no idea how to set up the SeriesMapping, ItemMapping, YValue, XCategory, CollectionIndex etc
    Do I have to change my classes to make this possible?


  2. Danny
    Danny avatar
    2 posts
    Member since:
    Jan 2012

    Posted 10 Jan 2012 Link to this post

    I've changed my classes and now it works.
Back to Top