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

Sparkline clipping with negative values and a max of 0

3 Answers 128 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 18 Feb 2015, 12:04 PM
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.

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 20 Feb 2015, 08:00 AM

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!
 
0
Iliana Dyankova
Telerik team
answered on 16 Mar 2015, 07:36 AM
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!
 
0
Robert
Top achievements
Rank 1
answered on 16 Mar 2015, 11:00 AM
Thanks Iliana,  I will give it a go.
Tags
Charts
Asked by
Robert
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Robert
Top achievements
Rank 1
Share this question
or