This is a difficult one, I think. If you look at one of the attached screenshots, some of the labels are adjacent to the axis as they should be, but some are quite distant. Sometimes they will all be correct except a few, sometimes they are all fine, and sometimes they are all wrong.
The problem seems to especially manifest when that the chart is bound to changes, and the new values on the labels are not included in the original values. For example the first screenshot has values at each 100 step, and when the data point changes from 400 to 200, the x100 values which were already on the axis are correct but the new x50 values are placed incorrectly. It isn't that straightforward of course... for example, often labels which weren't there originally are added fine.
The chart is fairly basic. It is a single fixed series bound to a list of data point objects. When we change the data we completely replace the list rather than try to use an observable collection.
<
telerik:RadCartesianChart
x:Name
=
"Chart"
BorderThickness
=
"1"
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
PlotMode
=
"OnTicksPadded"
SmartLabelsMode
=
"SmartStep"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
Title
=
"{Binding VerticalLabel}"
Minimum
=
"0"
SmartLabelsMode
=
"SmartStepAndRange"
LabelTemplate
=
"{StaticResource VerticalAxisLabelTemplate}"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Series
>
<
telerik:BarSeries
x:Name
=
"barSeries"
ItemsSource
=
"{Binding SeriesData}"
CategoryBinding
=
"XValue"
ValueBinding
=
"YValue"
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<!--The data context here is the data point, but we need to bind to properties of the visualizer,
which is the data context of the series (presenter) which contains it -->
<
Setter
Property
=
"Background"
Value
=
"{Binding Presenter.DataContext.Fill}"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{Binding Presenter.DataContext.Color}"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"2"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart.Series
>
</
telerik:RadCartesianChart
>