How to avoid showing orgin point of line graph in kendo ui aspnet mvc?

4 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    5 posts
    Member since:
    May 2014

    Posted 30 Jul 2014 Link to this post

    I would like to avoid showing 0 in x axis as well as 0 in y axis while plotting a line graph.For example:My x axis shows number of days starting from zero(say 0-365).My Y axis showing average growth rate starting from zero(say 0-2.0).So here i would like to avoid showing 0 in x axis as well as 0 in y axis.Could you show how to do that?
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 31 Jul 2014 Link to this post

    Hi Ramesh,

    For this requirement I would suggest to skip first labels for both axes: 
    @(Html.Kendo().Chart()
      //....
      .XAxis(x => x
         .Numeric()
          //.....
         .Labels(l=>l.Skip(1))
      )
      .YAxis(x => x
         .Numeric()
          //.....
         .Labels(l=>l.Skip(1))
      )
    )

    Regards,
    Iliana Nikolova
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Ramesh
    Ramesh avatar
    5 posts
    Member since:
    May 2014

    Posted 01 Aug 2014 in reply to Iliana Nikolova Link to this post

    Hi,

    My question is entirely different.As you can see in the attached image,its showing two zeros on orgin.I just want to show only one zero on the intersection of the axis ie,orgin. That is my requirement.i dont want to show zeros on both axis.
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 04 Aug 2014 Link to this post

    Hi Ramesh,

    This requirement is not supported out-of-the-box by Kendo UI Chart. As a workaround I would suggest to skip the first label for one of the axes. As an example: 
    @(Html.Kendo().Chart()
      //....
      .YAxis(x => x
         .Numeric()
          //.....
         .Labels(l=>l.Skip(1))
      )
    )

    Regards,
    Iliana Nikolova
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready