开发者

Raphael Rectangle Tooltip

开发者 https://www.devze.com 2023-03-27 12:42 出处:网络
I am drawing series of rectangle using the following code in a loop paper.rect(((x) * cellSize), ((y) * cellSize), cellSize, cellSiz开发者_如何学Ce).attr({ fill: rgbx, stroke: rgbx });

I am drawing series of rectangle using the following code in a loop

paper.rect(((x) * cellSize), ((y) * cellSize), cellSize, cellSiz开发者_如何学Ce).attr({ fill: rgbx, stroke: rgbx });

Is there a way show tooltip on those rectangle? Is there a library that can show ballon tooltip (fadding)

I found similar question but not sure it can be done?


Here's a simple Raphael plugin for tooltips: http://www.strathausen.eu/en/2010/04/25/raphael-svg-tooltip/

Although it mentiones SVG explicitly, it should work just fine on IE (VML backend) as well.


Try the title attribute.

element.attr({title: 'The tooltip to be displayed on mouse hover'});

0

精彩评论

暂无评论...
验证码 换一张
取 消