Declined
Last Updated: 26 Aug 2024 05:20 by ADMIN
Viktor
Created on: 19 Aug 2024 14:08
Category: Gauge
Type: Bug Report
0
RadHorizontalLinearGauge - Marker on wrong value

Hi!

Iam trying to use a RadGauge to display two values, CurrentCapacity and MaxCapacity, and I thought a gauge would be a nice way. But my marker on the RadHorizontalLinearGauge does not align correctly.

<telerik:RadHorizontalLinearGauge>
    <telerik:HorizontalLinearScale Min="0" Max="10" >
        <telerik:HorizontalLinearScale.Indicators>
            <telerik:Marker Value="2"></telerik:Marker>
        </telerik:HorizontalLinearScale.Indicators>
    </telerik:HorizontalLinearScale>
</telerik:RadHorizontalLinearGauge>

Results in:

Notice marker is not on 2. The same problem occurs with different Max and Values. 

 

Do I have some strange style that applies a margin/padding or something?

1 comment
ADMIN
Dimitar
Posted on: 26 Aug 2024 05:20

Hi Viktor,

It seems that the label values are rounded and this is why you are getting such results. If you set the format the values will be correct: 

<telerik:RadHorizontalLinearGauge Height="100">
    <telerik:HorizontalLinearScale Min="0" Max="10"  LabelFormat="{}{0.0}">
        <telerik:HorizontalLinearScale.Indicators>
            <telerik:Marker Name="marker" Value="2.5"></telerik:Marker>
        </telerik:HorizontalLinearScale.Indicators>
    </telerik:HorizontalLinearScale>
</telerik:RadHorizontalLinearGauge>

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.