Hello,
I've run into some issues with the RadCartesianChart where I want to display only integer values along the LinearAxis. It does not make sense to measure the item I'm plotting along this axis in decimals. Another thing I'd like is to have a DesiredTickCount of 5. I've tried setting the label format to not show decimals but then this leads to weirdness when the Maximum value calculated by the control is very low (ex. Maximum of 1 shows me 5 ticks with the labels of (blank), (blank), 1, 1, 2). I also tried to set the Major Step to 1 but that caused issues with the DesiredTickCount of 5 when the Maximum was greater than 5.
Is there some way to force the chart to only calculate in Integers? Or set the, for lack of better words, Minimum Maximum to just 5 so it calculates the ticks as integers?
Here is the code for my VerticalAxis:
I've run into some issues with the RadCartesianChart where I want to display only integer values along the LinearAxis. It does not make sense to measure the item I'm plotting along this axis in decimals. Another thing I'd like is to have a DesiredTickCount of 5. I've tried setting the label format to not show decimals but then this leads to weirdness when the Maximum value calculated by the control is very low (ex. Maximum of 1 shows me 5 ticks with the labels of (blank), (blank), 1, 1, 2). I also tried to set the Major Step to 1 but that caused issues with the DesiredTickCount of 5 when the Maximum was greater than 5.
Is there some way to force the chart to only calculate in Integers? Or set the, for lack of better words, Minimum Maximum to just 5 so it calculates the ticks as integers?
Here is the code for my VerticalAxis:
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
DesiredTickCount
=
"5"
Minimum
=
"0"
>
<
telerik:LinearAxis.LabelTemplate
>
<
DataTemplate
>
<
TextBlock
MinWidth
=
"40"
Margin
=
"0,0,3,0"
Text
=
"{Binding}"
TextAlignment
=
"Right"
/>
</
DataTemplate
>
</
telerik:LinearAxis.LabelTemplate
>
</
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>