BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hello,
I am trying to use the below example of SeriesDataTemplateSelector and place the different series types on separate chart rows.
I want the Y axis for both to be numerical axis' but I need to bind different data to them. When I attempt the below, I end up with an axis for every chart series. Any help to remove the multiple axes would be
appreciated.
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.
This seems to fix my issue.
Thank you
Hi Chris,
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.
Regards,
Preethi R