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

RadLinearGauge set color of bar

3 Answers 34 Views
Gauges (RadialGauge, LinearGauge, BulletGraph)
This is a migrated thread and some comments may be shown as answers.
Jasper
Top achievements
Rank 1
Jasper asked on 26 Aug 2018, 08:37 PM

I am trying to set the color of the bar , when a value goes below a certain amount. I have tried the below, but none of them change the color of the bar from Green to red. :

      barBat.BackColor = Color.Yellow
                        barBat.GaugeElement.BackColor = Color.Yellow
                        barBat.GaugeElement.BackColor2 = Color.Yellow
                        barBat.GaugeElement.BackColor3 = Color.Yellow
                        barBat.GaugeElement.BackColor4 = Color.Yellow

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Aug 2018, 07:36 AM
Hello, Jasper,          
 
In order to change the color of the LinearGaugeBar, you should set the BackColor and BackColor2 properties of the respective LinearGaugeBar

Me.LinearGaugeBar1.BackColor = Color.Aqua
Me.LinearGaugeBar1.BackColor2 = Color.Aqua


I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jasper
Top achievements
Rank 1
answered on 02 Sep 2018, 08:52 PM

I do get a compile error:

'BackColor2' is not a member of 'RadLinearGauge'.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Sep 2018, 08:04 AM
Hello, Jasper,         

The BackColor2 property is relevant for the LinearGaugeBar as it is demonstrated in the code snippet from my previous post. I have attached my sample project for your reference.

I hope this information helps.

Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Gauges (RadialGauge, LinearGauge, BulletGraph)
Asked by
Jasper
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jasper
Top achievements
Rank 1
Share this question
or