6

raphael.jsまたはd3.jsを使用して ember.js ビューをレンダリングしたいと思います。私の理解では、これを行うことは可能ですが、すべてのドキュメントを読んでグーグルで調べた後、これを機能させる方法がわかりません。助言がありますか?

Hello World の例は、少なくとも私が正しい道を歩み始めるのに理想的です。

4

3 に答える 3

4

There is a blog post by Johannes Fahrenkrug, using Raphael.js with Sproutcore 2.0 http://blog.sproutcore.com/using-raphael-js-with-sproutcore-2-0/. The code is hosted at https://github.com/jfahrenkrug/sproutcore-raphael.

Since Ember.js kinda evolved from Sproutcore 2.0, it shouldn't be to much work to use the existing code. Iv'e ported the excellent example by Johannes to Ember.js and created a JSFiddle, see http://jsfiddle.net/pangratz666/BHYgQ/. You should definitely check out the project on GitHub.

My ported example is hosted on GitHub and can be seen live at http://pangratz.github.com/ember-raphael.


As for D3, you can take a look at Alex Rothenberg's post Combining D3 and Ember to Build Interactive Maps.

于 2012-05-24T14:25:46.807 に答える
1

alex rothenberg による次の優れたブログ投稿を参照してください。

http://www.alexrothenberg.com/2012/05/30/interactive-maps-with-d3-and-ember.html

于 2012-06-01T07:08:37.920 に答える
0

DC.js Crossfilter + D3 Charts を Ember Components https://github.com/andrewreedy/ember-dcに移植しました

于 2014-02-15T13:03:17.840 に答える