Set LinearScales margins

LiHello support,
I have following problem, which I am not sure how to solve.
I am using linear gauge with following setup:

>14, >6 and >4 labels are LinearGaugeAnnotation objects. As you can see there is not enough space from the right side of these annotations. Is is possible to somehow define left margins (in C# code) for LinearScale so the result would look like following picture?

Thanks a lot

3 Replies 1 reply marked as answer

SS Sridevi Sivakumar Syncfusion Team September 10, 2020 01:41 PM UTC

Hi Martin ARION,

Greetings from Syncfusion.

We have checked the reported problem with a simple sample and resolved the reported problem by setting value for LinearScale 
ScaleOffset property.  Please find the tested sample in below.

Sample link: https://www.syncfusion.com/downloads/support/directtrac/157738/ze/LinearSample-886981968


Screenshot: 

 


Code snippet:
 
            LinearScale linearScale = new LinearScale(); 
            linearScale.Minimum = 0; 
            linearScale.ScaleOffset = 35; 
            linearScale.Maximum = 100; 
            linearScale.ShowLabels = true
            linearScale.LabelColor = Color.White; 
            linearScale.ScaleBarColor = Color.White; 
            linearScale.ScaleBarSize = 2; 
            linearScale.MajorTickSettings.Color = Color.White; 
            linearScale.MinorTickSettings.Color = Color.White; 
            linearScale.MinorTicksPerInterval = 1; 
            linearScale.ShowTicks = true
            linearScale.ScaleDirection = LinearScaleDirection.Forward; 
            linearGauge.Scales.Add(linearScale); 

Please check with the sample and it meets your requirement. Let us know if you need any further assistance. 
 
Regards, 
Sridevi S. 
 


Marked as answer

MA Martin ARION September 10, 2020 04:35 PM UTC

Hello thanks a lot for your help.

Unfortunately I found out that the ScaleOffset is not available for controls in version 16.4.0.54.

If I update to latest version, everything is working, but I am getting build warnings about increasing Android target version to 9.0.
My application must be compatible with Android v 8.1.

Would there we a problem to use latest controls with Android 8.1?

Thanks 


SS Sridevi Sivakumar Syncfusion Team September 11, 2020 07:40 AM UTC

Hi  Martin ARION,

We are glad to hear that provided solution works after upgrading to the latest.

Query: Would there be a problem to use latest controls with Android 8.1?

No problem will be occurred with deploying the Android 8.1. Could you please share the faced warning that will be more helpful to validate at our end and provide a possible solution.

Regards,
Sridevi S.
 
 
  
 


Loader.
Up arrow icon