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

Labels and gradient customization #52

Closed
dkroondijk opened this issue Sep 17, 2015 · 11 comments
Closed

Labels and gradient customization #52

dkroondijk opened this issue Sep 17, 2015 · 11 comments

Comments

@dkroondijk
Copy link

Hi, just have a couple of quick questions. I've been struggling to implement the following customizations.

  • How do you change the gradient such that the second color is the end color of the circle? (ie. there would be a hard transition between the end and start color instead of fading back into the start color)
  • How do I add a label/image to the end value of the progress bar?

I've added the image below for illustration.

screen shot 2015-09-17 at 3 44 34 pm

Any help would be much appreciated!

@kottenator
Copy link
Owner

Hi! I will crete a snippet for you on this weekend (sorry, can't do this right now)

@dkroondijk
Copy link
Author

Wow, thanks for the quick reply and thanks for your help, much appreciated! Great plugin btw!

@kottenator
Copy link
Owner

Here is my snippet.

Answering to your questions:

  • you're looking for conical asymmetric gradient which is not available for <canvas> yet. But there is a way to make it - using image fill (that's what I do in my snippet)
  • adding a label to the arc end point is a bit tricky - you have to calculate coordinates by yourself (see my snippet code)

@dkroondijk
Copy link
Author

That's perfect! Thanks again so much for your help and your time.

@kottenator
Copy link
Owner

Here is an updated version of the snippet that also animates the value.

@GolovskoyNickolay
Copy link

GolovskoyNickolay commented Aug 22, 2016

Hi, how can I create this background square like in your examples?

@kottenator
Copy link
Owner

@PowerfulPaw : I didn't quite get you - what square?

@GolovskoyNickolay
Copy link

@kottenator
Copy link
Owner

kottenator commented Aug 23, 2016

Oh, I see. That's a conical gradient - you can create it in many graphical editors (Photoshop, GIMP, etc). Sorry, I haven't found a good tutorial but I'm sure you'll handle it ;)

@GolovskoyNickolay
Copy link

Thanks for answer, I thought I could make it with CSS.

@kottenator
Copy link
Owner

Unfortunately, it's only in CSS4 draft yet :(

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

No branches or pull requests

3 participants