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

Horizontal linear gauge

4 Answers 128 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 08 Sep 2009, 07:24 AM
Hi there,
Is it possible to configure radGauge so that it displays a linear gauge horizontally? For my application, this makes best use of the screen real estate.

Thanks,

James

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 08 Sep 2009, 01:23 PM
Hello James,

You should set value of the Orientation property to Horizontal and then use Left and Top properties to position scale. Pay attention that Left and Top properties must have value between 0 and 1. For example:

<gauge:LinearGauge Width="300" Height="100">  
    <gauge:LinearScale Name="linearScale"   
         Orientation="Horizontal" 
         Left="0.1" 
         Top="0.15" 
         Min="0"   
         Max="360">  
        <gauge:IndicatorList> 
            <gauge:LinearBar Name="linearBar" Value="120" /> 
        </gauge:IndicatorList> 
    </gauge:LinearScale> 
</gauge:LinearGauge> 


Sincerely yours,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 08 Sep 2009, 01:29 PM
Hi Andrey,
Thanks, that's helpful.

I've tried your code and it does what I want, but the background - using the standard gauge theme and the general 'office black' theme - does not look right because the lighter grey box has not expanded to fill the width of the gauge. Is there a way to make the graphics/theme orientate correctly for horizontal linear gauges? If not, how can I modify the them for the gauge to give a simple, plain background?  I'm not up to speed on themes etc. yet!

Thanks,

James
0
Accepted
Andrey
Telerik team
answered on 09 Sep 2009, 12:43 PM
Hi James,

You can use scale objects outside any gauge container actually. It makes possible to use your own background for scale. For example:
<Grid Width="300" Height="100" Background="Aqua">  
    <gauge:LinearScale Name="linearScale" 
           Orientation="Horizontal" 
           Left="0.05" 
           Top="0.15" 
           RelativeHeight="0.9">  
        <gauge:IndicatorList> 
            <gauge:LinearBar Name="linearBar" Value="20" /> 
        </gauge:IndicatorList> 
    </gauge:LinearScale> 
</Grid> 


Best wishes,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 09 Sep 2009, 04:06 PM
Hi Andrey,
Ah - that's a neat feature - thanks!

James
Tags
Gauge
Asked by
James
Top achievements
Rank 1
Answers by
Andrey
Telerik team
James
Top achievements
Rank 1
Share this question
or