Horizontal linear gauge

5 posts, 1 answers
  1. James
    James avatar
    29 posts
    Member since:
    Sep 2008

    Posted 08 Sep 2009 Link to this post

    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
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 08 Sep 2009 Link to this post

    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.
  3. DevCraft banner
  4. James
    James avatar
    29 posts
    Member since:
    Sep 2008

    Posted 08 Sep 2009 Link to this post

    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
  5. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 09 Sep 2009 Link to this post

    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.
  6. James
    James avatar
    29 posts
    Member since:
    Sep 2008

    Posted 09 Sep 2009 Link to this post

    Hi Andrey,
    Ah - that's a neat feature - thanks!

    James
Back to Top
DevCraft banner