添加MD-提示为SVG图表? [英] Adding md-tooltip to a SVG chart?

查看:371
本文介绍了添加MD-提示为SVG图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个例子:

<svg>
    <g ng-repeat="rect in rectList">
        <rect ng-attr-fill="rect.fill"
              ng-attr-x="rect.x"
              ng-attr-y="rect.y"
              ng-attr-width="rect.width"
              ng-attr-height="rect.height"></rect>
    </g>
</svg>

我要添加&LT; MD-提示&GT; 来这些rects的。我能做到这一点不知?我讲的是角材料工具提示具体而言,没有任何其他的提示从其他实施库。

I want to add a <md-tooltip> to each of these rects. Can I do it somehow? I am talking about the Angular Material Tooltip specifically, not any other tooltip implementation from other libraries.

推荐答案

尝试把它包在一个div和运用MD-提示

Try to wrap it in a div and apply the md-tooltip

<div ng-repeat="status in statuses">
   <md-tooltip md-direction="right">
     {{status.description}}
    </md-tooltip>     
<svg >
   <rect width="300" height="100"   >
   </rect>          
</svg>
</div>

下面是工作 示例

Here is the working Sample

这篇关于添加MD-提示为SVG图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆