I am trying to generate a Horizontal stack bar that has approximately five different color coded "events". I would like to display a horizontal stack that shows what event was present, with respect to time. I am very new to this (sense yesterday) and am having trouble navigating to the correct approach. I would like to dynamically generate the events that are presented in the chart. Currently I have the following XAML:
<telerik:RadCartesianChart x:Name="radChartAction" Palette="Windows8" Margin="0,151,552.2,-0.2">
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis/>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:CategoricalAxis/>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series>
<telerik:BarSeries CombineMode="Stack">
<telerik:BarSeries.DataPoints>
<telerik:CategoricalDataPoint Category="January" Value="5"/>
</telerik:BarSeries.DataPoints>
</telerik:BarSeries>
<telerik:BarSeries CombineMode="Stack">
<telerik:BarSeries.DataPoints>
<telerik:CategoricalDataPoint Category="January" Value="7"/>
</telerik:BarSeries.DataPoints>
</telerik:BarSeries>
<telerik:BarSeries CombineMode="Stack">
<telerik:BarSeries.DataPoints>
<telerik:CategoricalDataPoint Category="January" Value="20"/>
</telerik:BarSeries.DataPoints>
</telerik:BarSeries>
</telerik:RadCartesianChart.Series>
When I attempt to add an additional bar series using the following code behind it appears to have not effect. NOTE: when I Changed stacked to cluster in the code behind the graph shifts down as if to make room for the new series object. However, there is still nothing visible with regard to the programmatically generated bar series.
BarSeries ser = new BarSeries();
ser.Visibility = System.Windows.Visibility.Visible;
ser.CombineMode = Telerik.Charting.ChartSeriesCombineMode.Stack;
//ser.CombineMode = Telerik.Charting.ChartSeriesCombineMode.Cluster;
ser.ValueBinding = new PropertyNameDataPointBinding("50");
ser.CategoryBinding = new PropertyNameDataPointBinding("January");
I would like to also be able to have control over the color for the dynamically generated events. so all of event 1 is color coordinated.
Thanks