It seems to have an issue when values are interpreted as Strings and values are negative. The comparison does not work the way it should, and the maxValue / minValue calculation is wrong.
To fix the issue, I have added a "parseFloat(value)" at first line of the method "TimeSeries.append".
I think it should be safer to include it in the code instead of making sure people are sending numeric values. When working with JSON this is not always true :)
It seems to have an issue when values are interpreted as Strings and values are negative. The comparison does not work the way it should, and the maxValue / minValue calculation is wrong.
To fix the issue, I have added a "parseFloat(value)" at first line of the method "TimeSeries.append".
I think it should be safer to include it in the code instead of making sure people are sending numeric values. When working with JSON this is not always true :)