拉斐尔矩形工具提示

发布于 2024-11-29 04:45:40 字数 231 浏览 8 评论 0原文

我正在循环中使用以下代码绘制一系列矩形

paper.rect(((x) * cellSize), ((y) * cellSize), cellSize, cellSize).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, cellSize).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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

还在原地等你 2024-12-06 04:45:40

这是一个简单的 Raphael 工具提示插件:http://www. strathausen.eu/en/2010/04/25/raphael-svg-tooltip/

虽然它明确提到了 SVG,但它在 IE 上应该可以正常工作(VML后端)也是如此。

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.

维持三分热 2024-12-06 04:45:40

尝试使用 title 属性。

element.attr({title: '鼠标悬停时显示的工具提示'});

Try the title attribute.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文