[BUG] Linear Scale Range Indicator Negative Extent

I expected a negative extent to fill from the value, down. It does, but for each -1 it also shifts the displayed value down one.

For example, on a scale from 0 - 100 with a value of 20 and an extent of 20 you get exactly what you'd expect:

However, a scale of -20 seems like it doesn't work, but upon further inspection the range is actually just out-of-view below the scale. This can be seen by setting the extend to -10.



It sure looks like something is wrong here when using a negative value for extent, but why wouldn't you just set the value to 0 and the extent to 20? It looks like the component was written to always expect extent to be a positive value. I don't know if there was a reason for this, and I don't see anything documenting that it must be a positive value. If I open a bug ticket for this, there's a decent chance we would just update the documentation to clarify that a positive value is expected.

Supposing you knew you wanted the extent to be some low value n to some other greater value z for an indicator x, I would expect that I would apply the values like this:

indicators[x].value = n
indicators[x].extent = z - n

This removes any negative value from being in use while maintaining the expected extent.

If you can make a reasonable argument for why that approach won't work, I'll open a bug ticket for evaluation to see if this is something we need to fix.

1 Like

This is exactly what I ended up doing after making the post.

Update to the documentation would suffice, considering the workaround makes alot of logical sense.