09-15-2021, 01:15 PM
There is a function that might help you:
The "value" element has a "map" function that allows mapping numeric ranges to predefined texts. We use this for example for the GPS status or the note value in the Audio spectrum. You can see the documentation here: https://phyphox.org/wiki/index.php?title...ent:_value
Just define a list of <map>-tags with the matching number as "max" in ascending order. Unfortunately, you cannot set the matching color for the view element and would need to leave it neutral.
Example (not tested):
<value label="Color">
<input>colorbuffer</input>
<map max="0">red</map>
<map max="1">orange</map>
<map max="2">yellow</map>
...
</value>
Phyphox goes through the list and uses the first matching entry. You can leave out min and max for the last entry to use it as fallback or if it also has a criterium and no entry matches, phyphox should fall back to the numeric value.
The "value" element has a "map" function that allows mapping numeric ranges to predefined texts. We use this for example for the GPS status or the note value in the Audio spectrum. You can see the documentation here: https://phyphox.org/wiki/index.php?title...ent:_value
Just define a list of <map>-tags with the matching number as "max" in ascending order. Unfortunately, you cannot set the matching color for the view element and would need to leave it neutral.
Example (not tested):
<value label="Color">
<input>colorbuffer</input>
<map max="0">red</map>
<map max="1">orange</map>
<map max="2">yellow</map>
...
</value>
Phyphox goes through the list and uses the first matching entry. You can leave out min and max for the last entry to use it as fallback or if it also has a criterium and no entry matches, phyphox should fall back to the numeric value.