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

sparkline doesn't fill the space that it is given

1 Answer 44 Views
Sparkline
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 29 Apr 2016, 06:59 PM

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 29 Apr 2016, 08:17 PM
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!
 
Tags
Sparkline
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Share this question
or