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

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

问题描述

我试图创建我的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

推荐答案

为了使角和其他框架发挥好是包装用指令其他的框架。

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

http://docs.angularjs.org/guide/directive

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

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

<一个href=\"http://sullerandras.github.com/SVG-Sequence-Diagram/\">http://sullerandras.github.com/SVG-Sequence-Diagram/

下面是一个封装TinyMCE的一个例子

Here is an example that wraps TinyMCE

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

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

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