Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道 Protovis 并不是真的要以这种方式使用,但是有没有一种解决方法可以破坏当前在一个面板中的内容pv.Panel并重新add()和重新render()启动面板?
pv.Panel
add()
render()
我正在研究一个构建为静态的可视化,并尝试将其迁移到通过 WebSockets 定期更新。
是的,您可以在不破坏面板的情况下重新渲染 Protovis。您可以更新面板使用的数据,并再次对其调用渲染。例如:
var data = [1, 2, 3]; var panel = new pv.Panel() .data(data) .add(pv.Bar) ... panel.render(); // initial render data = [4, 5, 6]; panel.data(data); // update the data panel.render(); // re-render