Support Forums
Two Color Bar

I thought this would be simple but I'm having trouble getting it to work. I want to create a two color bar where the bar is green in normal and the entire bar turns red after the setpoint (not just the area above the setpoint). For example, a tank level 0 to 100% and high setpoint is 80%. In normal, the bar is green. When the level hits 80%, I want the entire bar to turn red not just the area about 80%. Any solutions? Thank you.

I thought this would be simple but I'm having trouble getting it to work. I want to create a two color bar where the bar is green in normal and the entire bar turns red after the setpoint (not just the area above the setpoint). For example, a tank level 0 to 100% and high setpoint is 80%. In normal, the bar is green. When the level hits 80%, I want the entire bar to turn red not just the area about 80%. Any solutions? Thank you.

Copy the following and Ctrl+V it into the idea studio. From there you can update the expression in the rectangle properties to point to your tag, setpoint, colors etc:


  GUIRectangle(424, 401, 792, 380,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Brush(PickValid(PickValid([<TagName>],0) > 50 ? "<FFFF0000>" : "<FF00FF00>", "<FF000000>"), 0, 1), Pen("<FF000000>", 1, 1));
Copy the following and Ctrl+V it into the idea studio. From there you can update the expression in the rectangle properties to point to your tag, setpoint, colors etc: ```` GUIRectangle(424, 401, 792, 380, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Brush(PickValid(PickValid([&lt;TagName&gt;],0) &gt; 50 ? &quot;&lt;FFFF0000&gt;&quot; : &quot;&lt;FF00FF00&gt;&quot;, &quot;&lt;FF000000&gt;&quot;), 0, 1), Pen(&quot;&lt;FF000000&gt;&quot;, 1, 1)); ````

Trihedral Engineering Ltd.

The code above is essentially a shortcut to accomplishing the following:

621e4c1684ef3

The code above is essentially a shortcut to accomplishing the following: ![621e4c1684ef3](serve/attachment&amp;path=621e4c1684ef3)

Trihedral Engineering Ltd.

47
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft