Hi Chris Hilger,
We have analyzed your query and would like to inform you that we can remove duplicate axes by setting the numerical axis on resource content. Additionally, we can use the axis key to correspond with the series as shown in the code snippet.
[Xaml]
<Grid.Resources> <chart:NumericalAxis FontSize="14" PlotOffsetStart="20" x:Key="numericalAxis"> <chart:NumericalAxis.Header> <TextBlock Text="Price in US dollars" FontSize="12"/> </chart:NumericalAxis.Header> </chart:NumericalAxis> <DataTemplate x:Key="columnSeriesTemplate"> <chart:ColumnSeries XBindingPath="Component" YAxis="{StaticResource numericalAxis}" YBindingPath="Price" ItemsSource="{Binding PriceCollection}" Label="{Binding Year}"> </chart:ColumnSeries> </DataTemplate> <DataTemplate x:Key="lineSeriesTemplate" > <chart:LineSeries XBindingPath="Component" YAxis="{StaticResource numericalAxis}" YBindingPath="Price" ItemsSource="{Binding PriceCollection}" Label="{Binding Year}"> </chart:LineSeries> </DataTemplate> </Grid.Resources> |
Output
Please let us know if you need further assistance.
Regards,
Nanthini Mahalingam.
Attachment:
F181172_348571e.zip