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

Animation issue when the minValue is negative #11

Open
masoudhaghi opened this Issue Sep 3, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@masoudhaghi

masoudhaghi commented Sep 3, 2016

The issue raise when you set the minValueto a negative number and you use animate function to display the indicator. The issue is caused by the line 355 in the source code where it calculate the incremental value for the animation function. The issue cause the animation to be lagging and the indicator number to be displayed with floating numbers.

Line 355:
incBy = (maxVal - minVal) / frameNum; //increment by .2% on every tick and 1% if showing as percentage

Solutions:

  1. Modify the source code and assign a fixed value to incBy, the issue is when your indicators doesn't have same range of values it may cause the indicators with higher values complete the animation cycle longer than others.
  2. While declaring the indicators, pass the frameNum value based on your min and max value range to achieve a desirable animation speed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment