RadLinearGauge colour (or color)

4 posts, 1 answers
  1. Geoff
    Geoff avatar
    53 posts
    Member since:
    Aug 2012

    Posted 05 Dec 2013 Link to this post

    Hello,
        I would like to use a simple version of the RadLinearGauge that just shows the bar without all the scale ticks and stuff. This is easy enough to do by setting the visibility of all the bits I don't want to false. I need three of these on my page, one with a green bar, one with an amber bar and one with a red bar. The snag is that I cannot see a way to change the colour of the bar.

    One glimmer of hope was offered in the Telerik demo (here) because when you switch skins (e.g. to "Glow"), then the colour of the bar does change. So I thought I would build three skins using the Telerik Visual Style Builder, but the Gauge control doesn't appear in the list of controls to skin.

    Can anybody help?
  2. Answer
    Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 10 Dec 2013 Link to this post

    Hi Geoff,

    Could you try setting the Color property of RadLinearGauge's Pointer (you can also do the same for the Ranges)? You can see a full example in our help article.

    If by "bar" you refer to something else, could you specify which is the actual gauge element that you want to colorize?

    Regards,
    Stamo Gochev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Geoff
    Geoff avatar
    53 posts
    Member since:
    Aug 2012

    Posted 12 Dec 2013 Link to this post

    Stamo,
        Hi and thank you for your response to my query. You are right this property is the one I want. The reason that I was confused, was because I had already tried this and it didn't work. Here's why: When I first tried setting the colour properties, I set the pointer colour to orange like this: Pointer-Color="Orange" but it produce a black bar. So I assumed that it must only set the colour of the pointer itself, not the bar.

    Having now experimented a bit more, I have found only two colours that work ("Green" and "Red") but all of the others I've tried so far produce a black bar. I have just tried using Hex colour codes (e.g. Pointer-Color="FFC200" - for the colour amber) and this seems to work fine. I don't know why the named colours don't work and it was just bad luck that I tried one of these first.

    I am now satisfied that I can now colour the bar as I want it so thank you for your help.

    Regards

    Geoff
  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 16 Dec 2013 Link to this post

    Hi Geoff,

    We are aware of the described issue - some known colors in RadGauge are not recognized by old IE versions that only support VML and show as black.

    This issue has already been logged as a PITS item here, so that you can follow the progress of this task, vote and comment. For the time being you can test which colors show as expected and use them instead, or try using their HEX representation.

    Regards,
    Danail Vasilev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top