Skip to content
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

Bug on Compass / Donut with negative range #113

Closed
Swunn opened this issue Dec 10, 2016 · 10 comments
Closed

Bug on Compass / Donut with negative range #113

Swunn opened this issue Dec 10, 2016 · 10 comments
Labels

Comments

@Swunn
Copy link

Swunn commented Dec 10, 2016

With Range min set to negative values the Compass and Donut gauge nodes look strange.

donut
compass

@dceejay
Copy link
Member

dceejay commented Dec 10, 2016

this is a known issue with the underlying library...
need them to fix it.

toorshia/justgage#248

@combefis
Copy link

combefis commented Mar 9, 2018

Just quickly fixed the issue right now! Waiting for the owner of the underlying library to check and eventually accept it!

toorshia/justgage#312

@dceejay
Copy link
Member

dceejay commented Mar 9, 2018

Nice work... shout if they don't respond. I can probably monkey patch it here at the install step if we had to.

@dceejay dceejay added this to work in progress - not yet on npm in Dashboard - Things to do Mar 9, 2018
@DDDanny
Copy link

DDDanny commented Apr 6, 2018

Dear folks,
do you think this patch will also fix the normal gauge display for non numeric values?

My Problem is that the (internal) gauge value is always converted to 0.
If the min value is greater 0, then this is no ok, because 0 will not be filled up.

But if you have a <= zero base, then this happens :
grafik
Hint: I hide the pointer on this INVAL scenario

If not, I wasn't able to locate the justgage lib in the node-red-dashboard folder - is it remotly loaded?

Thanks a lot
Danny

@dceejay
Copy link
Member

dceejay commented Apr 6, 2018

Hi - I don't think that the justgage library has a simple way to "remove" the fill and pointer for an invalid or null value...
But we could make it always got to the min value rather than 0 - which if you have already removed the pointer.... will look ok.

The library is in the source - but is bundled into the dist/js/app.min.js file as part of the build process.

Have pushed a version to master brach if you want to try it.

dceejay pushed a commit that referenced this issue Apr 6, 2018
and show the invalid thing as text.
and update  dist files
to further address #113
@DDDanny
Copy link

DDDanny commented Apr 7, 2018

Thanks you.
for values >= 0 this will work fine - I'll test this tonight in detail. I expect the same results as for my left gauges (the green ones) - without having to set ui_control.options - which would it make more clear...
for values <0 the justgage.js seems buggy. As setting e.g. -100 the libary will set in it internally to lowest min. e.g. -20 on top right red gauge. But it will still display up to zero.
That was why I asked as it might be related to the neagtive number issue in compass / donut.
But I'll come with detail testing and with ideas how to fix...

@dceejay
Copy link
Member

dceejay commented Apr 7, 2018

Not sure I get what you mean - if I now send -100 I get
image
so yes in my case I haven't hidden the pointer - but the value is correct - just the pointer is just like a real dial and stuck on the bottom stop.

@DDDanny
Copy link

DDDanny commented Apr 7, 2018

Yes. If I send it as value.
I send INVALID as value and set the ui _ control.options.value to e.g. -100.
Then it uses 0 for the scale instead of -100.
I'm currently not at home. As said I'll come back. Also with a small codebase to make it clear.

@dceejay
Copy link
Member

dceejay commented Apr 7, 2018

image

This is using the new code of course

@DDDanny
Copy link

DDDanny commented Apr 7, 2018

confirmed, the new code works like a charm! Now the gage is showing correctly including negative scales

grafik

big thanks 2 u @dceejay

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

No branches or pull requests

4 participants