sparkline doesn't fill the space that it is given

2 posts, 1 answers
  1. Jonathan
    Jonathan avatar
    10 posts
    Member since:
    Feb 2014

    Posted 29 Apr Link to this post

    Example: http://dojo.telerik.com/AQEWo

     

    I am trying to get a sparkline to be consistent in the amount of space that it uses.  The problem can be seen when a sparkline only has two points, it is significantly shorter than the sparkline with many points.

    I would expect that the two sparklines be of equal lengths.

  2. Answer
    Patrick
    Admin
    Patrick avatar
    174 posts

    Posted 29 Apr Link to this post

    Hi Jonathan,

    Please take a look at this Telerik Dojo which shows an update of your example with both lines at the same size.

    categoryAxis.justified was added to the updated example to remove the space before and after the line, and position the points at major ticks.
    $("#press-log").kendoSparkline({
       ...
       categoryAxis:{
         justified: true
       }
     });

    Hope this helps!

    Regards,
    Patrick
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top