How can I use an image to clip a bar?

« 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 Rodrigo Aragón on 1st January 2016
Hi, I'd like to use a transparent image to clip a bar, this way as higher the bar filler the image.
Is there any way to do that?
Posted by Richard on 26th June 2014

Do you mean:

1. Something like this:


2. Draw an image inside each bar and as the bar gets bigger more of the image is revealed? If this
     is what you mean then you could draw the Bar chart and then use the obj.coords to clip the
     canvas (looping through each bar) (so anything that you draw on the canvas is only shown in
     that area) and then draw the image, with a Y cooordinate equal to 25 (the default top gutter).

Posted by Rodrigo Aragón on 27th June 2014
Thanks Richard, my question was more like option 2 but in the opposite way. I want to fill an image with a bar.
I solved it easier as I thought.
I paint a rectangle with the right height ans width properties and later I paint the image, with an area transparent, over. This way the rectangle paint first "fill" the image.

RGraph is very good!!

Add a reply

« Back to message list