When using multiple instance of the gauge, all pointers have been overwritten by last pointer setting.
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.
I have the same problem.
Updated your fiddle to use the correct instance of the gage in the first gauge's set method.
Also your max value on the first gauge was 0.
Thx for reply.
I put "gauge1.set(1260);" again and you can see what is happening.
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.
So how we can change values on fly? I have a ajax job which read values and I want to update them.
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.
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.
The pointer color setting for a single gauge is still overwriting pointers across all gauges. Am I setting it wrong?
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.
Wow, then it happens even if the pointer color is set in the initial declaration of the options.
Fixed #72: Fixed a bug causing all gauge pointers to have the same co…
Fixed pointer color problem (issue #72) (#113)
Fixed #72: Fixed a bug causing all gauge pointers to have the same color.