I created a simple RadChart with the following code that binds to a collection of data. The x-axis binds to Date property of DateTIme and the y-axis binds to Quantity property of type Int. When I try and set a property in ChartARea.AXisX, the UI is not updated. For example, I try and set LabelRotationAngle = 45. Nothing happens. What I see in the x-axis since it is bound to DateTIme values, is LongDateTime format values which is making the x-axis all messy. I set DefaultLabelFormat="dd-MMM" but the UI doesn't get updated again.
Can anyone figure out why my chart is not getting updated in the UI. I've looked at all the Chart Sample Demo's and my XAML looks pretty much the same. Not sure what I'm doing wrong where the UI does not updated.
Thanks
<telerikChart:RadChart Grid.Row="1" Foreground="White" Background="Transparent" x:Name="RadChart1" ItemsSource="{Binding MetricSum}">
<telerikChart:RadChart.DefaultView>
<Charting:ChartDefaultView>
<Charting:ChartDefaultView.ChartArea>
<Charting:ChartArea LegendName="chartLegend">
<Charting:ChartArea.AxisX>
<Charting:AxisX AutoRange="True" Step="5" DefaultLabelFormat="dd-MMM" LabelRotationAngle="45" IsDateTime="True"
LayoutMode="Normal" LabelStep="5" TicksDistance="100" Title="XAxis Title">
</Charting:AxisX>
</Charting:ChartArea.AxisX>
</Charting:ChartArea>
</Charting:ChartDefaultView.ChartArea>
<Charting:ChartDefaultView.ChartLegend>
<Charting:ChartLegend x:Name="chartLegend" Header="Legend" UseAutoGeneratedItems="True" />
</Charting:ChartDefaultView.ChartLegend>
<Charting:ChartDefaultView.ChartTitle>
<Charting:ChartTitle Content="" HorizontalAlignment="Left" />
</Charting:ChartDefaultView.ChartTitle>
</Charting:ChartDefaultView>
</telerikChart:RadChart.DefaultView>
<telerikChart:RadChart.PaletteBrushes>
<SolidColorBrush Color="DarkBlue" />
<SolidColorBrush Color="Red" />
</telerikChart:RadChart.PaletteBrushes>
<telerikChart:RadChart.SeriesMappings>
<Charting:SeriesMapping CollectionIndex="0" LegendLabel="Expected">
<Charting:SeriesMapping.SeriesDefinition>
<Charting:LineSeriesDefinition ShowPointMarks="True" ShowItemLabels="False" ShowItemToolTips="True" ItemToolTipFormat="Quintiles Expected
#X{MMM/yy}
value: #Y">
<Charting:LineSeriesDefinition.Appearance>
<Charting:SeriesAppearanceSettings StrokeThickness="5"></Charting:SeriesAppearanceSettings>
</Charting:LineSeriesDefinition.Appearance>
</Charting:LineSeriesDefinition>
</Charting:SeriesMapping.SeriesDefinition>
<Charting:SeriesMapping.ItemMappings>
<Charting:ItemMapping FieldName="Date" DataPointMember="XValue" />
<Charting:ItemMapping FieldName="Quantity" DataPointMember="YValue" />
</Charting:SeriesMapping.ItemMappings>
</Charting:SeriesMapping>
<Charting:SeriesMapping CollectionIndex="1" LegendLabel="Actual">
<Charting:SeriesMapping.SeriesDefinition>
<Charting:LineSeriesDefinition ShowPointMarks="True" ShowItemLabels="False" ShowItemToolTips="True" ItemToolTipFormat="Quintiles Actual
#X{MMM/yy}
value: #Y">
<Charting:LineSeriesDefinition.Appearance>
<Charting:SeriesAppearanceSettings StrokeThickness="5"></Charting:SeriesAppearanceSettings>
</Charting:LineSeriesDefinition.Appearance>
</Charting:LineSeriesDefinition>
</Charting:SeriesMapping.SeriesDefinition>
<Charting:SeriesMapping.ItemMappings>
<Charting:ItemMapping FieldName="Date" DataPointMember="XValue" />
<Charting:ItemMapping FieldName="Quantity" DataPointMember="YValue" />
</Charting:SeriesMapping.ItemMappings>
</Charting:SeriesMapping>
</telerikChart:RadChart.SeriesMappings>
</telerikChart:RadChart>
Can anyone figure out why my chart is not getting updated in the UI. I've looked at all the Chart Sample Demo's and my XAML looks pretty much the same. Not sure what I'm doing wrong where the UI does not updated.
Thanks
<telerikChart:RadChart Grid.Row="1" Foreground="White" Background="Transparent" x:Name="RadChart1" ItemsSource="{Binding MetricSum}">
<telerikChart:RadChart.DefaultView>
<Charting:ChartDefaultView>
<Charting:ChartDefaultView.ChartArea>
<Charting:ChartArea LegendName="chartLegend">
<Charting:ChartArea.AxisX>
<Charting:AxisX AutoRange="True" Step="5" DefaultLabelFormat="dd-MMM" LabelRotationAngle="45" IsDateTime="True"
LayoutMode="Normal" LabelStep="5" TicksDistance="100" Title="XAxis Title">
</Charting:AxisX>
</Charting:ChartArea.AxisX>
</Charting:ChartArea>
</Charting:ChartDefaultView.ChartArea>
<Charting:ChartDefaultView.ChartLegend>
<Charting:ChartLegend x:Name="chartLegend" Header="Legend" UseAutoGeneratedItems="True" />
</Charting:ChartDefaultView.ChartLegend>
<Charting:ChartDefaultView.ChartTitle>
<Charting:ChartTitle Content="" HorizontalAlignment="Left" />
</Charting:ChartDefaultView.ChartTitle>
</Charting:ChartDefaultView>
</telerikChart:RadChart.DefaultView>
<telerikChart:RadChart.PaletteBrushes>
<SolidColorBrush Color="DarkBlue" />
<SolidColorBrush Color="Red" />
</telerikChart:RadChart.PaletteBrushes>
<telerikChart:RadChart.SeriesMappings>
<Charting:SeriesMapping CollectionIndex="0" LegendLabel="Expected">
<Charting:SeriesMapping.SeriesDefinition>
<Charting:LineSeriesDefinition ShowPointMarks="True" ShowItemLabels="False" ShowItemToolTips="True" ItemToolTipFormat="Quintiles Expected
#X{MMM/yy}
value: #Y">
<Charting:LineSeriesDefinition.Appearance>
<Charting:SeriesAppearanceSettings StrokeThickness="5"></Charting:SeriesAppearanceSettings>
</Charting:LineSeriesDefinition.Appearance>
</Charting:LineSeriesDefinition>
</Charting:SeriesMapping.SeriesDefinition>
<Charting:SeriesMapping.ItemMappings>
<Charting:ItemMapping FieldName="Date" DataPointMember="XValue" />
<Charting:ItemMapping FieldName="Quantity" DataPointMember="YValue" />
</Charting:SeriesMapping.ItemMappings>
</Charting:SeriesMapping>
<Charting:SeriesMapping CollectionIndex="1" LegendLabel="Actual">
<Charting:SeriesMapping.SeriesDefinition>
<Charting:LineSeriesDefinition ShowPointMarks="True" ShowItemLabels="False" ShowItemToolTips="True" ItemToolTipFormat="Quintiles Actual
#X{MMM/yy}
value: #Y">
<Charting:LineSeriesDefinition.Appearance>
<Charting:SeriesAppearanceSettings StrokeThickness="5"></Charting:SeriesAppearanceSettings>
</Charting:LineSeriesDefinition.Appearance>
</Charting:LineSeriesDefinition>
</Charting:SeriesMapping.SeriesDefinition>
<Charting:SeriesMapping.ItemMappings>
<Charting:ItemMapping FieldName="Date" DataPointMember="XValue" />
<Charting:ItemMapping FieldName="Quantity" DataPointMember="YValue" />
</Charting:SeriesMapping.ItemMappings>
</Charting:SeriesMapping>
</telerikChart:RadChart.SeriesMappings>
</telerikChart:RadChart>