Hello there,
You can either adjust the ChartSeriesLabelDefinition.Margin.Left value accordingly:
Or In case your data is not static (i.e. the label size can differ and you cannot hardcode the Margin value), you will need to implement custom
ChartSeriesLabelStrategy and dynamically arrange the series item labels on your own like this:
XAML
<
UserControl
x:Class
=
"SilverlightApplication5.MainPage"
xmlns:demo
=
"clr-namespace:SilverlightApplication5"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
Grid
>
<
telerik:RadCartesianChart
x:Name
=
"RadChart1"
Palette
=
"Metro"
>
<
telerik:BarSeries
ShowLabels
=
"True"
>
<
telerik:CategoricalDataPoint
Category
=
"C1"
Value
=
"20"
Label
=
"Text text text text text text text text 1"
/>
<
telerik:CategoricalDataPoint
Category
=
"C2"
Value
=
"70"
Label
=
"Text text text text text text text text 2"
/>
<
telerik:CategoricalDataPoint
Category
=
"C3"
Value
=
"90"
Label
=
"Text text text text text text text text 3"
/>
<
telerik:CategoricalDataPoint
Category
=
"C4"
Value
=
"20"
Label
=
"Text"
/>
<
telerik:CategoricalDataPoint
Category
=
"C5"
Value
=
"70"
Label
=
"Text text"
/>
<
telerik:CategoricalDataPoint
Category
=
"C6"
Value
=
"90"
Label
=
"Text text text "
/>
<
telerik:CategoricalDataPoint
Category
=
"C7"
Value
=
"20"
Label
=
"T"
/>
<
telerik:BarSeries.LabelDefinitions
>
<
telerik:ChartSeriesLabelDefinition
>
<
telerik:ChartSeriesLabelDefinition.Strategy
>
<
demo:CustomLabelStrategy
/>
</
telerik:ChartSeriesLabelDefinition.Strategy
>
</
telerik:ChartSeriesLabelDefinition
>
</
telerik:BarSeries.LabelDefinitions
>
</
telerik:BarSeries
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:LinearAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:CategoricalAxis
/>
</
telerik:RadCartesianChart.VerticalAxis
>
</
telerik:RadCartesianChart
>
</
Grid
>
</
UserControl
>
C#
Hope this helps.
Regards,
Giuseppe
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>