Sparkline clipping with negative values and a max of 0

4 posts, 0 answers
  1. Robert
    Robert avatar
    37 posts
    Member since:
    Feb 2012

    Posted 18 Feb 2015 Link to this post

    Hi,

    I have an issue in the current Kendo 2014.3.1411 with the my sparklines getting clipped when there are data points of negative value and the max value overall is zero. Please see this options object:

    {
     "data":[-1,0,0,0],
     "chartArea":{
    "background":"",
    "width":125
     },
     "tooltip":{
    "visible":false
     },
     "axisDefaults":{
    "visible":false,
    "majorGridLines":{
      "visible":false
    }
     },
     "categoryAxis":{
    "crosshair":{
      "visible":false
    }
     },
     "seriesDefaults":{
    "line":{
      "color":"#5889AD",
      "width":1
    },
    "markers":{
      "visible":true,
      "size":1,
      "border":{
     "color":"#d52b1e",
     "width":2
      }
    }
     }


    As you can see this is not a great set of data but is something our application is capable of trying to display.  Even if you change that -1 to be say -100 the rendering will still be clipped.  If you make the values that are 0 to be say 0.1 the rendering works fine.

    I believe this to be a defect and would like to bring it to your attention and others who may have the same problem.  I have worked around ours by detecting negative values and changing the zeros to be slightly greater than zero.

    Thanks,
    Rob.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 20 Feb 2015 Link to this post

    Hi Robert,

    Thank you for pointed our attention to this issue - I forwarded it to the developers for further investigation and fixing. As a small sign of gratitude I updated your points. 

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 16 Mar 2015 Link to this post

    Hi Robert,

    I am glad to inform you that the automatically applied clipping issue is fixed (you can test the latest internal build from your account). However you will need to use plotArea.margin in order to show the entire markers in this scenario.

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  4. Robert
    Robert avatar
    37 posts
    Member since:
    Feb 2012

    Posted 16 Mar 2015 in reply to Iliana Nikolova Link to this post

    Thanks Iliana,  I will give it a go.
Back to Top