Skip to main content
5-Regular Member
September 19, 2025
Solved

How to change inner value color of ThresholdIndicatorWidget based on condition?

  • September 19, 2025
  • 1 reply
  • 1558 views

Hi developers,

 

Firstly, I am using ThingWorx 9.4.6 version.

 

How to implement below problem:

Problem: I want to implement to change the inner value colour of the ThresholdIndicatorWidget according to OEE property value. meaning if OEE value is below 60 then inner value colour should be RED likewise OEE value below 80 -> Yellow and below and equal to 100 -> Green.

 

I am attaching a screenshot of that widget in the name of ThresholdIndicatorWidget.png, PFA. In this image, 22 number value should be in RED colour. For inner indicator bar I have attached a new State Definition for this widget instead of its default state definition. I am attaching the image in the name of StateDefinition.png for your reference. Due to this state definition inner value colour is not changing accordingly.

 

Please help me in this. Thanks in advance.

 

 

 

 

Best answer by slangley

Hi @A_Wakde 

 

Per the case, it was determined that you were using a custom widget.  Hopefully you were able to make the changes required to correct your issue.

 

If you have additional details you can share here, please feel free to do so.

 

If this response now answers your question, please mark it as the Accepted Solution for the benefit of others in the community.

 

Regards.

 

--Sharon

1 reply

Rocko
19-Tanzanite
September 22, 2025

Could it be you are referring to the KPI dial widget?

In your style, set the foreground color, not the background color. Also make sure the state is based on number, not on string.

 

A_Wakde5-Regular MemberAuthor
5-Regular Member
September 23, 2025

Thank you Rocko for replied to the post.

  • I have applied your approach but still no luck.
  • This is not the KPI dial widget, it is a ThresholdIndicator widget. KPI dial widget is not available in the Thingworx 9.4.6 version.
  • In my state definition I have set background, secondary background, text and line colour to red and do it for yellow and green colour as well.
  • My state definition is based on Number not a String .
  • AW_13823420_0-1758607048290.pngAW_13823420_1-1758607097876.png
  • See the above attached images for your clarification. Please, let me know if you need any other information
Rocko
19-Tanzanite
September 23, 2025

I only have KPI dial here so it may be different. What you can try is to unset the state formatting property on the widget, save it, and then re-set the state def you created. I needed to do this for the system to load the changes in the styles of the State Definition. If that doesn't help it might be a bug.