If I create a [`Label`][1] using Raphael, the default style is a black block with white text.
How can I change the background box colour, but not the text colour? I've tried:
paper.label(x, y, value).attr("fill", colour)
but that also fills the text and I end up with invisible text.
I also can't simply change the default colour in [this function][2] because I need to have a few different ones depending on a line that it's added to:
![enter image description here][3]
[1]: http://g.raphaeljs.com/reference.html#Element.label
[2]: https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L328
[3]: http://i.stack.imgur.com/km8ja.png
以上就是Change the background colour of a Raphael "Label"的详细内容,更多请关注web前端其它相关文章!