Bar colors - keeping the gradient when change the default color


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by F Webb on 25th April 2014
Hi Richard,
If I don't set colors to anything, the default is a nice gradiated orange. How do I set a color, but keep the gradient?   When I set colors to anything, it's a solid color, and no gradient. Thanks again
Posted by Richard on 25th April 2014
Hi there,

Use a gradient:

Gradient(red:white);


Resizing the canvas will mess up gradients though - so when you resize the canvas set:

obj.colorsParsed

to false.


Richard
www.rgraph.net
If RGraph has helped you - please share the website - thanks!

RGraph Priority Support: www.rgraph.net/support#priority-support
Posted by F Webb on 25th April 2014
Sorry being stupid, can you provide a code example of where gradient needs to be done - is it in the color setting?

Tried:
.set('colors', Gradient(red:white))
and that doesn't work.
Posted by Richard on 25th April 2014
Hi there,

www.rgraph.net/demos/basic-gradients.html






Richard
www.rgraph.net
If RGraph has helped you - please share the website - thanks!

RGraph Priority Support: www.rgraph.net/support#priority-support
Posted by F Webb on 25th April 2014
Thanks

Add a reply

 




« Back to message list
RGraph on social media