带有可点击条形的 g.raphael 条形图
我想让堆叠条形图的每个部分(在我的例子中是水平的)可单击到特定的超链接(基本上是“向下钻取”)。我认为 g.bar.js 中没有这个功能,但是有人这样做过或者可以为我指出正确的方向吗?在点图上也很有用。
I'd like to make each segment of a stacked bar graph (horizontal in my case) clickable to a specific hyperlink (basically "drill down"). I don't think this functionality is in g.bar.js, but has anyone done this or can point me in the right direction? Would also be useful on dot charts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,发布问题似乎促使我弄清楚......
使用提供的演示条形图,我向 fin 函数添加了一行:
Okay, posting the question seems to have motivated me to figure it out...
Using the demo bar chart provided, I added a line to the fin function:
上面建议的 this.attr 对我不起作用,但这确实有效:
the suggested this.attr above didn't work for me, but this did: