New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.1 min value shows broken chart #116

Closed
ktsaou opened this Issue Feb 5, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@ktsaou

ktsaou commented Feb 5, 2017

If the value requested is the minimum value, this is what happens:

image

As a work around I just added 0.001 to the minimum value to have the chart rendered properly.

@kplindegaard

This comment has been minimized.

Show comment
Hide comment
@kplindegaard

kplindegaard Feb 5, 2017

Collaborator

The problem with minValue and first rendering, i.e. gauge.set( minValue ) has been there quite a while.
@johanye's new option 'limitMin comes to the rescue, so you may want to try enable that.

var opt = {
// your other options
limitMin: true
};

gauge.setOptions(opt); gauge.set(0);

I think that should sufficient in your case as an alternative workaround. But you do have a point, there is something fishy there.

Collaborator

kplindegaard commented Feb 5, 2017

The problem with minValue and first rendering, i.e. gauge.set( minValue ) has been there quite a while.
@johanye's new option 'limitMin comes to the rescue, so you may want to try enable that.

var opt = {
// your other options
limitMin: true
};

gauge.setOptions(opt); gauge.set(0);

I think that should sufficient in your case as an alternative workaround. But you do have a point, there is something fishy there.

@ktsaou

This comment has been minimized.

Show comment
Hide comment
@ktsaou

ktsaou Feb 5, 2017

@kplindegaard thanks!

I already have limitMin: true. This issue appears with that in place: https://github.com/firehol/netdata/pull/1725/files

ktsaou commented Feb 5, 2017

@kplindegaard thanks!

I already have limitMin: true. This issue appears with that in place: https://github.com/firehol/netdata/pull/1725/files

kplindegaard added a commit to kplindegaard/gauge.js that referenced this issue Feb 5, 2017

Fixed bernii#116: Force an gauge update in first .set() operation.
Fixed bernii#117: Static labels and zones must respect limitMin and limitMax.
@kplindegaard

This comment has been minimized.

Show comment
Hide comment
@kplindegaard

kplindegaard Feb 5, 2017

Collaborator

@ktsaou You are right! What a bummer... I am forcing an update when you do the first .set() operation now in the latest commit. I hope that should pull it off. Do mind testing again with the latest commit, please?

Collaborator

kplindegaard commented Feb 5, 2017

@ktsaou You are right! What a bummer... I am forcing an update when you do the first .set() operation now in the latest commit. I hope that should pull it off. Do mind testing again with the latest commit, please?

@ktsaou

This comment has been minimized.

Show comment
Hide comment
@ktsaou

ktsaou Feb 11, 2017

tested 1.3.2 - it works nicely.

ktsaou commented Feb 11, 2017

tested 1.3.2 - it works nicely.

@ktsaou

This comment has been minimized.

Show comment
Hide comment
@ktsaou

ktsaou Feb 11, 2017

thank you!

ktsaou commented Feb 11, 2017

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment