Hi,
I have a datasource consisting on date, id, alarm description and alarm count. I need to show the items grouped by alarm description for the legend and also by date in the x axis. This means the x axis will show the id's grouped by date. I'm using silverlight controls. The following is my current code:
radChResults.DefaultView.ChartArea.AxisX.Title = "Alarm Count";
radChResults.DefaultView.ChartArea.AxisY.Title = "Gateway ID";
radChResults.DefaultView.ChartArea.AxisX.AutoRange = true;
radChResults.DefaultView.ChartArea.AxisY.AutoRange = true;
SeriesMapping seriesmapping = new SeriesMapping();
seriesmapping.SeriesDefinition = new HorizontalBarSeriesDefinition();
seriesmapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("GWAlarmDesc"));
seriesmapping.ItemMappings.Add(new ItemMapping("GWayID", DataPointMember.YValue));
seriesmapping.ItemMappings.Add(new ItemMapping("GWAlmCount", DataPointMember.XValue));
radChResults.SeriesMappings.Add(seriesmapping);
Thank you for your help.
radChResults.ItemsSource = ALCSort;
I have a datasource consisting on date, id, alarm description and alarm count. I need to show the items grouped by alarm description for the legend and also by date in the x axis. This means the x axis will show the id's grouped by date. I'm using silverlight controls. The following is my current code:
radChResults.DefaultView.ChartArea.AxisX.Title = "Alarm Count";
radChResults.DefaultView.ChartArea.AxisY.Title = "Gateway ID";
radChResults.DefaultView.ChartArea.AxisX.AutoRange = true;
radChResults.DefaultView.ChartArea.AxisY.AutoRange = true;
SeriesMapping seriesmapping = new SeriesMapping();
seriesmapping.SeriesDefinition = new HorizontalBarSeriesDefinition();
seriesmapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("GWAlarmDesc"));
seriesmapping.ItemMappings.Add(new ItemMapping("GWayID", DataPointMember.YValue));
seriesmapping.ItemMappings.Add(new ItemMapping("GWAlmCount", DataPointMember.XValue));
radChResults.SeriesMappings.Add(seriesmapping);
Thank you for your help.
radChResults.ItemsSource = ALCSort;