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

double needle #33

Closed
stevemarion opened this issue Feb 2, 2015 · 6 comments
Closed

double needle #33

stevemarion opened this issue Feb 2, 2015 · 6 comments

Comments

@stevemarion
Copy link

Hello,
When I use multiple gauge at the same time, all except the first one get double needle
gauge
These gauges are generated by the same code and should not difer
gauge-code
Thank you.

Edit
double neelde ocur pretty randomly
gauge_bug2

@stevemarion
Copy link
Author

I have found the source of the error.
When providing data-value argument, the draw function is called twice, once when setting the value with setRawValue (l860) and once when calling drawing explicitely (l867).
As I don't use the JS api I have corrected my problem by commenting the draw on setRawValue, it works fine now.

@Sieberkev
Copy link

I came here with the same issue (sometimes I had >12 needles on different gauges, all completely random).

Setting the value in the gauge options (instead of using .setValue() as in the examples on the website) fixed the problem too.

@Mikhus
Copy link
Owner

Mikhus commented Mar 1, 2016

Can't reproduce it with the latest code. Could you, please, confirm issue still exists in a version 1.0.1 or later?

@Sieberkev
Copy link

Updated to 1.0.2 today and using .setValue() on multiple gauges on the same page does not draw multiple needles anymore 😃

@Mikhus
Copy link
Owner

Mikhus commented Apr 14, 2016

OK, thank you, @Sieberkev! So I close this issue then.

@Mikhus Mikhus closed this as completed Apr 14, 2016
@nickleman
Copy link

Is there a way I can intentionally get multiple needles on a gauge?

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

No branches or pull requests

4 participants