Skip to content

add support for gradiens #14

Open
wants to merge 1 commit into from

5 participants

@eskimoblood

I've add support for gradients, gradients can be passed as a list of color stops like this 0, #firstColor, .5, #middleColor, 1, #lastColor
Take a look add example page

@eskimoblood

any changes of this pull request to make it in the master? If not, just close it.

@randallElliott randallElliott commented on the diff Sep 21, 2012
js/jquery.knob-1.1.0.js
ctx.strokeStyle = opt.fgColor;
}else{
ctx.strokeStyle = opt.tickColor;
}
- var tick_sa = (((2 * Math.PI) / ticks) * tick) - (0.5 * Math.PI);
+ var tick_sa = step * tick - halfPi;

What is a "tick" ? I noticed the latest version I have does not contain these vars. Btw any chance the gradient you have defined here will make it into the latest code? Would love to have this functionality:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@corey-c
corey-c commented Nov 7, 2012

Is there a demo for the radial gradients that works? I would love this feature but cant seem to figure out if or how it works.

@eskimoblood

Check out the branch and test it.

@marsanla

Hi, could you modify the last version from jquery.knob to add the gradient functionallity?

Thanks ;)

@Fatbat
Fatbat commented Mar 17, 2014

Can sweep gradients be supported? Essentially I'm trying to illustrate urgency so I'd like to have the time remaining on a countdown go from green to yellow to orange to red, the closer it gets to running out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.