2010-11-09 01:34:14 +03:00
|
|
|
# D3
|
2010-09-29 04:36:53 +04:00
|
|
|
|
2010-11-09 01:34:14 +03:00
|
|
|
**D3** is a small, free JavaScript library for manipulating HTML documents
|
2010-09-29 04:36:53 +04:00
|
|
|
based on data. D3 can help you quickly visualize your data as HTML or SVG,
|
2010-11-09 01:34:14 +03:00
|
|
|
handle interactivity, and incorporate smooth transitions and staged animations
|
2010-11-09 01:51:07 +03:00
|
|
|
into your pages. You can use D3 as a visualization framework (like Protovis),
|
|
|
|
or you can use it to build dynamic pages (like jQuery).
|
2010-11-09 01:34:14 +03:00
|
|
|
|
2010-11-09 01:51:07 +03:00
|
|
|
### Browser Support
|
2010-11-09 01:34:14 +03:00
|
|
|
|
|
|
|
D3 should work on any browser, with minimal requirements such as JavaScript
|
2011-02-25 21:01:34 +03:00
|
|
|
and the [W3C DOM](http://www.w3.org/DOM/) API. By default D3 requires the
|
|
|
|
[Selectors API](http://www.w3.org/TR/selectors-api/) Level 1, but you can
|
|
|
|
preload [Sizzle](http://sizzlejs.com/) for compatibility with older browsers.
|
|
|
|
Some of the included D3 examples use additional browser features, such as
|
2010-11-09 01:34:14 +03:00
|
|
|
[SVG](http://www.w3.org/TR/SVG/) and [CSS3
|
|
|
|
Transitions](http://www.w3.org/TR/css3-transitions/). These features are not
|
2011-02-25 21:01:34 +03:00
|
|
|
required to use D3, but are useful for visualization! D3 is not a
|
2010-11-09 01:34:14 +03:00
|
|
|
compatibility layer. The examples should work on Firefox, Chrome (Chromium),
|
|
|
|
Safari (WebKit), Opera and IE9.
|
2010-11-05 05:02:08 +03:00
|
|
|
|
2011-02-25 21:01:34 +03:00
|
|
|
Note: Chrome has strict permissions for reading files out of the local file
|
|
|
|
system. To view some of the examples locally, you will need to start a local web
|
2010-11-05 05:02:08 +03:00
|
|
|
server. One easy way to do that is to install Tornado:
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
git clone https://github.com/facebook/tornado.git
|
2010-12-10 01:46:45 +03:00
|
|
|
cd tornado
|
2010-11-05 05:02:08 +03:00
|
|
|
sudo python setup.py install
|
2010-12-10 01:46:45 +03:00
|
|
|
cd ../d3
|
2010-11-05 05:02:08 +03:00
|
|
|
|
|
|
|
We have provided a Tornado script for serving static files:
|
|
|
|
|
|
|
|
python examples
|
|
|
|
|
|
|
|
Once this is running, go to: <http://0.0.0.0:8888/examples/index.html>
|