We're currently trailing the charts in WPF and we have a problem where the label settings don't work for the Y Axis on any of our charts.
Below is the code for one of our charts, the LabelSettings for the X Axis work, can you tell us what we're doing wrong for the Y Axis?
<ig:XamDataChart Background="Transparent" PlotAreaBackground="Transparent" HorizontalAlignment="Stretch" Height="200"> <ig:XamDataChart.Axes> <ig:CategoryDateTimeXAxis DateTimeMemberPath="EffectiveFrom" Interval="30" ItemsSource="{Binding Path=Prices}" x:Name="LineXAxis" Label="{}{EffectiveFrom:MMM}" Background="White" Foreground="#777777"> <ig:CategoryDateTimeXAxis.LabelSettings> <ig:AxisLabelSettings Padding="0,7,0,0"></ig:AxisLabelSettings> </ig:CategoryDateTimeXAxis.LabelSettings> </ig:CategoryDateTimeXAxis> <ig:NumericYAxis x:Name="LineYAxis" Interval="1" Label="{}{}" Background="White" Foreground="#777777" > <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Padding="5,0,0,0"></ig:AxisLabelSettings> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:LineSeries MarkerType="None" ItemsSource="{Binding Path=Prices}" ValueMemberPath="Amount.FormattedPrice" XAxis="{Binding ElementName=LineXAxis}" Brush="{DynamicResource Accent}" Thickness="1" YAxis="{Binding ElementName=LineYAxis}"> </ig:LineSeries> </ig:XamDataChart.Series> </ig:XamDataChart>
Hello,
I have been looking into the reported issue and I have not managed to reproduce it on my side. It seems that all setting are applied. I am attaching my sample application(DataChart.zip) that I have used for my tests.
Let me know, if I miss something.
Thanks, to be more specific, the Text Alignment doesn't work, replace your XAML grid with this:
<ig:XamDataChart x:Name="chart" Background="Transparent" PlotAreaBackground="Transparent" HorizontalAlignment="Stretch" Height="200" > <ig:XamDataChart.Axes> <ig:CategoryYAxis x:Name="yAxis" Interval="4" Label="{}{Time:dddd}" ItemsSource="{StaticResource datapoints}" Background="White"> <ig:CategoryYAxis.LabelSettings> <ig:AxisLabelSettings Foreground="Red" Padding="0,0,0,0" TextAlignment="Right"></ig:AxisLabelSettings> </ig:CategoryYAxis.LabelSettings> </ig:CategoryYAxis>
<ig:NumericXAxis x:Name="xAxis" Interval="1" Label="{}{}" Background="White"> <ig:NumericXAxis.LabelSettings> <ig:AxisLabelSettings Foreground="Red" Padding="0,0,0,0" TextAlignment="Right" ></ig:AxisLabelSettings> </ig:NumericXAxis.LabelSettings> </ig:NumericXAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:BarSeries ItemsSource="{StaticResource datapoints}" ValueMemberPath="Value" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}"></ig:BarSeries> </ig:XamDataChart.Series> </ig:XamDataChart>