简单任务(SVG vs. Canvas) [英] Simple task (SVG vs. Canvas)

查看:133
本文介绍了简单任务(SVG vs. Canvas)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想制作200个可点击节点(捕获鼠标事件),这些节点通过线连接。
每个节点都有一些与实时数据流相关的数据(为简单起见假设为CSV),点击节点显示图形中绘制的值。

I just want to make 200 clickable nodes (capture mouse events) which are connected by lines. Each node has some data associated with them in form of live data streams ( for simplicity assume CSVs) and clicking on node shows up the values plotted in a graph.


  • 所有这些节点和线所在的区域应该是可放大的。

即使googling了很多,我困惑了一些简单的SVG更适合或Canvas。
此外,什么图书馆将是最好的目的。像Canvas我们有KineticJS(与HTML5)和SVGs我们有d3和所有。

Even after googling a lot, I confused for something as simple as this SVG is more suited or Canvas. Moreover what libraries will be best for the purpose. Like for Canvas we have KineticJS (with HTML5) and for SVGs we have d3 and all.

专家,请建议。非常感谢提前。

Experts, Please suggest. Thanks a lot in advance.

推荐答案

SVG是更好的方法。
Canvas没有鼠标事件,你可以使用拾取技术。

SVG is way better for that. Canvas has no mouse events, you would have use a picking technic.

这篇关于简单任务(SVG vs. Canvas)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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