Giter VIP home page Giter VIP logo

gauges's People

Contributors

gimmixat avatar rjahn avatar

Watchers

 avatar  avatar  avatar  avatar

gauges's Issues

error and warning limits in property steps should support null values

Sometimes not all limits are required and thus not set. Anyway this should be covered correctly.
Consider max: 20,
for
steps: [null,null,null,18] - doesn´t work for values x < 18 (color should be colorOK, but is colorWarning)
steps: [2,null,null,18] - doesn´t work for values 2 < x < 18 (color should be colorOK, but is colorWarning)
steps: [null,4,16,null] - for every value colorError, even if no error limit set. colorWarning never shown

I realized while debugging, that ifs aren´t evaluated correctly with null values in getColor(value, steps) method.

Maybe you can use as inspiration our Swing implementation:
double value = Math.max(gauge.minValue, Math.min(gauge.maxValue, ((Number)dataRow.getValue(columnName)).doubleValue()));

            if (!Double.isNaN(gauge.minErrorValue) && value <= gauge.minErrorValue)
            {
                ((RingPlot)plot).setSectionPaint("VALUE", LIGHT_RED);
            }
            else if (!Double.isNaN(gauge.minWarningValue) && value <= gauge.minWarningValue)
            {
                ((RingPlot)plot).setSectionPaint("VALUE", LIGHT_ORANGE);
            }
            else if (!Double.isNaN(gauge.maxErrorValue) && value >= gauge.maxErrorValue)
            {
                ((RingPlot)plot).setSectionPaint("VALUE", LIGHT_RED);
            }
            else if (!Double.isNaN(gauge.maxWarningValue) && value >= gauge.maxWarningValue)
            {
                ((RingPlot)plot).setSectionPaint("VALUE", LIGHT_ORANGE);
            }
            else
            {
                ((RingPlot)plot).setSectionPaint("VALUE", LIGHT_GREEN);
            }

Additional property displayValue

I've just implemented a multi-factor-authentication which uses a gauge as a timer, we want to display the remaining time in the middle of the ring gauge in the format "mm:ss". Currently only numbers are accepted in the value property.

It would be nice if there was an additional property for displaying values, like in my case instead of only seconds in "mm:ss" format and a property for calculating like the value property does right now.

Axis label does not change when max or min is changed

In SpeedometerGauge and MeterGauge the axis label does not change, if max or min is changed in configuration and set with gauge.update(state.configurationJson);
Also the needle stays on wrong position, until the value changes in configuration.

Min value is not supported

For now all gauges are drawing from zero to max.
It should be quite simple to support any min value.
all values just have to be calculated with -min.
so value - min, max - min, minWarning - min, ...
Just for displaying the original min value and max value has to be shown.

Changing max of ring not working

If we change the max value of a ring, it won't change or it doesn't update the max - not sure.

Start with e.g. 300000 and after e.g. 3 seconds, change the max to 60000 -> the ring shows the value but doesn't recognize the new max.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.