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

Multiple gauge Problem #72

Closed
Sharagim opened this Issue May 20, 2015 · 11 comments

Comments

Projects
None yet
4 participants
@Sharagim

Sharagim commented May 20, 2015

Hi,
When using multiple instance of the gauge, all pointers have been overwritten by last pointer setting.
https://jsfiddle.net/d1ygogps/5/

@sohandsouza

This comment has been minimized.

Show comment
Hide comment
@sohandsouza

sohandsouza May 25, 2015

I believe I am encountering the same problem. If I change the color of one gauge's pointer, the color of the other one's pointer changes too, even though they are set with different option objects.

sohandsouza commented May 25, 2015

I believe I am encountering the same problem. If I change the color of one gauge's pointer, the color of the other one's pointer changes too, even though they are set with different option objects.

@jonkpirateboy

This comment has been minimized.

Show comment
Hide comment
@jonkpirateboy

jonkpirateboy Jun 5, 2015

I have the same problem.

jonkpirateboy commented Jun 5, 2015

I have the same problem.

@HunterJoe

This comment has been minimized.

Show comment
Hide comment
@HunterJoe

HunterJoe Aug 8, 2015

Updated your fiddle to use the correct instance of the gage in the first gauge's set method.
https://jsfiddle.net/HunterJoe/25tn1zw3/

Also your max value on the first gauge was 0.

HunterJoe commented Aug 8, 2015

Updated your fiddle to use the correct instance of the gage in the first gauge's set method.
https://jsfiddle.net/HunterJoe/25tn1zw3/

Also your max value on the first gauge was 0.

@Sharagim

This comment has been minimized.

Show comment
Hide comment
@Sharagim

Sharagim Aug 8, 2015

Thx for reply.
I put "gauge1.set(1260);" again and you can see what is happening.
Please see:
https://jsfiddle.net/30ujm879/

Sharagim commented Aug 8, 2015

Thx for reply.
I put "gauge1.set(1260);" again and you can see what is happening.
Please see:
https://jsfiddle.net/30ujm879/

@HunterJoe

This comment has been minimized.

Show comment
Hide comment
@HunterJoe

HunterJoe Aug 8, 2015

ok, so your latest fiddle does indeed work, and it is doing exactly what you are telling it to do.

You have gauge1.set(10) at the very bottom of your fiddle (line 44). Remove that, and it will "gauge" to the value set earlier of 1100, on line 20.

HunterJoe commented Aug 8, 2015

ok, so your latest fiddle does indeed work, and it is doing exactly what you are telling it to do.

You have gauge1.set(10) at the very bottom of your fiddle (line 44). Remove that, and it will "gauge" to the value set earlier of 1100, on line 20.

@Sharagim

This comment has been minimized.

Show comment
Hide comment
@Sharagim

Sharagim Aug 8, 2015

So how we can change values on fly? I have a ajax job which read values and I want to update them.

Sharagim commented Aug 8, 2015

So how we can change values on fly? I have a ajax job which read values and I want to update them.

@HunterJoe

This comment has been minimized.

Show comment
Hide comment
@HunterJoe

HunterJoe Aug 8, 2015

I do not believe there is a way to update the value in the fly. I do not think this script works that way, nor was meant to work that way.

I am sure it can be achieved, but it would not be a simple process. I'll try to work out a fiddle for you.

HunterJoe commented Aug 8, 2015

I do not believe there is a way to update the value in the fly. I do not think this script works that way, nor was meant to work that way.

I am sure it can be achieved, but it would not be a simple process. I'll try to work out a fiddle for you.

@Sharagim

This comment has been minimized.

Show comment
Hide comment
@Sharagim

Sharagim Aug 8, 2015

Thx for your reply.
Currently I am doing it in this way:
I put the OBJECT to a jquery data and each 5 sec a script will update each gauge according to last value. The only problem is this problem which you can see.

Sharagim commented Aug 8, 2015

Thx for your reply.
Currently I am doing it in this way:
I put the OBJECT to a jquery data and each 5 sec a script will update each gauge according to last value. The only problem is this problem which you can see.

@sohandsouza

This comment has been minimized.

Show comment
Hide comment
@sohandsouza

sohandsouza Aug 9, 2015

Hi, HunterJoe.

The pointer color setting for a single gauge is still overwriting pointers across all gauges. Am I setting it wrong?
https://jsfiddle.net/qjmdwcfy/

sohandsouza commented Aug 9, 2015

Hi, HunterJoe.

The pointer color setting for a single gauge is still overwriting pointers across all gauges. Am I setting it wrong?
https://jsfiddle.net/qjmdwcfy/

@HunterJoe

This comment has been minimized.

Show comment
Hide comment
@HunterJoe

HunterJoe Aug 10, 2015

No it looks like you are doing it right, this actually looks to be a bug in the core plugin.

Having multiple instances of the gauge does not allow for individual pointer colors, it instead picks up the settings from the last gauge instance. I would report this as a bug.

gauge1 pointer should be red.
gauge2 pointer should be blue.
Both are blue.
https://jsfiddle.net/HunterJoe/25tn1zw3/2/

HunterJoe commented Aug 10, 2015

No it looks like you are doing it right, this actually looks to be a bug in the core plugin.

Having multiple instances of the gauge does not allow for individual pointer colors, it instead picks up the settings from the last gauge instance. I would report this as a bug.

gauge1 pointer should be red.
gauge2 pointer should be blue.
Both are blue.
https://jsfiddle.net/HunterJoe/25tn1zw3/2/

@sohandsouza

This comment has been minimized.

Show comment
Hide comment
@sohandsouza

sohandsouza Aug 10, 2015

Wow, then it happens even if the pointer color is set in the initial declaration of the options.

sohandsouza commented Aug 10, 2015

Wow, then it happens even if the pointer color is set in the initial declaration of the options.

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