This is a migrated thread and some comments may be shown as answers.

Creating Custom Major Lines when using LogarithmicAxis

7 Answers 152 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Royston
Top achievements
Rank 1
Royston asked on 19 Nov 2012, 02:03 PM
I am trying to create a ChartView that uses a LogarithmicAxis, but I want to control the spacing and interval of the major tick lines & labels.  Currently you can only have major lines that are a equal distance from each other, and the labels will adjust accordingly.   I want to be able to display major lines on the Y-Axis at a set value interval, so that the lines will be spaced closer together as you move up the Y-Axis.

The attached image gives a good example of the affect that I am trying to achieve, with lines at value increments of 5.  Is this something that is easily achievable with this control?

7 Answers, 1 is accepted

Sort by
0
Missing User
answered on 21 Nov 2012, 03:53 PM
Hi Royston,

Unfortunately, the LogarithmicAxis does not natively support the behavior you described.
However, we've prepared a workaround for you. It involves adding annotations manually and requires a bit more development effort and it's up to you to decide whether it's an acceptable solution. See the attached sample project which should give you a clue on how to proceed further.
Please, follow this link if you need more information on annotations.

Kind regards,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
David
Top achievements
Rank 1
answered on 06 Mar 2013, 03:56 PM
Ivan, would it be possible to use a similar technique to emulate minor lines on the logarithmic axis?  We use the full Telerik suite, but we had to switch to a competitor's chart component because ChartView does not support minor lines on logarithmic, and the prior Telerik chart component supported minor lines, but displayed them evenly spaced.

So, could I use CartesianGridLineAnnotation to insert minor lines with appropriate spacing?
0
Missing User
answered on 11 Mar 2013, 12:47 PM
Hello David,

Yes, you can achieve mimicking minor gridlines in the same way. You will only have to calculate the appropriate step for yourself. For better readability, naturally, you should style the annotations with different purposes accordingly. I suggest you take a look at this annotations demo that shows how to do this.

Regards,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
LOUGE
Top achievements
Rank 1
answered on 29 Oct 2013, 01:40 PM
I'm checking your sample code and trying to set Y-Axis labels on the left but when window size changing labels moves on the graph with this technique :(
0
Yavor
Telerik team
answered on 01 Nov 2013, 07:31 AM
Hi Louge,

When you move the axis to the left you have to make some changes to the custom annotations that represent the label and the tick. The have to be moved to the left by changing their horizontal value. Also some changes in the template are needed in order for the text and the tick to be swapped. Please check the attached code.

Regards,
Yavor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Saurabh
Top achievements
Rank 1
answered on 04 Aug 2014, 07:49 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
Martin Ivanov
Telerik team
answered on 07 Aug 2014, 10:13 AM
Hi Saurabh,

Currently the RadCartesianChart doesn't support minor grid lines and their implementation is no included in the planning for our next release. However, we have a feature request for minor ticks already logged in our feedback portal. Keep in mind that, in genera, the grid lines in the chart are snapped to the ticks on the axis.

If you follow the item (the feature request in the portal) you will be notified by email when its status is changed (in progress, completed). Another thing you can keep in mind is that if the item collects certain amount of votes, its priority will increase and it will be more likely for the feature's implementation to be included in our planning.

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.
 
Tags
ChartView
Asked by
Royston
Top achievements
Rank 1
Answers by
Missing User
David
Top achievements
Rank 1
LOUGE
Top achievements
Rank 1
Yavor
Telerik team
Saurabh
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or