D3在AngularJS应用程序 [英] D3 within an AngularJS app

查看:113
本文介绍了D3在AngularJS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用AngularJS创建我的第一个应用程序。它看起来很整洁,但有很多抽象,我只是好奇,如果有人有最好的方式使用角度方法来更新用d3js创建的视觉效果的建议。

I'm trying to create my first app with AngularJS. It looks neat, but there's a lot of abstraction, and I'm just curious if anyone has advice on the most idiomatic way to use the angular methodology to update visuals created with d3js.

感谢,
bp

Thanks, bp

推荐答案

为了让angular和其他框架玩得更好,其他框架使用指令。

In order to make angular and other frameworks play nice is to wrap the "other" frameworks using directives.

http://docs.angularjs.org/指南/指令

你想做的事情是告诉角色,当数据已被其他框架更新。如果angular不需要知道,那么你的任务更简单。

The thing that you want to do is to tell angular when data has been updated by the "other" frameworks. If angular doesn't need to know, then your task is simpler.

以下是一个适用于SVG及其真棒的示例

Here is an example that works with SVG, its awesome

http://sullerandras.github.com/SVG-Sequence-Diagram/

这里是一个包装TinyMCE的示例

Here is an example that wraps TinyMCE

http://jsfiddle.net/programmieraffe/kjsEV/

这篇关于D3在AngularJS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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