SfChart on android last value of serie gets cut on some resolutions

Hello,

I'm having an issue with the Series chart on Android, on certain resolutions like 1080x1920 the chart is getting cut(look at the 15):



With the resolution 768x1280 it displays fine:


On iOS it always displays fine.

I've attached a sample project with this example.

Thanks in advance,
Best Regards,
Ivo Ventura

Attachment: SeriesChartCutExample_a40a1c78.rar

2 Replies

MP Michael Prabhu M Syncfusion Team August 14, 2018 11:20 AM UTC

Hi Ivo, 
 
Sorry for the delay in getting back at this, we have analyzed the reported issue and we like to inform you that the last label in the chart will cut with respect to the width of the text and the chart. For e.g. if the last label is say "1000000" this will definitely cut with respect to the chart width because the width of the text is higher, and we always place the label to the center of the tick. So, to overcome this you can use EdgeLabelsDrawingMode as shift as like in below code snippet. 
 
Code snippet [C#]:    
NumericalAxis secondaryAxis = new NumericalAxis(); 
secondaryAxis.EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift; 
secondaryAxis.Maximum = 20; 
sfChart.SecondaryAxis = secondaryAxis; 
 
 
  
Having said that this works fine in iOS because in Android the labels are rendered based on the device density which will differ with respect to different resolution. So even for a small number like 15 or 16 the width of the text differs for different resolution.  
 
We have also prepared a sample based on this and it can be downloaded from the link below. 
 
Sample:139195
 
Thanks, 
Michael 



IV Ivo Ventura August 14, 2018 12:22 PM UTC

Hello Michael,

Thanks to your code snippet it now works well.

Thank you, so much for your help,

Best Regards,
Ivo Ventura

Loader.
Up arrow icon