Creating Custom Major Lines when using LogarithmicAxis

8 posts, 0 answers
  1. Royston
    Royston avatar
    2 posts
    Member since:
    Aug 2010

    Posted 19 Nov 2012 Link to this post

    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?

  2. Missing user
    Missing user avatar

    Posted 21 Nov 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. David
    David avatar
    8 posts
    Member since:
    Jun 2012

    Posted 06 Mar 2013 Link to this post

    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?
  4. Missing user
    Missing user avatar

    Posted 11 Mar 2013 Link to this post

    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.

    Ivan N.
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. LOUGE
    LOUGE avatar
    12 posts
    Member since:
    Jun 2010

    Posted 29 Oct 2013 Link to this post

    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 :(
  6. Yavor
    Yavor avatar
    401 posts

    Posted 01 Nov 2013 Link to this post

    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.

    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 >>
  7. Saurabh
    Saurabh avatar
    10 posts
    Member since:
    Mar 2012

    Posted 04 Aug 2014 Link to this post

    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 - (I know that is link to a silverlight demo)
  8. Martin Ivanov
    Martin Ivanov avatar
    1442 posts

    Posted 07 Aug 2014 Link to this post

    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.

    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.
Back to Top