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
1230
Dynamic charts with stacked series
posted

Good day,

We have a seemingly unique implementation for the XamDataChart, building charts with multiple series generically given any data and metadata.

This approach has some drawbacks, since none of the examples here can be applied directly.

I am currently struggling with implementing a stacked chart (area, column, etc.).  I have tried adding StackedFragmentSeries for every group as well as using the Infragistics.GroupBy object.

The object I use for data points is as follows:

public class ChartDataPoint2DGrouped
{
    public string Label { get; set; }
    public string Colour { get; set; }
    public object AxisXValue { get; set; }
    public string AxisXValueFormatted { get; set; }
    public object AxisYValue { get; set; }
    public string AxisYValueFormatted { get; set; }
    public string GroupByValue { get; set; }
}

I set the chart series ItemsSource property as follows where 'context' is a populated List<ChartDataPoint2DGrouped>:

chartSeries.ItemsSource = new Infragistics.GroupBy
{
    GroupMemberPath = "GroupByValue",
    KeyMemberPath = "AxisXValue",
    ValueMemberPath = "AxisYValue",
    ItemsSource = context
};

No rendering of the chart occurs though - even if I set AutoGenerateSeries = true.

Am I missing something in particular?

Thanks!