4 Answers, 1 is accepted
0
Accepted
Hi Donald,
Currently, we do not support minor ticks, thus, the same applies for minor gridlines.
I can offer you the following workaround using CustomGridLines as part of the Annotations feature (demo and help topic) of ChartView.
First of all, you need to have explicitly set Minimum, Maximum, and MajorStep of the axis:
Then, you can generate the custom grid lines in the constructor of the window:
I hope that this will server you well.
Regards, Rosko
Telerik
Currently, we do not support minor ticks, thus, the same applies for minor gridlines.
I can offer you the following workaround using CustomGridLines as part of the Annotations feature (demo and help topic) of ChartView.
First of all, you need to have explicitly set Minimum, Maximum, and MajorStep of the axis:
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
Maximum
=
"100"
Minimum
=
"0"
MajorStep
=
"20"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
Then, you can generate the custom grid lines in the constructor of the window:
public
MainWindow()
{
InitializeComponent();
var chartVerticalAxis = (
this
.chart.VerticalAxis
as
LinearAxis);
var min = chartVerticalAxis.Minimum;
var max = chartVerticalAxis.Maximum;
var majorStep = chartVerticalAxis.MajorStep;
var minorOffset = majorStep / 2;
for
(
double
i = minorOffset; i < max; i += majorStep)
{
chart.Annotations.Add(
new
CartesianGridLineAnnotation() { Value = i, Stroke =
new
SolidColorBrush(Colors.Red), StrokeThickness = 1, Axis = chartVerticalAxis});
}
}
I hope that this will server you well.
Regards, Rosko
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0

Don
Top achievements
Rank 1
answered on 12 Jun 2013, 08:47 PM
Thanks. Works for me. :)
0

Saurabh
Top achievements
Rank 1
answered on 04 Aug 2014, 08:01 PM
I see this is still a non-implemented feature at Q2 2014 release. How and when are you planning to implement minor grid lines in Chart view? Also, the current workaround will be very tedious if I have to do it for live like in your example - http://demos.telerik.com/silverlight/#ChartView/LiveData. (I know that is link to a silverlight demo)
0
Hi Saurabh,
I already answered your question in the Creating Custom Major Lines when using LogarithmicAxis forum.
Regards,
Martin
Telerik
I already answered your question in the Creating Custom Major Lines when using LogarithmicAxis forum.
Regards,
Martin
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.