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

RadLinearGauge colour (or color)

3 Answers 117 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Geoff
Top achievements
Rank 1
Geoff asked on 05 Dec 2013, 02:23 PM
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?

3 Answers, 1 is accepted

Sort by
0
Accepted
Stamo Gochev
Telerik team
answered on 10 Dec 2013, 07:49 AM
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.
0
Geoff
Top achievements
Rank 1
answered on 12 Dec 2013, 12:00 PM
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
0
Danail Vasilev
Telerik team
answered on 16 Dec 2013, 12:32 PM
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.
Tags
Gauge
Asked by
Geoff
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Geoff
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or