Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

limit values statusIntervals #152

Open
opeeters opened this issue Nov 5, 2015 · 0 comments
Open

limit values statusIntervals #152

opeeters opened this issue Nov 5, 2015 · 0 comments

Comments

@opeeters
Copy link
Contributor

opeeters commented Nov 5, 2015

currently, if the following is defined on the side of the timeseries-api:

            "statusIntervals": {
                "21 - MAX BC": {
                    "upper" : 10000.0,
                    "lower" : 20.4,
                    "color" : "#5A0000"
                },
                "11 - 20 BC": {
                    "upper" : 20.4,
                    "lower" : 15.4,
                    "color" : "#C00000"
                },
                "10 - 0 BC": {
                    "upper" : 15.4,
                    "lower" : -0.000001,
                    "color" : "#FF0000"
                }

defaultMarkerColor is rendered for values 20.4 and 15.4

In mapController.js
line number 226 should be changed to:

if (!isNaN(interval.upper) && !isNaN(interval.lower) && parseFloat(interval.lower) < lastValue && lastValue <= parseFloat(interval.upper)) {

or

if (!isNaN(interval.upper) && !isNaN(interval.lower) && parseFloat(interval.lower) <= lastValue && lastValue < parseFloat(interval.upper)) {

I prefer the former...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant