Hello,
I'm trying to see if there is a way to align a chart label so that it shows up inside the bar but left aligned. Here is what I have right now:
I'd like for the numbers to be left aligned but still in the bar:
Here is the xaml I have:
<Window x:Class="TestRadCartesianChart.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:TestRadCartesianChart"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<telerik:RadCartesianChart>
<telerik:RadCartesianChart.Series>
<telerik:BarSeries ShowLabels="True"
CategoryBinding="Category"
ValueBinding="Value">
<telerik:BarSeries.LabelDefinitions>
<telerik:ChartSeriesLabelDefinition HorizontalAlignment="Center" VerticalAlignment="Center">
<telerik:ChartSeriesLabelDefinition.Template>
<DataTemplate>
<TextBlock Text="{Binding Value}"/>
</DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template>
</telerik:ChartSeriesLabelDefinition>
</telerik:BarSeries.LabelDefinitions>
<telerik:BarSeries.DataPoints>
<telerik:CategoricalDataPoint Category="Apples" Value="20"/>
<telerik:CategoricalDataPoint Category="Bananas" Value="28"/>
<telerik:CategoricalDataPoint Category="Oranges" Value="17"/>
<telerik:CategoricalDataPoint Category="Strawberries" Value="30"/>
</telerik:BarSeries.DataPoints>
</telerik:BarSeries>
</telerik:RadCartesianChart.Series>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis x:Name="horizontalAxis1"/>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:CategoricalAxis/>
</telerik:RadCartesianChart.VerticalAxis>
</telerik:RadCartesianChart>
</Grid>
</Window>
Any help is appreciated.
Thank You,
Giuliano Millan