├── .gitignore ├── .gitmodules ├── .travis.yml ├── HISTORY.md ├── IfYouRefuseToListen.md ├── LICENSE ├── Makefile ├── README.md ├── examples ├── area │ ├── area.html │ └── data.tsv ├── bar │ ├── bar.html │ └── data.tsv ├── chord.html ├── cluster │ ├── cluster.html │ └── flare.json ├── d3_examples │ └── line │ │ ├── line-defined.html │ │ ├── line-radial-defined.html │ │ ├── line-radial.html │ │ └── line.html ├── donut │ ├── data.csv │ └── donut.html ├── gears.html ├── grouped_bar │ ├── data.csv │ └── grouped_bar.html ├── line │ ├── data.tsv │ └── line.html ├── multiseries │ ├── data.tsv │ └── line.html ├── pie │ ├── data.csv │ └── pie.html ├── quartz │ ├── data.csv │ └── quartz.html ├── scatterplot │ ├── data.tsv │ └── scatterplot.html └── stacked_bar │ ├── data.csv │ └── stacked_bar.html ├── lib ├── compat │ ├── compat.js │ └── json3.min.js └── sizzle │ └── sizzle.js ├── package.json ├── r2d3.js ├── r2d3.min.js ├── src ├── compat │ └── style.js ├── core │ ├── README.md │ ├── format.js │ ├── selection-append.js │ ├── selection-classed.js │ ├── selection-on.js │ ├── selection-style.js │ ├── selection-text.js │ ├── selection.js │ ├── transform.js │ ├── transition-style.js │ └── xhr.js └── raphael │ ├── element.js │ └── raphael.js └── tests ├── core ├── append-tests.js ├── attr-tests.js ├── group-tests.js ├── selection-classed-tests.js ├── selection-remove-tests.js ├── selection-tests.js ├── style-tests.js ├── text-tests.js └── transform-tests.js └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | //vim swap files 3 | *.swp 4 | //vim Session files 5 | Session.vim 6 | node_modules/ 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/d3"] 2 | path = lib/d3 3 | url = git://github.com/mbostock/d3.git 4 | [submodule "lib/raphael"] 5 | path = lib/raphael 6 | url = git://github.com/DmitryBaranovskiy/raphael.git 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.6 5 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.2.0 / 2013-04-?? 2 | ================== 3 | 4 | * Add support ```selection.classed```. [Bug 57](https://github.com/mhemesath/r2d3/issues/57) 5 | * Handle R2D3Elements in insertBefore. [Bug 84](https://github.com/mhemesath/r2d3/issues/84) 6 | * Remove raphael elements from children dom nodes when removing a dom node. [Bug 89](https://github.com/mhemesath/r2d3/issues/89) 7 | * Don't attempt to initialize raphael node when events are attached. 8 | * Return empty string when converting null SVG transforms to Raphael transforms. 9 | * Redrawing text elements throws an exception in IE8. [Bug 109](https://github.com/mhemesath/r2d3/pull/110). Thanks @sbshetty01! 10 | * Added support for polygon/polyline. [Bug 108](https://github.com/mhemesath/r2d3/pull/108). Thanks @tianon! 11 | 12 | 0.1.1 / 2013-03-18 13 | ================== 14 | 15 | * Patch d3 compat/style. [Bug 83](https://github.com/mhemesath/r2d3/issues/83) 16 | 17 | 0.1.0 / 2013-03-17 18 | ================== 19 | 20 | * Updated D3 to 3.0.8 21 | * Updated examples to match v3.0.8 22 | * Refactor R2D3 to use wrapper for DOM and Raphael objects. 23 | * Cache SVG to Raphael transform Strings 24 | * Change R2D3 reference on DOM nodes to be more direct 25 | * Move Raphael paper extensions to R2D3 element wrapper. 26 | * Enable setting SVG height/width via css -------------------------------------------------------------------------------- /IfYouRefuseToListen.md: -------------------------------------------------------------------------------- 1 | r2d3 2 | ============== 3 | 4 | About r2d3 5 | ========== 6 | 7 | R2D3 is a customized build of D3 powered by [RaphaelJS](http://raphaeljs.com/). The combination of D3 and Raphael enable developers to easily 8 | build data visualizations that work in IE7+ and all modern browsers. 9 | 10 | 11 | Updating to v0.1.0 (2013-3-17) 12 | ------------------------------ 13 | 14 | * R2D3 now using v3.0.8 of D3. Update your code accordingly. 15 | * The ``` 32 | 33 | 34 | 35 |

Hello, world!

36 | 37 | 38 | ``` 39 | 40 | Should I use R2D3? 41 | ------------------ 42 | 43 | R2D3 is an attempt to shim SVG functionality via Rapahel to be consumed by D3. Although R2D3 handles most basic SVG functionality, it will 44 | never be able to completely shim every feature of SVG. Also, as Internet Explorer 7 & 8 are older browsers, longer rendering times can be expected. 45 | 46 | I recommend to try out R2D3 on each of your visualizations to ensure the shim functions correctly for that specific use case. 47 | If you find an issue, please log a bug so it can either be patched, or documented as a limitation. 48 | 49 | In general, R2D3 works great for smaller, simpler visualizations with limited animations and interactivity. 50 | 51 | Limitations 52 | ----------- 53 | 54 | See the issues page for a listing of known issues. In addition this 55 | includes: 56 | 57 | ### `````` ### 58 | Use is not supported. 59 | 60 | ###````````### 61 | * The ```dx``` and ```dy``` attributes of text are not yet supported. In the meantime, adjust the ```x``` and ```y``` attributes. 62 | 63 | ###```Transforms```### 64 | * Ensure translations declare both the X and Y coordinates. Example: 65 | 66 | 67 | ```javascript 68 | // BAD 69 | circles.transform('translate(20)'); 70 | 71 | // GOOD 72 | circles.transform('translate(20,0)'); 73 | ``` 74 | 75 | Who is using R2D3? 76 | ------------------ 77 | 78 | If you'd like to add a D3 visualization you've made IE compatible with R2D3, issue a pull request and add it here! 79 | 80 | 81 | Developers 82 | ---------- 83 | ### D3 ### 84 | D3 is included in this project as as submodule. To pull down D3 for a build run: 85 | 86 | ``` 87 | $ git submodule init 88 | $ git submodule update 89 | ``` 90 | 91 | ### Build Commands ### 92 | We have included a makefile to build a custom version of D3 packaged with r2d3. 93 | 94 | + **dependencies** 95 | Our makefile depends on you having recess, uglify.js. To install, just run the following command in npm: 96 | 97 | ``` 98 | $ npm install uglify-js -g 99 | ``` 100 | 101 | + **build** - `make` 102 | Runs the makefile to concatenate and minify r2d3.js 103 | 104 | 105 | 106 | Click here to lend your support to: R2D3 and make a donation at www.pledgie.com ! 107 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Michael Hemesath 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # See the README for installation instructions. 2 | LOCALE ?= en_US 3 | 4 | all: \ 5 | r2d3.js \ 6 | r2d3.min.js 7 | 8 | # Modify this rule to build your own custom release. 9 | .INTERMEDIATE r2d3.js: \ 10 | lib/raphael/raphael.js \ 11 | lib/sizzle/sizzle.js \ 12 | lib/compat/compat.js \ 13 | lib/compat/json3.min.js \ 14 | lib/d3/src/start.js \ 15 | r2d3.core.js \ 16 | r2d3.scale.js \ 17 | r2d3.svg.js \ 18 | r2d3.raphael.js \ 19 | r2d3.behavior.js \ 20 | r2d3.layout.js \ 21 | r2d3.dsv.js \ 22 | r2d3.geo.js \ 23 | r2d3.geom.js \ 24 | r2d3.time.js \ 25 | lib/d3/src/end.js 26 | 27 | r2d3.raphael.js: \ 28 | src/raphael/element.js \ 29 | src/raphael/raphael.js 30 | 31 | r2d3.core.js: \ 32 | lib/d3/src/core/core.js \ 33 | lib/d3/src/core/format-$(LOCALE).js \ 34 | lib/d3/src/compat/date.js \ 35 | src/compat/style.js \ 36 | lib/d3/src/core/class.js \ 37 | lib/d3/src/core/array.js \ 38 | lib/d3/src/core/map.js \ 39 | lib/d3/src/core/identity.js \ 40 | lib/d3/src/core/true.js \ 41 | lib/d3/src/core/functor.js \ 42 | lib/d3/src/core/rebind.js \ 43 | lib/d3/src/core/ascending.js \ 44 | lib/d3/src/core/descending.js \ 45 | lib/d3/src/core/mean.js \ 46 | lib/d3/src/core/median.js \ 47 | lib/d3/src/core/min.js \ 48 | lib/d3/src/core/max.js \ 49 | lib/d3/src/core/extent.js \ 50 | lib/d3/src/core/random.js \ 51 | lib/d3/src/core/number.js \ 52 | lib/d3/src/core/sum.js \ 53 | lib/d3/src/core/quantile.js \ 54 | lib/d3/src/core/shuffle.js \ 55 | lib/d3/src/core/transpose.js \ 56 | lib/d3/src/core/zip.js \ 57 | lib/d3/src/core/bisect.js \ 58 | lib/d3/src/core/nest.js \ 59 | lib/d3/src/core/keys.js \ 60 | lib/d3/src/core/values.js \ 61 | lib/d3/src/core/entries.js \ 62 | lib/d3/src/core/permute.js \ 63 | lib/d3/src/core/merge.js \ 64 | lib/d3/src/core/collapse.js \ 65 | lib/d3/src/core/range.js \ 66 | lib/d3/src/core/requote.js \ 67 | lib/d3/src/core/round.js \ 68 | src/core/xhr.js \ 69 | lib/d3/src/core/text.js \ 70 | lib/d3/src/core/json.js \ 71 | lib/d3/src/core/html.js \ 72 | lib/d3/src/core/xml.js \ 73 | lib/d3/src/core/ns.js \ 74 | lib/d3/src/core/dispatch.js \ 75 | src/core/format.js \ 76 | lib/d3/src/core/formatPrefix.js \ 77 | lib/d3/src/core/ease.js \ 78 | lib/d3/src/core/event.js \ 79 | src/core/transform.js \ 80 | lib/d3/src/core/interpolate.js \ 81 | lib/d3/src/core/uninterpolate.js \ 82 | lib/d3/src/core/color.js \ 83 | lib/d3/src/core/rgb.js \ 84 | lib/d3/src/core/hsl.js \ 85 | lib/d3/src/core/hcl.js \ 86 | lib/d3/src/core/lab.js \ 87 | lib/d3/src/core/xyz.js \ 88 | src/core/selection.js \ 89 | lib/d3/src/core/selection-select.js \ 90 | lib/d3/src/core/selection-selectAll.js \ 91 | lib/d3/src/core/selection-attr.js \ 92 | src/core/selection-classed.js \ 93 | src/core/selection-style.js \ 94 | lib/d3/src/core/selection-property.js \ 95 | src/core/selection-text.js \ 96 | lib/d3/src/core/selection-html.js \ 97 | src/core/selection-append.js \ 98 | lib/d3/src/core/selection-insert.js \ 99 | lib/d3/src/core/selection-remove.js \ 100 | lib/d3/src/core/selection-data.js \ 101 | lib/d3/src/core/selection-datum.js \ 102 | lib/d3/src/core/selection-filter.js \ 103 | lib/d3/src/core/selection-order.js \ 104 | lib/d3/src/core/selection-sort.js \ 105 | src/core/selection-on.js \ 106 | lib/d3/src/core/selection-each.js \ 107 | lib/d3/src/core/selection-call.js \ 108 | lib/d3/src/core/selection-empty.js \ 109 | lib/d3/src/core/selection-node.js \ 110 | lib/d3/src/core/selection-transition.js \ 111 | lib/d3/src/core/selection-root.js \ 112 | lib/d3/src/core/selection-enter.js \ 113 | lib/d3/src/core/selection-enter-select.js \ 114 | lib/d3/src/core/transition.js \ 115 | lib/d3/src/core/transition-select.js \ 116 | lib/d3/src/core/transition-selectAll.js \ 117 | lib/d3/src/core/transition-filter.js \ 118 | lib/d3/src/core/transition-attr.js \ 119 | src/core/transition-style.js \ 120 | lib/d3/src/core/transition-text.js \ 121 | lib/d3/src/core/transition-remove.js \ 122 | lib/d3/src/core/transition-ease.js \ 123 | lib/d3/src/core/transition-delay.js \ 124 | lib/d3/src/core/transition-duration.js \ 125 | lib/d3/src/core/transition-each.js \ 126 | lib/d3/src/core/transition-transition.js \ 127 | lib/d3/src/core/transition-tween.js \ 128 | lib/d3/src/core/timer.js \ 129 | lib/d3/src/core/mouse.js \ 130 | lib/d3/src/core/touches.js \ 131 | lib/d3/src/core/noop.js 132 | 133 | r2d3.scale.js: \ 134 | lib/d3/src/scale/scale.js \ 135 | lib/d3/src/scale/nice.js \ 136 | lib/d3/src/scale/linear.js \ 137 | lib/d3/src/scale/bilinear.js \ 138 | lib/d3/src/scale/polylinear.js \ 139 | lib/d3/src/scale/log.js \ 140 | lib/d3/src/scale/pow.js \ 141 | lib/d3/src/scale/sqrt.js \ 142 | lib/d3/src/scale/ordinal.js \ 143 | lib/d3/src/scale/category.js \ 144 | lib/d3/src/scale/quantile.js \ 145 | lib/d3/src/scale/quantize.js \ 146 | lib/d3/src/scale/threshold.js \ 147 | lib/d3/src/scale/identity.js 148 | 149 | r2d3.svg.js: \ 150 | lib/d3/src/svg/svg.js \ 151 | lib/d3/src/svg/arc.js \ 152 | lib/d3/src/svg/line.js \ 153 | lib/d3/src/svg/line-radial.js \ 154 | lib/d3/src/svg/area.js \ 155 | lib/d3/src/svg/area-radial.js \ 156 | lib/d3/src/svg/chord.js \ 157 | lib/d3/src/svg/diagonal.js \ 158 | lib/d3/src/svg/diagonal-radial.js \ 159 | lib/d3/src/svg/symbol.js \ 160 | lib/d3/src/svg/axis.js \ 161 | lib/d3/src/svg/brush.js 162 | 163 | r2d3.behavior.js: \ 164 | lib/d3/src/behavior/behavior.js \ 165 | lib/d3/src/behavior/drag.js \ 166 | lib/d3/src/behavior/zoom.js 167 | 168 | r2d3.layout.js: \ 169 | lib/d3/src/layout/layout.js \ 170 | lib/d3/src/layout/bundle.js \ 171 | lib/d3/src/layout/chord.js \ 172 | lib/d3/src/layout/force.js \ 173 | lib/d3/src/layout/partition.js \ 174 | lib/d3/src/layout/pie.js \ 175 | lib/d3/src/layout/stack.js \ 176 | lib/d3/src/layout/histogram.js \ 177 | lib/d3/src/layout/hierarchy.js \ 178 | lib/d3/src/layout/pack.js \ 179 | lib/d3/src/layout/cluster.js \ 180 | lib/d3/src/layout/tree.js \ 181 | lib/d3/src/layout/treemap.js 182 | 183 | r2d3.geo.js: \ 184 | lib/d3/src/geo/geo.js \ 185 | lib/d3/src/geo/stream.js \ 186 | lib/d3/src/geo/spherical.js \ 187 | lib/d3/src/geo/cartesian.js \ 188 | lib/d3/src/geo/resample.js \ 189 | lib/d3/src/geo/albers-usa.js \ 190 | lib/d3/src/geo/albers.js \ 191 | lib/d3/src/geo/azimuthal-equal-area.js \ 192 | lib/d3/src/geo/azimuthal-equidistant.js \ 193 | lib/d3/src/geo/bounds.js \ 194 | lib/d3/src/geo/centroid.js \ 195 | lib/d3/src/geo/circle.js \ 196 | lib/d3/src/geo/clip.js \ 197 | lib/d3/src/geo/clip-antimeridian.js \ 198 | lib/d3/src/geo/clip-circle.js \ 199 | lib/d3/src/geo/compose.js \ 200 | lib/d3/src/geo/equirectangular.js \ 201 | lib/d3/src/geo/gnomonic.js \ 202 | lib/d3/src/geo/graticule.js \ 203 | lib/d3/src/geo/haversin.js \ 204 | lib/d3/src/geo/interpolate.js \ 205 | lib/d3/src/geo/greatArc.js \ 206 | lib/d3/src/geo/mercator.js \ 207 | lib/d3/src/geo/orthographic.js \ 208 | lib/d3/src/geo/path.js \ 209 | lib/d3/src/geo/path-buffer.js \ 210 | lib/d3/src/geo/path-context.js \ 211 | lib/d3/src/geo/path-area.js \ 212 | lib/d3/src/geo/path-centroid.js \ 213 | lib/d3/src/geo/area.js \ 214 | lib/d3/src/geo/centroid.js \ 215 | lib/d3/src/geo/projection.js \ 216 | lib/d3/src/geo/rotation.js \ 217 | lib/d3/src/geo/stereographic.js \ 218 | lib/d3/src/geo/azimuthal.js 219 | 220 | r2d3.dsv.js: \ 221 | lib/d3/src/dsv/dsv.js \ 222 | lib/d3/src/dsv/csv.js \ 223 | lib/d3/src/dsv/tsv.js 224 | 225 | r2d3.time.js: \ 226 | lib/d3/src/time/time.js \ 227 | lib/d3/src/time/format-$(LOCALE).js \ 228 | lib/d3/src/time/format.js \ 229 | lib/d3/src/time/format-utc.js \ 230 | lib/d3/src/time/format-iso.js \ 231 | lib/d3/src/time/interval.js \ 232 | lib/d3/src/time/second.js \ 233 | lib/d3/src/time/minute.js \ 234 | lib/d3/src/time/hour.js \ 235 | lib/d3/src/time/day.js \ 236 | lib/d3/src/time/week.js \ 237 | lib/d3/src/time/month.js \ 238 | lib/d3/src/time/year.js \ 239 | lib/d3/src/time/scale.js \ 240 | lib/d3/src/time/scale-utc.js 241 | 242 | r2d3.geom.js: \ 243 | lib/d3/src/geom/geom.js \ 244 | lib/d3/src/geom/hull.js \ 245 | lib/d3/src/geom/polygon.js \ 246 | lib/d3/src/geom/voronoi.js \ 247 | lib/d3/src/geom/delaunay.js \ 248 | lib/d3/src/geom/quadtree.js 249 | 250 | %.min.js: %.js Makefile 251 | @rm -f $@ 252 | @uglifyjs $< -c -m -o $@ 253 | 254 | r2d3%js: Makefile 255 | @rm -f $@ 256 | @cat $(filter %.js,$^) > $@.tmp 257 | @uglifyjs $@.tmp -b indent-level=2 -o $@ 258 | @rm $@.tmp 259 | @chmod a-w $@ 260 | 261 | lib/d3/src/core/format-$(LOCALE).js: lib/d3/src/locale.js lib/d3/src/core/format-locale.js 262 | LC_NUMERIC=$(LOCALE) locale -ck LC_NUMERIC | node lib/d3/src/locale.js lib/d3/src/core/format-locale.js > $@ 263 | 264 | lib/d3/src/time/format-$(LOCALE).js: lib/d3/src/locale.js lib/d3/src/time/format-locale.js 265 | LC_TIME=$(LOCALE) locale -ck LC_TIME | node lib/d3/src/locale.js lib/d3/src/time/format-locale.js > $@ 266 | 267 | .INTERMEDIATE: \ 268 | lib/d3/src/core/format-$(LOCALE).js \ 269 | lib/d3/src/time/format-$(LOCALE).js 270 | 271 | clean: 272 | rm -f r2d3*.js 273 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | r2d3 2 | ============== 3 | 4 | This is a dead project. 5 | 6 | Getting Started 7 | --------------- 8 | 9 | Don't. 10 | 11 | Should I use R2D3? 12 | ------------------ 13 | 14 | No. 15 | 16 | 17 | Developers 18 | ---------- 19 | Stop supporting IE < 9 20 | 21 | 22 | 23 | Click here to lend your support to: R2D3 and make a donation at www.pledgie.com ! 24 | -------------------------------------------------------------------------------- /examples/area/area.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 93 | -------------------------------------------------------------------------------- /examples/area/data.tsv: -------------------------------------------------------------------------------- 1 | date close 2 | 1-May-12 582.13 3 | 30-Apr-12 583.98 4 | 27-Apr-12 603.00 5 | 26-Apr-12 607.70 6 | 25-Apr-12 610.00 7 | 24-Apr-12 560.28 8 | 23-Apr-12 571.70 9 | 20-Apr-12 572.98 10 | 19-Apr-12 587.44 11 | 18-Apr-12 608.34 12 | 17-Apr-12 609.70 13 | 16-Apr-12 580.13 14 | 13-Apr-12 605.23 15 | 12-Apr-12 622.77 16 | 11-Apr-12 626.20 17 | 10-Apr-12 628.44 18 | 9-Apr-12 636.23 19 | 5-Apr-12 633.68 20 | 4-Apr-12 624.31 21 | 3-Apr-12 629.32 22 | 2-Apr-12 618.63 23 | 30-Mar-12 599.55 24 | 29-Mar-12 609.86 25 | 28-Mar-12 617.62 26 | 27-Mar-12 614.48 27 | 26-Mar-12 606.98 28 | 23-Mar-12 596.05 29 | 22-Mar-12 599.34 30 | 21-Mar-12 602.50 31 | 20-Mar-12 605.96 32 | 19-Mar-12 601.10 33 | 16-Mar-12 585.57 34 | 15-Mar-12 585.56 35 | 14-Mar-12 589.58 36 | 13-Mar-12 568.10 37 | 12-Mar-12 552.00 38 | 9-Mar-12 545.17 39 | 8-Mar-12 541.99 40 | 7-Mar-12 530.69 41 | 6-Mar-12 530.26 42 | 5-Mar-12 533.16 43 | 2-Mar-12 545.18 44 | 1-Mar-12 544.47 45 | 29-Feb-12 542.44 46 | 28-Feb-12 535.41 47 | 27-Feb-12 525.76 48 | 24-Feb-12 522.41 49 | 23-Feb-12 516.39 50 | 22-Feb-12 513.04 51 | 21-Feb-12 514.85 52 | 17-Feb-12 502.12 53 | 16-Feb-12 502.21 54 | 15-Feb-12 497.67 55 | 14-Feb-12 509.46 56 | 13-Feb-12 502.60 57 | 10-Feb-12 493.42 58 | 9-Feb-12 493.17 59 | 8-Feb-12 476.68 60 | 7-Feb-12 468.83 61 | 6-Feb-12 463.97 62 | 3-Feb-12 459.68 63 | 2-Feb-12 455.12 64 | 1-Feb-12 456.19 65 | 31-Jan-12 456.48 66 | 30-Jan-12 453.01 67 | 27-Jan-12 447.28 68 | 26-Jan-12 444.63 69 | 25-Jan-12 446.66 70 | 24-Jan-12 420.41 71 | 23-Jan-12 427.41 72 | 20-Jan-12 420.30 73 | 19-Jan-12 427.75 74 | 18-Jan-12 429.11 75 | 17-Jan-12 424.70 76 | 13-Jan-12 419.81 77 | 12-Jan-12 421.39 78 | 11-Jan-12 422.55 79 | 10-Jan-12 423.24 80 | 9-Jan-12 421.73 81 | 6-Jan-12 422.40 82 | 5-Jan-12 418.03 83 | 4-Jan-12 413.44 84 | 3-Jan-12 411.23 85 | 30-Dec-11 405.00 86 | 29-Dec-11 405.12 87 | 28-Dec-11 402.64 88 | 27-Dec-11 406.53 89 | 23-Dec-11 403.43 90 | 22-Dec-11 398.55 91 | 21-Dec-11 396.44 92 | 20-Dec-11 395.95 93 | 19-Dec-11 382.21 94 | 16-Dec-11 381.02 95 | 15-Dec-11 378.94 96 | 14-Dec-11 380.19 97 | 13-Dec-11 388.81 98 | 12-Dec-11 391.84 99 | 9-Dec-11 393.62 100 | 8-Dec-11 390.66 101 | 7-Dec-11 389.09 102 | 6-Dec-11 390.95 103 | 5-Dec-11 393.01 104 | 2-Dec-11 389.70 105 | 1-Dec-11 387.93 106 | 30-Nov-11 382.20 107 | 29-Nov-11 373.20 108 | 28-Nov-11 376.12 109 | 25-Nov-11 363.57 110 | 23-Nov-11 366.99 111 | 22-Nov-11 376.51 112 | 21-Nov-11 369.01 113 | 18-Nov-11 374.94 114 | 17-Nov-11 377.41 115 | 16-Nov-11 384.77 116 | 15-Nov-11 388.83 117 | 14-Nov-11 379.26 118 | 11-Nov-11 384.62 119 | 10-Nov-11 385.22 120 | 9-Nov-11 395.28 121 | 8-Nov-11 406.23 122 | 7-Nov-11 399.73 123 | 4-Nov-11 400.24 124 | 3-Nov-11 403.07 125 | 2-Nov-11 397.41 126 | 1-Nov-11 396.51 127 | 31-Oct-11 404.78 128 | 28-Oct-11 404.95 129 | 27-Oct-11 404.69 130 | 26-Oct-11 400.60 131 | 25-Oct-11 397.77 132 | 24-Oct-11 405.77 133 | 21-Oct-11 392.87 134 | 20-Oct-11 395.31 135 | 19-Oct-11 398.62 136 | 18-Oct-11 422.24 137 | 17-Oct-11 419.99 138 | 14-Oct-11 422.00 139 | 13-Oct-11 408.43 140 | 12-Oct-11 402.19 141 | 11-Oct-11 400.29 142 | 10-Oct-11 388.81 143 | 7-Oct-11 369.80 144 | 6-Oct-11 377.37 145 | 5-Oct-11 378.25 146 | 4-Oct-11 372.50 147 | 3-Oct-11 374.60 148 | 30-Sep-11 381.32 149 | 29-Sep-11 390.57 150 | 28-Sep-11 397.01 151 | 27-Sep-11 399.26 152 | 26-Sep-11 403.17 153 | 23-Sep-11 404.30 154 | 22-Sep-11 401.82 155 | 21-Sep-11 412.14 156 | 20-Sep-11 413.45 157 | 19-Sep-11 411.63 158 | 16-Sep-11 400.50 159 | 15-Sep-11 392.96 160 | 14-Sep-11 389.30 161 | 13-Sep-11 384.62 162 | 12-Sep-11 379.94 163 | 9-Sep-11 377.48 164 | 8-Sep-11 384.14 165 | 7-Sep-11 383.93 166 | 6-Sep-11 379.74 167 | 2-Sep-11 374.05 168 | 1-Sep-11 381.03 169 | 31-Aug-11 384.83 170 | 30-Aug-11 389.99 171 | 29-Aug-11 389.97 172 | 26-Aug-11 383.58 173 | 25-Aug-11 373.72 174 | 24-Aug-11 376.18 175 | 23-Aug-11 373.60 176 | 22-Aug-11 356.44 177 | 19-Aug-11 356.03 178 | 18-Aug-11 366.05 179 | 17-Aug-11 380.44 180 | 16-Aug-11 380.48 181 | 15-Aug-11 383.41 182 | 12-Aug-11 376.99 183 | 11-Aug-11 373.70 184 | 10-Aug-11 363.69 185 | 9-Aug-11 374.01 186 | 8-Aug-11 353.21 187 | 5-Aug-11 373.62 188 | 4-Aug-11 377.37 189 | 3-Aug-11 392.57 190 | 2-Aug-11 388.91 191 | 1-Aug-11 396.75 192 | 29-Jul-11 390.48 193 | 28-Jul-11 391.82 194 | 27-Jul-11 392.59 195 | 26-Jul-11 403.41 196 | 25-Jul-11 398.50 197 | 22-Jul-11 393.30 198 | 21-Jul-11 387.29 199 | 20-Jul-11 386.90 200 | 19-Jul-11 376.85 201 | 18-Jul-11 373.80 202 | 15-Jul-11 364.92 203 | 14-Jul-11 357.77 204 | 13-Jul-11 358.02 205 | 12-Jul-11 353.75 206 | 11-Jul-11 354.00 207 | 8-Jul-11 359.71 208 | 7-Jul-11 357.20 209 | 6-Jul-11 351.76 210 | 5-Jul-11 349.43 211 | 1-Jul-11 343.26 212 | 30-Jun-11 335.67 213 | 29-Jun-11 334.04 214 | 28-Jun-11 335.26 215 | 27-Jun-11 332.04 216 | 24-Jun-11 326.35 217 | 23-Jun-11 331.23 218 | 22-Jun-11 322.61 219 | 21-Jun-11 325.30 220 | 20-Jun-11 315.32 221 | 17-Jun-11 320.26 222 | 16-Jun-11 325.16 223 | 15-Jun-11 326.75 224 | 14-Jun-11 332.44 225 | 13-Jun-11 326.60 226 | 10-Jun-11 325.90 227 | 9-Jun-11 331.49 228 | 8-Jun-11 332.24 229 | 7-Jun-11 332.04 230 | 6-Jun-11 338.04 231 | 3-Jun-11 343.44 232 | 2-Jun-11 346.10 233 | 1-Jun-11 345.51 234 | 31-May-11 347.83 235 | 27-May-11 337.41 236 | 26-May-11 335.00 237 | 25-May-11 336.78 238 | 24-May-11 332.19 239 | 23-May-11 334.40 240 | 20-May-11 335.22 241 | 19-May-11 340.53 242 | 18-May-11 339.87 243 | 17-May-11 336.14 244 | 16-May-11 333.30 245 | 13-May-11 340.50 246 | 12-May-11 346.57 247 | 11-May-11 347.23 248 | 10-May-11 349.45 249 | 9-May-11 347.60 250 | 6-May-11 346.66 251 | 5-May-11 346.75 252 | 4-May-11 349.57 253 | 3-May-11 348.20 254 | 2-May-11 346.28 255 | 29-Apr-11 350.13 256 | 28-Apr-11 346.75 257 | 27-Apr-11 350.15 258 | 26-Apr-11 350.42 259 | 25-Apr-11 353.01 260 | 21-Apr-11 350.70 261 | 20-Apr-11 342.41 262 | 19-Apr-11 337.86 263 | 18-Apr-11 331.85 264 | 15-Apr-11 327.46 265 | 14-Apr-11 332.42 266 | 13-Apr-11 336.13 267 | 12-Apr-11 332.40 268 | 11-Apr-11 330.80 269 | 8-Apr-11 335.06 270 | 7-Apr-11 338.08 271 | 6-Apr-11 338.04 272 | 5-Apr-11 338.89 273 | 4-Apr-11 341.19 274 | 1-Apr-11 344.56 275 | 31-Mar-11 348.51 276 | 30-Mar-11 348.63 277 | 29-Mar-11 350.96 278 | 28-Mar-11 350.44 279 | 25-Mar-11 351.54 280 | 24-Mar-11 344.97 281 | 23-Mar-11 339.19 282 | 22-Mar-11 341.20 283 | 21-Mar-11 339.30 284 | 18-Mar-11 330.67 285 | 17-Mar-11 334.64 286 | 16-Mar-11 330.01 287 | 15-Mar-11 345.43 288 | 14-Mar-11 353.56 289 | 11-Mar-11 351.99 290 | 10-Mar-11 346.67 291 | 9-Mar-11 352.47 292 | 8-Mar-11 355.76 293 | 7-Mar-11 355.36 294 | 4-Mar-11 360.00 295 | 3-Mar-11 359.56 296 | 2-Mar-11 352.12 297 | 1-Mar-11 349.31 298 | 28-Feb-11 353.21 299 | 25-Feb-11 348.16 300 | 24-Feb-11 342.88 301 | 23-Feb-11 342.62 302 | 22-Feb-11 338.61 303 | 18-Feb-11 350.56 304 | 17-Feb-11 358.30 305 | 16-Feb-11 363.13 306 | 15-Feb-11 359.90 307 | 14-Feb-11 359.18 308 | 11-Feb-11 356.85 309 | 10-Feb-11 354.54 310 | 9-Feb-11 358.16 311 | 8-Feb-11 355.20 312 | 7-Feb-11 351.88 313 | 4-Feb-11 346.50 314 | 3-Feb-11 343.44 315 | 2-Feb-11 344.32 316 | 1-Feb-11 345.03 317 | 31-Jan-11 339.32 318 | 28-Jan-11 336.10 319 | 27-Jan-11 343.21 320 | 26-Jan-11 343.85 321 | 25-Jan-11 341.40 322 | 24-Jan-11 337.45 323 | 21-Jan-11 326.72 324 | 20-Jan-11 332.68 325 | 19-Jan-11 338.84 326 | 18-Jan-11 340.65 327 | 14-Jan-11 348.48 328 | 13-Jan-11 345.68 329 | 12-Jan-11 344.42 330 | 11-Jan-11 341.64 331 | 10-Jan-11 342.46 332 | 7-Jan-11 336.12 333 | 6-Jan-11 333.73 334 | 5-Jan-11 334.00 335 | 4-Jan-11 331.29 336 | 3-Jan-11 329.57 337 | 31-Dec-10 322.56 338 | 30-Dec-10 323.66 339 | 29-Dec-10 325.29 340 | 28-Dec-10 325.47 341 | 27-Dec-10 324.68 342 | 23-Dec-10 323.60 343 | 22-Dec-10 325.16 344 | 21-Dec-10 324.20 345 | 20-Dec-10 322.21 346 | 17-Dec-10 320.61 347 | 16-Dec-10 321.25 348 | 15-Dec-10 320.36 349 | 14-Dec-10 320.29 350 | 13-Dec-10 321.67 351 | 10-Dec-10 320.56 352 | 9-Dec-10 319.76 353 | 8-Dec-10 321.01 354 | 7-Dec-10 318.21 355 | 6-Dec-10 320.15 356 | 3-Dec-10 317.44 357 | 2-Dec-10 318.15 358 | 1-Dec-10 316.40 359 | 30-Nov-10 311.15 360 | 29-Nov-10 316.87 361 | 26-Nov-10 315.00 362 | 24-Nov-10 314.80 363 | 23-Nov-10 308.73 364 | 22-Nov-10 313.36 365 | 19-Nov-10 306.73 366 | 18-Nov-10 308.43 367 | 17-Nov-10 300.50 368 | 16-Nov-10 301.59 369 | 15-Nov-10 307.04 370 | 12-Nov-10 308.03 371 | 11-Nov-10 316.66 372 | 10-Nov-10 318.03 373 | 9-Nov-10 316.08 374 | 8-Nov-10 318.62 375 | 5-Nov-10 317.13 376 | 4-Nov-10 318.27 377 | 3-Nov-10 312.80 378 | 2-Nov-10 309.36 379 | 1-Nov-10 304.18 380 | 29-Oct-10 300.98 381 | 28-Oct-10 305.24 382 | 27-Oct-10 307.83 383 | 26-Oct-10 308.05 384 | 25-Oct-10 308.84 385 | 22-Oct-10 307.47 386 | 21-Oct-10 309.52 387 | 20-Oct-10 310.53 388 | 19-Oct-10 309.49 389 | 18-Oct-10 318.00 390 | 15-Oct-10 314.74 391 | 14-Oct-10 302.31 392 | 13-Oct-10 300.14 393 | 12-Oct-10 298.54 394 | 11-Oct-10 295.36 395 | 8-Oct-10 294.07 396 | 7-Oct-10 289.22 397 | 6-Oct-10 289.19 398 | 5-Oct-10 288.94 399 | 4-Oct-10 278.64 400 | 1-Oct-10 282.52 401 | 30-Sep-10 283.75 402 | 29-Sep-10 287.37 403 | 28-Sep-10 286.86 404 | 27-Sep-10 291.16 405 | 24-Sep-10 292.32 406 | 23-Sep-10 288.92 407 | 22-Sep-10 287.75 408 | 21-Sep-10 283.77 409 | 20-Sep-10 283.23 410 | 17-Sep-10 275.37 411 | 16-Sep-10 276.57 412 | 15-Sep-10 270.22 413 | 14-Sep-10 268.06 414 | 13-Sep-10 267.04 415 | 10-Sep-10 263.41 416 | 9-Sep-10 263.07 417 | 8-Sep-10 262.92 418 | 7-Sep-10 257.81 419 | 6-Sep-10 258.77 420 | 3-Sep-10 258.77 421 | 2-Sep-10 252.17 422 | 1-Sep-10 250.33 423 | 31-Aug-10 243.10 424 | 30-Aug-10 242.50 425 | 27-Aug-10 241.62 426 | 26-Aug-10 240.28 427 | 25-Aug-10 242.89 428 | 24-Aug-10 239.93 429 | 23-Aug-10 245.80 430 | 20-Aug-10 249.64 431 | 19-Aug-10 249.88 432 | 18-Aug-10 253.07 433 | 17-Aug-10 251.97 434 | 16-Aug-10 247.64 435 | 13-Aug-10 249.10 436 | 12-Aug-10 251.79 437 | 11-Aug-10 250.19 438 | 10-Aug-10 259.41 439 | 9-Aug-10 261.75 440 | 6-Aug-10 260.09 441 | 5-Aug-10 261.70 442 | 4-Aug-10 262.98 443 | 3-Aug-10 261.93 444 | 2-Aug-10 261.85 445 | 30-Jul-10 257.25 446 | 29-Jul-10 258.11 447 | 28-Jul-10 260.96 448 | 27-Jul-10 264.08 449 | 26-Jul-10 259.28 450 | 23-Jul-10 259.94 451 | 22-Jul-10 259.02 452 | 21-Jul-10 254.24 453 | 20-Jul-10 251.89 454 | 19-Jul-10 245.58 455 | 16-Jul-10 249.90 456 | 15-Jul-10 251.45 457 | 14-Jul-10 252.73 458 | 13-Jul-10 251.80 459 | 12-Jul-10 257.28 460 | 9-Jul-10 259.62 461 | 8-Jul-10 258.09 462 | 7-Jul-10 258.66 463 | 6-Jul-10 248.63 464 | 5-Jul-10 246.94 465 | 2-Jul-10 246.94 466 | 1-Jul-10 248.48 467 | 30-Jun-10 251.53 468 | 29-Jun-10 256.17 469 | 28-Jun-10 268.30 470 | 25-Jun-10 266.70 471 | 24-Jun-10 269.00 472 | 23-Jun-10 270.97 473 | 22-Jun-10 273.85 474 | 21-Jun-10 270.17 475 | 18-Jun-10 274.07 476 | 17-Jun-10 271.87 477 | 16-Jun-10 267.25 478 | 15-Jun-10 259.69 479 | 14-Jun-10 254.28 480 | 11-Jun-10 253.51 481 | 10-Jun-10 250.51 482 | 9-Jun-10 243.20 483 | 8-Jun-10 249.33 484 | 7-Jun-10 250.94 485 | 4-Jun-10 255.96 486 | 3-Jun-10 263.12 487 | 2-Jun-10 263.95 488 | 1-Jun-10 260.83 489 | 31-May-10 256.88 490 | 28-May-10 256.88 491 | 27-May-10 253.35 492 | 26-May-10 244.11 493 | 25-May-10 245.22 494 | 24-May-10 246.76 495 | 21-May-10 242.32 496 | 20-May-10 237.76 497 | 19-May-10 248.34 498 | 18-May-10 252.36 499 | 17-May-10 254.22 500 | 14-May-10 253.82 501 | 13-May-10 258.36 502 | 12-May-10 262.09 503 | 11-May-10 256.52 504 | 10-May-10 253.99 505 | 7-May-10 235.86 506 | 6-May-10 246.25 507 | 5-May-10 255.98 508 | 4-May-10 258.68 509 | 3-May-10 266.35 510 | 30-Apr-10 261.09 511 | 29-Apr-10 268.64 512 | 28-Apr-10 261.60 513 | 27-Apr-10 262.04 514 | 26-Apr-10 269.50 515 | 23-Apr-10 270.83 516 | 22-Apr-10 266.47 517 | 21-Apr-10 259.22 518 | 20-Apr-10 244.59 519 | 19-Apr-10 247.07 520 | 16-Apr-10 247.40 521 | 15-Apr-10 248.92 522 | 14-Apr-10 245.69 523 | 13-Apr-10 242.43 524 | 12-Apr-10 242.29 525 | 9-Apr-10 241.79 526 | 8-Apr-10 239.95 527 | 7-Apr-10 240.60 528 | 6-Apr-10 239.54 529 | 5-Apr-10 238.49 530 | 2-Apr-10 235.97 531 | 1-Apr-10 235.97 532 | 31-Mar-10 235.00 533 | 30-Mar-10 235.84 534 | 29-Mar-10 232.39 535 | 26-Mar-10 230.90 536 | 25-Mar-10 226.65 537 | 24-Mar-10 229.37 538 | 23-Mar-10 228.36 539 | 22-Mar-10 224.75 540 | 19-Mar-10 222.25 541 | 18-Mar-10 224.65 542 | 17-Mar-10 224.12 543 | 16-Mar-10 224.45 544 | 15-Mar-10 223.84 545 | 12-Mar-10 226.60 546 | 11-Mar-10 225.50 547 | 10-Mar-10 224.84 548 | 9-Mar-10 223.02 549 | 8-Mar-10 219.08 550 | 5-Mar-10 218.95 551 | 4-Mar-10 210.71 552 | 3-Mar-10 209.33 553 | 2-Mar-10 208.85 554 | 1-Mar-10 208.99 555 | 26-Feb-10 204.62 556 | 25-Feb-10 202.00 557 | 24-Feb-10 200.66 558 | 23-Feb-10 197.06 559 | 22-Feb-10 200.42 560 | 19-Feb-10 201.67 561 | 18-Feb-10 202.93 562 | 17-Feb-10 202.55 563 | 16-Feb-10 203.40 564 | 15-Feb-10 200.38 565 | 12-Feb-10 200.38 566 | 11-Feb-10 198.67 567 | 10-Feb-10 195.12 568 | 9-Feb-10 196.19 569 | 8-Feb-10 194.12 570 | 5-Feb-10 195.46 571 | 4-Feb-10 192.05 572 | 3-Feb-10 199.23 573 | 2-Feb-10 195.86 574 | 1-Feb-10 194.73 575 | 29-Jan-10 192.06 576 | 28-Jan-10 199.29 577 | 27-Jan-10 207.88 578 | 26-Jan-10 205.94 579 | 25-Jan-10 203.08 580 | 22-Jan-10 197.75 581 | 21-Jan-10 208.07 582 | 20-Jan-10 211.72 583 | 19-Jan-10 215.04 584 | 18-Jan-10 205.93 585 | 15-Jan-10 205.93 586 | 14-Jan-10 209.43 587 | 13-Jan-10 210.65 588 | 12-Jan-10 207.72 589 | 11-Jan-10 210.11 590 | 8-Jan-10 211.98 591 | 7-Jan-10 210.58 592 | 6-Jan-10 210.97 593 | 5-Jan-10 214.38 594 | 4-Jan-10 214.01 595 | 1-Jan-10 210.73 596 | 31-Dec-09 210.73 597 | 30-Dec-09 211.64 598 | 29-Dec-09 209.10 599 | 28-Dec-09 211.61 600 | 25-Dec-09 209.04 601 | 24-Dec-09 209.04 602 | 23-Dec-09 202.10 603 | 22-Dec-09 200.36 604 | 21-Dec-09 198.23 605 | 18-Dec-09 195.43 606 | 17-Dec-09 191.86 607 | 16-Dec-09 195.03 608 | 15-Dec-09 194.17 609 | 14-Dec-09 196.98 610 | 11-Dec-09 194.67 611 | 10-Dec-09 196.43 612 | 9-Dec-09 197.80 613 | 8-Dec-09 189.87 614 | 7-Dec-09 188.95 615 | 4-Dec-09 193.32 616 | 3-Dec-09 196.48 617 | 2-Dec-09 196.23 618 | 1-Dec-09 196.97 619 | 30-Nov-09 199.91 620 | 27-Nov-09 200.59 621 | 26-Nov-09 204.19 622 | 25-Nov-09 204.19 623 | 24-Nov-09 204.44 624 | 23-Nov-09 205.88 625 | 20-Nov-09 199.92 626 | 19-Nov-09 200.51 627 | 18-Nov-09 205.96 628 | 17-Nov-09 207.00 629 | 16-Nov-09 206.63 630 | 13-Nov-09 204.45 631 | 12-Nov-09 201.99 632 | 11-Nov-09 203.25 633 | 10-Nov-09 202.98 634 | 9-Nov-09 201.46 635 | 6-Nov-09 194.34 636 | 5-Nov-09 194.03 637 | 4-Nov-09 190.81 638 | 3-Nov-09 188.75 639 | 2-Nov-09 189.31 640 | 30-Oct-09 188.50 641 | 29-Oct-09 196.35 642 | 28-Oct-09 192.40 643 | 27-Oct-09 197.37 644 | 26-Oct-09 202.48 645 | 23-Oct-09 203.94 646 | 22-Oct-09 205.20 647 | 21-Oct-09 204.92 648 | 20-Oct-09 198.76 649 | 19-Oct-09 189.86 650 | 16-Oct-09 188.05 651 | 15-Oct-09 190.56 652 | 14-Oct-09 191.29 653 | 13-Oct-09 190.02 654 | 12-Oct-09 190.81 655 | 9-Oct-09 190.47 656 | 8-Oct-09 189.27 657 | 7-Oct-09 190.25 658 | 6-Oct-09 190.01 659 | 5-Oct-09 186.02 660 | 2-Oct-09 184.90 661 | 1-Oct-09 180.86 662 | 30-Sep-09 185.35 663 | 29-Sep-09 185.38 664 | 28-Sep-09 186.15 665 | 25-Sep-09 182.37 666 | 24-Sep-09 183.82 667 | 23-Sep-09 185.50 668 | 22-Sep-09 184.48 669 | 21-Sep-09 184.02 670 | 18-Sep-09 185.02 671 | 17-Sep-09 184.55 672 | 16-Sep-09 181.87 673 | 15-Sep-09 175.16 674 | 14-Sep-09 173.72 675 | 11-Sep-09 172.16 676 | 10-Sep-09 172.56 677 | 9-Sep-09 171.14 678 | 8-Sep-09 172.93 679 | 4-Sep-09 170.31 680 | 3-Sep-09 166.55 681 | 2-Sep-09 165.18 682 | 1-Sep-09 165.30 683 | 31-Aug-09 168.21 684 | 28-Aug-09 170.05 685 | 27-Aug-09 169.45 686 | 26-Aug-09 167.41 687 | 25-Aug-09 169.40 688 | 24-Aug-09 169.06 689 | 21-Aug-09 169.22 690 | 20-Aug-09 166.33 691 | 19-Aug-09 164.60 692 | 18-Aug-09 164.00 693 | 17-Aug-09 159.59 694 | 14-Aug-09 166.78 695 | 13-Aug-09 168.42 696 | 12-Aug-09 165.31 697 | 10-Aug-09 164.72 698 | 7-Aug-09 165.51 699 | 6-Aug-09 163.91 700 | 5-Aug-09 165.11 701 | 4-Aug-09 165.55 702 | 3-Aug-09 166.43 703 | 31-Jul-09 163.39 704 | 30-Jul-09 162.79 705 | 29-Jul-09 160.03 706 | 28-Jul-09 160.00 707 | 27-Jul-09 160.10 708 | 24-Jul-09 159.99 709 | 23-Jul-09 157.82 710 | 22-Jul-09 156.74 711 | 21-Jul-09 151.51 712 | 20-Jul-09 152.91 713 | 17-Jul-09 151.75 714 | 16-Jul-09 147.52 715 | 15-Jul-09 146.88 716 | 14-Jul-09 142.27 717 | 13-Jul-09 142.34 718 | 10-Jul-09 138.52 719 | 9-Jul-09 136.36 720 | 8-Jul-09 137.22 721 | 7-Jul-09 135.40 722 | 6-Jul-09 138.61 723 | 3-Jul-09 140.02 724 | 2-Jul-09 140.02 725 | 1-Jul-09 142.83 726 | 30-Jun-09 142.43 727 | 29-Jun-09 141.97 728 | 26-Jun-09 142.44 729 | 25-Jun-09 139.86 730 | 24-Jun-09 136.22 731 | 23-Jun-09 134.01 732 | 22-Jun-09 137.37 733 | 19-Jun-09 139.48 734 | 18-Jun-09 135.88 735 | 17-Jun-09 135.58 736 | 16-Jun-09 136.35 737 | 15-Jun-09 136.09 738 | 12-Jun-09 136.97 739 | 11-Jun-09 139.95 740 | 10-Jun-09 140.25 741 | 9-Jun-09 142.72 742 | 8-Jun-09 143.85 743 | 5-Jun-09 144.67 744 | 4-Jun-09 143.74 745 | 3-Jun-09 140.95 746 | 2-Jun-09 139.49 747 | 1-Jun-09 139.35 748 | 29-May-09 135.81 749 | 28-May-09 135.07 750 | 27-May-09 133.05 751 | 26-May-09 130.78 752 | 22-May-09 122.50 753 | 21-May-09 124.18 754 | 20-May-09 125.87 755 | 19-May-09 127.45 756 | 18-May-09 126.65 757 | 15-May-09 122.42 758 | 14-May-09 122.95 759 | 13-May-09 119.49 760 | 12-May-09 124.42 761 | 11-May-09 129.57 762 | 8-May-09 129.19 763 | 7-May-09 129.06 764 | 6-May-09 132.50 765 | 5-May-09 132.71 766 | 4-May-09 132.07 767 | 1-May-09 127.24 768 | 30-Apr-09 125.83 769 | 29-Apr-09 125.14 770 | 28-Apr-09 123.90 771 | 27-Apr-09 124.73 772 | 24-Apr-09 123.90 773 | 23-Apr-09 125.40 774 | 22-Apr-09 121.51 775 | 21-Apr-09 121.76 776 | 20-Apr-09 120.50 777 | 17-Apr-09 123.42 778 | 16-Apr-09 121.45 779 | 15-Apr-09 117.64 780 | 14-Apr-09 118.31 781 | 13-Apr-09 120.22 782 | 10-Apr-09 119.57 783 | 9-Apr-09 119.57 784 | 8-Apr-09 116.32 785 | 7-Apr-09 115.00 786 | 6-Apr-09 118.45 787 | 3-Apr-09 115.99 788 | 2-Apr-09 112.71 789 | 1-Apr-09 108.69 790 | 31-Mar-09 105.12 791 | 30-Mar-09 104.49 792 | 27-Mar-09 106.85 793 | 26-Mar-09 109.87 794 | 25-Mar-09 106.49 795 | 24-Mar-09 106.50 796 | 23-Mar-09 107.66 797 | 20-Mar-09 101.59 798 | 19-Mar-09 101.62 799 | 18-Mar-09 101.52 800 | 17-Mar-09 99.66 801 | 16-Mar-09 95.42 802 | 13-Mar-09 95.93 803 | 12-Mar-09 96.35 804 | 11-Mar-09 92.68 805 | 10-Mar-09 88.63 806 | 9-Mar-09 83.11 807 | 6-Mar-09 85.30 808 | 5-Mar-09 88.84 809 | 4-Mar-09 91.17 810 | 3-Mar-09 88.37 811 | 2-Mar-09 87.94 812 | 27-Feb-09 89.31 813 | 26-Feb-09 89.19 814 | 25-Feb-09 91.16 815 | 24-Feb-09 90.25 816 | 23-Feb-09 86.95 817 | 20-Feb-09 91.20 818 | 19-Feb-09 90.64 819 | 18-Feb-09 94.37 820 | 17-Feb-09 94.53 821 | 13-Feb-09 99.16 822 | 12-Feb-09 99.27 823 | 11-Feb-09 96.82 824 | 10-Feb-09 97.83 825 | 9-Feb-09 102.51 826 | 6-Feb-09 99.72 827 | 5-Feb-09 96.46 828 | 4-Feb-09 93.55 829 | 3-Feb-09 92.98 830 | 2-Feb-09 91.51 831 | 30-Jan-09 90.13 832 | 29-Jan-09 93.00 833 | 28-Jan-09 94.20 834 | 27-Jan-09 90.73 835 | 26-Jan-09 89.64 836 | 23-Jan-09 88.36 837 | 22-Jan-09 88.36 838 | 21-Jan-09 82.83 839 | 20-Jan-09 78.20 840 | 16-Jan-09 82.33 841 | 15-Jan-09 83.38 842 | 14-Jan-09 85.33 843 | 13-Jan-09 87.71 844 | 12-Jan-09 88.66 845 | 9-Jan-09 90.58 846 | 8-Jan-09 92.70 847 | 7-Jan-09 91.01 848 | 6-Jan-09 93.02 849 | 5-Jan-09 94.58 850 | 2-Jan-09 90.75 851 | 1-Jan-09 85.35 852 | 31-Dec-08 85.35 853 | 30-Dec-08 86.29 854 | 29-Dec-08 86.61 855 | 26-Dec-08 85.81 856 | 25-Dec-08 85.04 857 | 24-Dec-08 85.04 858 | 23-Dec-08 86.38 859 | 22-Dec-08 85.74 860 | 19-Dec-08 90.00 861 | 18-Dec-08 89.43 862 | 17-Dec-08 89.16 863 | 16-Dec-08 95.43 864 | 15-Dec-08 94.75 865 | 12-Dec-08 98.27 866 | 11-Dec-08 95.00 867 | 10-Dec-08 98.21 868 | 9-Dec-08 100.06 869 | 8-Dec-08 99.72 870 | 5-Dec-08 94.00 871 | 4-Dec-08 91.41 872 | 3-Dec-08 95.90 873 | 2-Dec-08 92.47 874 | 1-Dec-08 88.93 875 | 28-Nov-08 92.67 876 | 27-Nov-08 95.00 877 | 26-Nov-08 95.00 878 | 25-Nov-08 90.80 879 | 24-Nov-08 92.95 880 | 21-Nov-08 82.58 881 | 20-Nov-08 80.49 882 | 19-Nov-08 86.29 883 | 18-Nov-08 89.91 884 | 17-Nov-08 88.14 885 | 14-Nov-08 90.24 886 | 13-Nov-08 96.44 887 | 12-Nov-08 90.12 888 | 11-Nov-08 94.77 889 | 10-Nov-08 95.88 890 | 7-Nov-08 98.24 891 | 6-Nov-08 99.10 892 | 5-Nov-08 103.30 893 | 4-Nov-08 110.99 894 | 3-Nov-08 106.96 895 | 31-Oct-08 107.59 896 | 30-Oct-08 111.04 897 | 29-Oct-08 104.55 898 | 28-Oct-08 99.91 899 | 27-Oct-08 92.09 900 | 24-Oct-08 96.38 901 | 23-Oct-08 98.23 902 | 22-Oct-08 96.87 903 | 21-Oct-08 91.49 904 | 20-Oct-08 98.44 905 | 17-Oct-08 97.40 906 | 16-Oct-08 101.89 907 | 15-Oct-08 97.95 908 | 14-Oct-08 104.08 909 | 13-Oct-08 110.26 910 | 10-Oct-08 96.80 911 | 9-Oct-08 88.74 912 | 8-Oct-08 89.79 913 | 7-Oct-08 89.16 914 | 6-Oct-08 98.14 915 | 3-Oct-08 97.07 916 | 2-Oct-08 100.10 917 | 1-Oct-08 109.12 918 | 30-Sep-08 113.66 919 | 29-Sep-08 105.26 920 | 26-Sep-08 128.24 921 | 25-Sep-08 131.93 922 | 24-Sep-08 128.71 923 | 23-Sep-08 126.84 924 | 22-Sep-08 131.05 925 | 19-Sep-08 140.91 926 | 18-Sep-08 134.09 927 | 17-Sep-08 127.83 928 | 16-Sep-08 139.88 929 | 15-Sep-08 140.36 930 | 12-Sep-08 148.94 931 | 11-Sep-08 152.65 932 | 10-Sep-08 151.61 933 | 9-Sep-08 151.68 934 | 8-Sep-08 157.92 935 | 5-Sep-08 160.18 936 | 4-Sep-08 161.22 937 | 3-Sep-08 166.96 938 | 2-Sep-08 166.19 939 | 29-Aug-08 169.53 940 | 28-Aug-08 173.74 941 | 27-Aug-08 174.67 942 | 26-Aug-08 173.64 943 | 25-Aug-08 172.55 944 | 22-Aug-08 176.79 945 | 21-Aug-08 174.29 946 | 20-Aug-08 175.84 947 | 19-Aug-08 173.53 948 | 18-Aug-08 175.39 949 | 15-Aug-08 175.74 950 | 14-Aug-08 179.32 951 | 13-Aug-08 179.30 952 | 12-Aug-08 176.73 953 | 11-Aug-08 173.56 954 | 8-Aug-08 169.55 955 | 7-Aug-08 163.57 956 | 6-Aug-08 164.19 957 | 5-Aug-08 160.64 958 | 4-Aug-08 153.23 959 | 1-Aug-08 156.66 960 | 31-Jul-08 158.95 961 | 30-Jul-08 159.88 962 | 29-Jul-08 157.08 963 | 28-Jul-08 154.40 964 | 25-Jul-08 162.12 965 | 24-Jul-08 159.03 966 | 23-Jul-08 166.26 967 | 22-Jul-08 162.02 968 | 21-Jul-08 166.29 969 | 18-Jul-08 165.15 970 | 17-Jul-08 171.81 971 | 16-Jul-08 172.81 972 | 15-Jul-08 169.64 973 | 14-Jul-08 173.88 974 | 11-Jul-08 172.58 975 | 10-Jul-08 176.63 976 | 9-Jul-08 174.25 977 | 8-Jul-08 179.55 978 | 7-Jul-08 175.16 979 | 3-Jul-08 170.12 980 | 2-Jul-08 168.18 981 | 1-Jul-08 174.68 982 | 30-Jun-08 167.44 983 | 27-Jun-08 170.09 984 | 26-Jun-08 168.26 985 | 25-Jun-08 177.39 986 | 24-Jun-08 173.25 987 | 23-Jun-08 173.16 988 | 20-Jun-08 175.27 989 | 19-Jun-08 180.90 990 | 18-Jun-08 178.75 991 | 17-Jun-08 181.43 992 | 16-Jun-08 176.84 993 | 13-Jun-08 172.37 994 | 12-Jun-08 173.26 995 | 11-Jun-08 180.81 996 | 10-Jun-08 185.64 997 | 9-Jun-08 181.61 998 | 6-Jun-08 185.64 999 | 5-Jun-08 189.43 1000 | 4-Jun-08 185.19 1001 | 3-Jun-08 185.37 1002 | 2-Jun-08 186.10 1003 | 30-May-08 188.75 1004 | 29-May-08 186.69 1005 | 28-May-08 187.01 1006 | 27-May-08 186.43 1007 | 23-May-08 181.17 1008 | 22-May-08 177.05 1009 | 21-May-08 178.19 1010 | 20-May-08 185.90 1011 | 19-May-08 183.60 1012 | 16-May-08 187.62 1013 | 15-May-08 189.73 1014 | 14-May-08 186.26 1015 | 13-May-08 189.96 1016 | 12-May-08 188.16 1017 | 9-May-08 183.45 1018 | 8-May-08 185.06 1019 | 7-May-08 182.59 1020 | 6-May-08 186.66 1021 | 5-May-08 184.73 1022 | 2-May-08 180.94 1023 | 1-May-08 180.00 1024 | 30-Apr-08 173.95 1025 | 29-Apr-08 175.05 1026 | 28-Apr-08 172.24 1027 | 25-Apr-08 169.73 1028 | 24-Apr-08 168.94 1029 | 23-Apr-08 162.89 1030 | 22-Apr-08 160.20 1031 | 21-Apr-08 168.16 1032 | 18-Apr-08 161.04 1033 | 17-Apr-08 154.49 1034 | 16-Apr-08 153.70 1035 | 15-Apr-08 148.38 1036 | 14-Apr-08 147.78 1037 | 11-Apr-08 147.14 1038 | 10-Apr-08 154.55 1039 | 9-Apr-08 151.44 1040 | 8-Apr-08 152.84 1041 | 7-Apr-08 155.89 1042 | 4-Apr-08 153.08 1043 | 3-Apr-08 151.61 1044 | 2-Apr-08 147.49 1045 | 1-Apr-08 149.53 1046 | 31-Mar-08 143.50 1047 | 28-Mar-08 143.01 1048 | 27-Mar-08 140.25 1049 | 26-Mar-08 145.06 1050 | 25-Mar-08 140.98 1051 | 24-Mar-08 139.53 1052 | 20-Mar-08 133.27 1053 | 19-Mar-08 129.67 1054 | 18-Mar-08 132.82 1055 | 17-Mar-08 126.73 1056 | 14-Mar-08 126.61 1057 | 13-Mar-08 127.94 1058 | 12-Mar-08 126.03 1059 | 11-Mar-08 127.35 1060 | 10-Mar-08 119.69 1061 | 7-Mar-08 122.25 1062 | 6-Mar-08 120.93 1063 | 5-Mar-08 124.49 1064 | 4-Mar-08 124.62 1065 | 3-Mar-08 121.73 1066 | 29-Feb-08 125.02 1067 | 28-Feb-08 129.91 1068 | 27-Feb-08 122.96 1069 | 26-Feb-08 119.15 1070 | 25-Feb-08 119.74 1071 | 22-Feb-08 119.46 1072 | 21-Feb-08 121.54 1073 | 20-Feb-08 123.82 1074 | 19-Feb-08 122.18 1075 | 15-Feb-08 124.63 1076 | 14-Feb-08 127.46 1077 | 13-Feb-08 129.40 1078 | 12-Feb-08 124.86 1079 | 11-Feb-08 129.45 1080 | 8-Feb-08 125.48 1081 | 7-Feb-08 121.24 1082 | 6-Feb-08 122.00 1083 | 5-Feb-08 129.36 1084 | 4-Feb-08 131.65 1085 | 1-Feb-08 133.75 1086 | 31-Jan-08 135.36 1087 | 30-Jan-08 132.18 1088 | 29-Jan-08 131.54 1089 | 28-Jan-08 130.01 1090 | 25-Jan-08 130.01 1091 | 24-Jan-08 135.60 1092 | 23-Jan-08 139.07 1093 | 22-Jan-08 155.64 1094 | 18-Jan-08 161.36 1095 | 17-Jan-08 160.89 1096 | 16-Jan-08 159.64 1097 | 15-Jan-08 169.04 1098 | 14-Jan-08 178.78 1099 | 11-Jan-08 172.69 1100 | 10-Jan-08 178.02 1101 | 9-Jan-08 179.40 1102 | 8-Jan-08 171.25 1103 | 7-Jan-08 177.64 1104 | 4-Jan-08 180.05 1105 | 3-Jan-08 194.93 1106 | 2-Jan-08 194.84 1107 | 31-Dec-07 198.08 1108 | 28-Dec-07 199.83 1109 | 27-Dec-07 198.57 1110 | 26-Dec-07 198.95 1111 | 24-Dec-07 198.80 1112 | 21-Dec-07 193.91 1113 | 20-Dec-07 187.21 1114 | 19-Dec-07 183.12 1115 | 18-Dec-07 182.98 1116 | 17-Dec-07 184.40 1117 | 14-Dec-07 190.39 1118 | 13-Dec-07 191.83 1119 | 12-Dec-07 190.86 1120 | 11-Dec-07 188.54 1121 | 10-Dec-07 194.21 1122 | 7-Dec-07 194.30 1123 | 6-Dec-07 189.95 1124 | 5-Dec-07 185.50 1125 | 4-Dec-07 179.81 1126 | 3-Dec-07 178.86 1127 | 30-Nov-07 182.22 1128 | 29-Nov-07 184.29 1129 | 28-Nov-07 180.22 1130 | 27-Nov-07 174.81 1131 | 26-Nov-07 172.54 1132 | 23-Nov-07 171.54 1133 | 21-Nov-07 168.46 1134 | 20-Nov-07 168.85 1135 | 19-Nov-07 163.95 1136 | 16-Nov-07 166.39 1137 | 15-Nov-07 164.30 1138 | 14-Nov-07 166.11 1139 | 13-Nov-07 169.96 1140 | 12-Nov-07 153.76 1141 | 9-Nov-07 165.37 1142 | 8-Nov-07 175.47 1143 | 7-Nov-07 186.30 1144 | 6-Nov-07 191.79 1145 | 5-Nov-07 186.18 1146 | 2-Nov-07 187.87 1147 | 1-Nov-07 187.44 1148 | 31-Oct-07 189.95 1149 | 30-Oct-07 187.00 1150 | 29-Oct-07 185.09 1151 | 26-Oct-07 184.70 1152 | 25-Oct-07 182.78 1153 | 24-Oct-07 185.93 1154 | 23-Oct-07 186.16 1155 | 22-Oct-07 174.36 1156 | 19-Oct-07 170.42 1157 | 18-Oct-07 173.50 1158 | 17-Oct-07 172.75 1159 | 16-Oct-07 169.58 1160 | 15-Oct-07 166.98 1161 | 12-Oct-07 167.25 1162 | 11-Oct-07 162.23 1163 | 10-Oct-07 166.79 1164 | 9-Oct-07 167.86 1165 | 8-Oct-07 167.91 1166 | 5-Oct-07 161.45 1167 | 4-Oct-07 156.24 1168 | 3-Oct-07 157.92 1169 | 2-Oct-07 158.45 1170 | 1-Oct-07 156.34 1171 | 28-Sep-07 153.47 1172 | 27-Sep-07 154.50 1173 | 26-Sep-07 152.77 1174 | 25-Sep-07 153.18 1175 | 24-Sep-07 148.28 1176 | 21-Sep-07 144.15 1177 | 20-Sep-07 140.31 1178 | 19-Sep-07 140.77 1179 | 18-Sep-07 140.92 1180 | 17-Sep-07 138.41 1181 | 14-Sep-07 138.81 1182 | 13-Sep-07 137.20 1183 | 12-Sep-07 136.85 1184 | 11-Sep-07 135.49 1185 | 10-Sep-07 136.71 1186 | 7-Sep-07 131.77 1187 | 6-Sep-07 135.01 1188 | 5-Sep-07 136.76 1189 | 4-Sep-07 144.16 1190 | 31-Aug-07 138.48 1191 | 30-Aug-07 136.25 1192 | 29-Aug-07 134.08 1193 | 28-Aug-07 126.82 1194 | 27-Aug-07 132.25 1195 | 24-Aug-07 135.30 1196 | 23-Aug-07 131.07 1197 | 22-Aug-07 132.51 1198 | 21-Aug-07 127.57 1199 | 20-Aug-07 122.22 1200 | 17-Aug-07 122.06 1201 | 16-Aug-07 117.05 1202 | 15-Aug-07 119.90 1203 | 14-Aug-07 124.03 1204 | 13-Aug-07 127.79 1205 | 10-Aug-07 125.00 1206 | 9-Aug-07 126.39 1207 | 8-Aug-07 134.01 1208 | 7-Aug-07 135.03 1209 | 6-Aug-07 135.25 1210 | 3-Aug-07 131.85 1211 | 2-Aug-07 136.49 1212 | 1-Aug-07 135.00 1213 | 31-Jul-07 131.76 1214 | 30-Jul-07 141.43 1215 | 27-Jul-07 143.85 1216 | 26-Jul-07 146.00 1217 | 25-Jul-07 137.26 1218 | 24-Jul-07 134.89 1219 | 23-Jul-07 143.70 1220 | 20-Jul-07 143.75 1221 | 19-Jul-07 140.00 1222 | 18-Jul-07 138.12 1223 | 17-Jul-07 138.91 1224 | 16-Jul-07 138.10 1225 | 13-Jul-07 137.73 1226 | 12-Jul-07 134.07 1227 | 11-Jul-07 132.39 1228 | 10-Jul-07 132.35 1229 | 9-Jul-07 130.33 1230 | 6-Jul-07 132.30 1231 | 5-Jul-07 132.75 1232 | 3-Jul-07 127.17 1233 | 2-Jul-07 121.26 1234 | 29-Jun-07 122.04 1235 | 28-Jun-07 120.56 1236 | 27-Jun-07 121.89 1237 | 26-Jun-07 119.65 1238 | 25-Jun-07 122.34 1239 | 22-Jun-07 123.00 1240 | 21-Jun-07 123.90 1241 | 20-Jun-07 121.55 1242 | 19-Jun-07 123.66 1243 | 18-Jun-07 125.09 1244 | 15-Jun-07 120.50 1245 | 14-Jun-07 118.75 1246 | 13-Jun-07 117.50 1247 | 12-Jun-07 120.38 1248 | 11-Jun-07 120.19 1249 | 8-Jun-07 124.49 1250 | 7-Jun-07 124.07 1251 | 6-Jun-07 123.64 1252 | 5-Jun-07 122.67 1253 | 4-Jun-07 121.33 1254 | 1-Jun-07 118.40 1255 | 31-May-07 121.19 1256 | 30-May-07 118.77 1257 | 29-May-07 114.35 1258 | 25-May-07 113.62 1259 | 24-May-07 110.69 1260 | 23-May-07 112.89 1261 | 22-May-07 113.54 1262 | 21-May-07 111.98 1263 | 18-May-07 110.02 1264 | 17-May-07 109.44 1265 | 16-May-07 107.34 1266 | 15-May-07 107.52 1267 | 14-May-07 109.36 1268 | 11-May-07 108.74 1269 | 10-May-07 107.34 1270 | 9-May-07 106.88 1271 | 8-May-07 105.06 1272 | 7-May-07 103.92 1273 | 4-May-07 100.81 1274 | 3-May-07 100.40 1275 | 2-May-07 100.39 1276 | 1-May-07 99.47 1277 | 30-Apr-07 99.80 1278 | 27-Apr-07 99.92 1279 | 26-Apr-07 98.84 1280 | 25-Apr-07 95.35 1281 | 24-Apr-07 93.24 -------------------------------------------------------------------------------- /examples/bar/bar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/bar/data.tsv: -------------------------------------------------------------------------------- 1 | letter frequency 2 | A .08167 3 | B .01492 4 | C .02780 5 | D .04253 6 | E .12702 7 | F .02288 8 | G .02022 9 | H .06094 10 | I .06973 11 | J .00153 12 | K .00747 13 | L .04025 14 | M .02517 15 | N .06749 16 | O .07507 17 | P .01929 18 | Q .00098 19 | R .05987 20 | S .06333 21 | T .09056 22 | U .02758 23 | V .01037 24 | W .02465 25 | X .00150 26 | Y .01971 27 | Z .00074 -------------------------------------------------------------------------------- /examples/chord.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 119 | -------------------------------------------------------------------------------- /examples/cluster/cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 35 | 36 | 37 |
38 | 44 |
45 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /examples/cluster/flare.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flare", 3 | "children": [ 4 | { 5 | "name": "analytics", 6 | "children": [ 7 | { 8 | "name": "cluster", 9 | "children": [ 10 | {"name": "AgglomerativeCluster", "size": 3938}, 11 | {"name": "CommunityStructure", "size": 3812}, 12 | {"name": "HierarchicalCluster", "size": 6714}, 13 | {"name": "MergeEdge", "size": 743} 14 | ] 15 | }, 16 | { 17 | "name": "graph", 18 | "children": [ 19 | {"name": "BetweennessCentrality", "size": 3534}, 20 | {"name": "LinkDistance", "size": 5731}, 21 | {"name": "MaxFlowMinCut", "size": 7840}, 22 | {"name": "ShortestPaths", "size": 5914}, 23 | {"name": "SpanningTree", "size": 3416} 24 | ] 25 | }, 26 | { 27 | "name": "optimization", 28 | "children": [ 29 | {"name": "AspectRatioBanker", "size": 7074} 30 | ] 31 | } 32 | ] 33 | }, 34 | { 35 | "name": "animate", 36 | "children": [ 37 | {"name": "Easing", "size": 17010}, 38 | {"name": "FunctionSequence", "size": 5842}, 39 | { 40 | "name": "interpolate", 41 | "children": [ 42 | {"name": "ArrayInterpolator", "size": 1983}, 43 | {"name": "ColorInterpolator", "size": 2047}, 44 | {"name": "DateInterpolator", "size": 1375}, 45 | {"name": "Interpolator", "size": 8746}, 46 | {"name": "MatrixInterpolator", "size": 2202}, 47 | {"name": "NumberInterpolator", "size": 1382}, 48 | {"name": "ObjectInterpolator", "size": 1629}, 49 | {"name": "PointInterpolator", "size": 1675}, 50 | {"name": "RectangleInterpolator", "size": 2042} 51 | ] 52 | }, 53 | {"name": "ISchedulable", "size": 1041}, 54 | {"name": "Parallel", "size": 5176}, 55 | {"name": "Pause", "size": 449}, 56 | {"name": "Scheduler", "size": 5593}, 57 | {"name": "Sequence", "size": 5534}, 58 | {"name": "Transition", "size": 9201}, 59 | {"name": "Transitioner", "size": 19975}, 60 | {"name": "TransitionEvent", "size": 1116}, 61 | {"name": "Tween", "size": 6006} 62 | ] 63 | }, 64 | { 65 | "name": "data", 66 | "children": [ 67 | { 68 | "name": "converters", 69 | "children": [ 70 | {"name": "Converters", "size": 721}, 71 | {"name": "DelimitedTextConverter", "size": 4294}, 72 | {"name": "GraphMLConverter", "size": 9800}, 73 | {"name": "IDataConverter", "size": 1314}, 74 | {"name": "JSONConverter", "size": 2220} 75 | ] 76 | }, 77 | {"name": "DataField", "size": 1759}, 78 | {"name": "DataSchema", "size": 2165}, 79 | {"name": "DataSet", "size": 586}, 80 | {"name": "DataSource", "size": 3331}, 81 | {"name": "DataTable", "size": 772}, 82 | {"name": "DataUtil", "size": 3322} 83 | ] 84 | }, 85 | { 86 | "name": "display", 87 | "children": [ 88 | {"name": "DirtySprite", "size": 8833}, 89 | {"name": "LineSprite", "size": 1732}, 90 | {"name": "RectSprite", "size": 3623}, 91 | {"name": "TextSprite", "size": 10066} 92 | ] 93 | }, 94 | { 95 | "name": "flex", 96 | "children": [ 97 | {"name": "FlareVis", "size": 4116} 98 | ] 99 | }, 100 | { 101 | "name": "physics", 102 | "children": [ 103 | {"name": "DragForce", "size": 1082}, 104 | {"name": "GravityForce", "size": 1336}, 105 | {"name": "IForce", "size": 319}, 106 | {"name": "NBodyForce", "size": 10498}, 107 | {"name": "Particle", "size": 2822}, 108 | {"name": "Simulation", "size": 9983}, 109 | {"name": "Spring", "size": 2213}, 110 | {"name": "SpringForce", "size": 1681} 111 | ] 112 | }, 113 | { 114 | "name": "query", 115 | "children": [ 116 | {"name": "AggregateExpression", "size": 1616}, 117 | {"name": "And", "size": 1027}, 118 | {"name": "Arithmetic", "size": 3891}, 119 | {"name": "Average", "size": 891}, 120 | {"name": "BinaryExpression", "size": 2893}, 121 | {"name": "Comparison", "size": 5103}, 122 | {"name": "CompositeExpression", "size": 3677}, 123 | {"name": "Count", "size": 781}, 124 | {"name": "DateUtil", "size": 4141}, 125 | {"name": "Distinct", "size": 933}, 126 | {"name": "Expression", "size": 5130}, 127 | {"name": "ExpressionIterator", "size": 3617}, 128 | {"name": "Fn", "size": 3240}, 129 | {"name": "If", "size": 2732}, 130 | {"name": "IsA", "size": 2039}, 131 | {"name": "Literal", "size": 1214}, 132 | {"name": "Match", "size": 3748}, 133 | {"name": "Maximum", "size": 843}, 134 | { 135 | "name": "methods", 136 | "children": [ 137 | {"name": "add", "size": 593}, 138 | {"name": "and", "size": 330}, 139 | {"name": "average", "size": 287}, 140 | {"name": "count", "size": 277}, 141 | {"name": "distinct", "size": 292}, 142 | {"name": "div", "size": 595}, 143 | {"name": "eq", "size": 594}, 144 | {"name": "fn", "size": 460}, 145 | {"name": "gt", "size": 603}, 146 | {"name": "gte", "size": 625}, 147 | {"name": "iff", "size": 748}, 148 | {"name": "isa", "size": 461}, 149 | {"name": "lt", "size": 597}, 150 | {"name": "lte", "size": 619}, 151 | {"name": "max", "size": 283}, 152 | {"name": "min", "size": 283}, 153 | {"name": "mod", "size": 591}, 154 | {"name": "mul", "size": 603}, 155 | {"name": "neq", "size": 599}, 156 | {"name": "not", "size": 386}, 157 | {"name": "or", "size": 323}, 158 | {"name": "orderby", "size": 307}, 159 | {"name": "range", "size": 772}, 160 | {"name": "select", "size": 296}, 161 | {"name": "stddev", "size": 363}, 162 | {"name": "sub", "size": 600}, 163 | {"name": "sum", "size": 280}, 164 | {"name": "update", "size": 307}, 165 | {"name": "variance", "size": 335}, 166 | {"name": "where", "size": 299}, 167 | {"name": "xor", "size": 354}, 168 | {"name": "_", "size": 264} 169 | ] 170 | }, 171 | {"name": "Minimum", "size": 843}, 172 | {"name": "Not", "size": 1554}, 173 | {"name": "Or", "size": 970}, 174 | {"name": "Query", "size": 13896}, 175 | {"name": "Range", "size": 1594}, 176 | {"name": "StringUtil", "size": 4130}, 177 | {"name": "Sum", "size": 791}, 178 | {"name": "Variable", "size": 1124}, 179 | {"name": "Variance", "size": 1876}, 180 | {"name": "Xor", "size": 1101} 181 | ] 182 | }, 183 | { 184 | "name": "scale", 185 | "children": [ 186 | {"name": "IScaleMap", "size": 2105}, 187 | {"name": "LinearScale", "size": 1316}, 188 | {"name": "LogScale", "size": 3151}, 189 | {"name": "OrdinalScale", "size": 3770}, 190 | {"name": "QuantileScale", "size": 2435}, 191 | {"name": "QuantitativeScale", "size": 4839}, 192 | {"name": "RootScale", "size": 1756}, 193 | {"name": "Scale", "size": 4268}, 194 | {"name": "ScaleType", "size": 1821}, 195 | {"name": "TimeScale", "size": 5833} 196 | ] 197 | }, 198 | { 199 | "name": "util", 200 | "children": [ 201 | {"name": "Arrays", "size": 8258}, 202 | {"name": "Colors", "size": 10001}, 203 | {"name": "Dates", "size": 8217}, 204 | {"name": "Displays", "size": 12555}, 205 | {"name": "Filter", "size": 2324}, 206 | {"name": "Geometry", "size": 10993}, 207 | { 208 | "name": "heap", 209 | "children": [ 210 | {"name": "FibonacciHeap", "size": 9354}, 211 | {"name": "HeapNode", "size": 1233} 212 | ] 213 | }, 214 | {"name": "IEvaluable", "size": 335}, 215 | {"name": "IPredicate", "size": 383}, 216 | {"name": "IValueProxy", "size": 874}, 217 | { 218 | "name": "math", 219 | "children": [ 220 | {"name": "DenseMatrix", "size": 3165}, 221 | {"name": "IMatrix", "size": 2815}, 222 | {"name": "SparseMatrix", "size": 3366} 223 | ] 224 | }, 225 | {"name": "Maths", "size": 17705}, 226 | {"name": "Orientation", "size": 1486}, 227 | { 228 | "name": "palette", 229 | "children": [ 230 | {"name": "ColorPalette", "size": 6367}, 231 | {"name": "Palette", "size": 1229}, 232 | {"name": "ShapePalette", "size": 2059}, 233 | {"name": "SizePalette", "size": 2291} 234 | ] 235 | }, 236 | {"name": "Property", "size": 5559}, 237 | {"name": "Shapes", "size": 19118}, 238 | {"name": "Sort", "size": 6887}, 239 | {"name": "Stats", "size": 6557}, 240 | {"name": "Strings", "size": 22026} 241 | ] 242 | }, 243 | { 244 | "name": "vis", 245 | "children": [ 246 | { 247 | "name": "axis", 248 | "children": [ 249 | {"name": "Axes", "size": 1302}, 250 | {"name": "Axis", "size": 24593}, 251 | {"name": "AxisGridLine", "size": 652}, 252 | {"name": "AxisLabel", "size": 636}, 253 | {"name": "CartesianAxes", "size": 6703} 254 | ] 255 | }, 256 | { 257 | "name": "controls", 258 | "children": [ 259 | {"name": "AnchorControl", "size": 2138}, 260 | {"name": "ClickControl", "size": 3824}, 261 | {"name": "Control", "size": 1353}, 262 | {"name": "ControlList", "size": 4665}, 263 | {"name": "DragControl", "size": 2649}, 264 | {"name": "ExpandControl", "size": 2832}, 265 | {"name": "HoverControl", "size": 4896}, 266 | {"name": "IControl", "size": 763}, 267 | {"name": "PanZoomControl", "size": 5222}, 268 | {"name": "SelectionControl", "size": 7862}, 269 | {"name": "TooltipControl", "size": 8435} 270 | ] 271 | }, 272 | { 273 | "name": "data", 274 | "children": [ 275 | {"name": "Data", "size": 20544}, 276 | {"name": "DataList", "size": 19788}, 277 | {"name": "DataSprite", "size": 10349}, 278 | {"name": "EdgeSprite", "size": 3301}, 279 | {"name": "NodeSprite", "size": 19382}, 280 | { 281 | "name": "render", 282 | "children": [ 283 | {"name": "ArrowType", "size": 698}, 284 | {"name": "EdgeRenderer", "size": 5569}, 285 | {"name": "IRenderer", "size": 353}, 286 | {"name": "ShapeRenderer", "size": 2247} 287 | ] 288 | }, 289 | {"name": "ScaleBinding", "size": 11275}, 290 | {"name": "Tree", "size": 7147}, 291 | {"name": "TreeBuilder", "size": 9930} 292 | ] 293 | }, 294 | { 295 | "name": "events", 296 | "children": [ 297 | {"name": "DataEvent", "size": 2313}, 298 | {"name": "SelectionEvent", "size": 1880}, 299 | {"name": "TooltipEvent", "size": 1701}, 300 | {"name": "VisualizationEvent", "size": 1117} 301 | ] 302 | }, 303 | { 304 | "name": "legend", 305 | "children": [ 306 | {"name": "Legend", "size": 20859}, 307 | {"name": "LegendItem", "size": 4614}, 308 | {"name": "LegendRange", "size": 10530} 309 | ] 310 | }, 311 | { 312 | "name": "operator", 313 | "children": [ 314 | { 315 | "name": "distortion", 316 | "children": [ 317 | {"name": "BifocalDistortion", "size": 4461}, 318 | {"name": "Distortion", "size": 6314}, 319 | {"name": "FisheyeDistortion", "size": 3444} 320 | ] 321 | }, 322 | { 323 | "name": "encoder", 324 | "children": [ 325 | {"name": "ColorEncoder", "size": 3179}, 326 | {"name": "Encoder", "size": 4060}, 327 | {"name": "PropertyEncoder", "size": 4138}, 328 | {"name": "ShapeEncoder", "size": 1690}, 329 | {"name": "SizeEncoder", "size": 1830} 330 | ] 331 | }, 332 | { 333 | "name": "filter", 334 | "children": [ 335 | {"name": "FisheyeTreeFilter", "size": 5219}, 336 | {"name": "GraphDistanceFilter", "size": 3165}, 337 | {"name": "VisibilityFilter", "size": 3509} 338 | ] 339 | }, 340 | {"name": "IOperator", "size": 1286}, 341 | { 342 | "name": "label", 343 | "children": [ 344 | {"name": "Labeler", "size": 9956}, 345 | {"name": "RadialLabeler", "size": 3899}, 346 | {"name": "StackedAreaLabeler", "size": 3202} 347 | ] 348 | }, 349 | { 350 | "name": "layout", 351 | "children": [ 352 | {"name": "AxisLayout", "size": 6725}, 353 | {"name": "BundledEdgeRouter", "size": 3727}, 354 | {"name": "CircleLayout", "size": 9317}, 355 | {"name": "CirclePackingLayout", "size": 12003}, 356 | {"name": "DendrogramLayout", "size": 4853}, 357 | {"name": "ForceDirectedLayout", "size": 8411}, 358 | {"name": "IcicleTreeLayout", "size": 4864}, 359 | {"name": "IndentedTreeLayout", "size": 3174}, 360 | {"name": "Layout", "size": 7881}, 361 | {"name": "NodeLinkTreeLayout", "size": 12870}, 362 | {"name": "PieLayout", "size": 2728}, 363 | {"name": "RadialTreeLayout", "size": 12348}, 364 | {"name": "RandomLayout", "size": 870}, 365 | {"name": "StackedAreaLayout", "size": 9121}, 366 | {"name": "TreeMapLayout", "size": 9191} 367 | ] 368 | }, 369 | {"name": "Operator", "size": 2490}, 370 | {"name": "OperatorList", "size": 5248}, 371 | {"name": "OperatorSequence", "size": 4190}, 372 | {"name": "OperatorSwitch", "size": 2581}, 373 | {"name": "SortOperator", "size": 2023} 374 | ] 375 | }, 376 | {"name": "Visualization", "size": 16540} 377 | ] 378 | } 379 | ] 380 | } -------------------------------------------------------------------------------- /examples/d3_examples/line/line-defined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | 30 | 31 | 32 | 33 | 93 | -------------------------------------------------------------------------------- /examples/d3_examples/line/line-radial-defined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 54 | -------------------------------------------------------------------------------- /examples/d3_examples/line/line-radial.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 51 | -------------------------------------------------------------------------------- /examples/d3_examples/line/line.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | 30 | 31 | 32 | 33 | 92 | -------------------------------------------------------------------------------- /examples/donut/data.csv: -------------------------------------------------------------------------------- 1 | age,population 2 | <5,2704659 3 | 5-13,4499890 4 | 14-17,2159981 5 | 18-24,3853788 6 | 25-44,14106543 7 | 45-64,8819342 8 | ≥65,612463 -------------------------------------------------------------------------------- /examples/donut/donut.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/gears.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 38 | 39 | 40 |

41 | data ↦ standards
42 | epicyclical gearing 43 |

44 |
45 | Frame of Reference:
46 | 47 |
48 | 49 |
50 | 51 | 52 |
53 | 54 | 55 | 56 | 57 | 58 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /examples/grouped_bar/data.csv: -------------------------------------------------------------------------------- 1 | State,Under 5 Years,5 to 13 Years,14 to 17 Years,18 to 24 Years,25 to 44 Years,45 to 64 Years,65 Years and Over 2 | CA,2704659,4499890,2159981,3853788,10604510,8819342,4114496 3 | TX,2027307,3277946,1420518,2454721,7017731,5656528,2472223 4 | NY,1208495,2141490,1058031,1999120,5355235,5120254,2607672 5 | FL,1140516,1938695,925060,1607297,4782119,4746856,3187797 6 | IL,894368,1558919,725973,1311479,3596343,3239173,1575308 7 | PA,737462,1345341,679201,1203944,3157759,3414001,1910571 -------------------------------------------------------------------------------- /examples/grouped_bar/grouped_bar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/line/line.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 97 | -------------------------------------------------------------------------------- /examples/multiseries/data.tsv: -------------------------------------------------------------------------------- 1 | date New York San Francisco Austin 2 | 20111001 63.4 62.7 72.2 3 | 20111002 58.0 59.9 67.7 4 | 20111003 53.3 59.1 69.4 5 | 20111004 55.7 58.8 68.0 6 | 20111005 64.2 58.7 72.4 7 | 20111006 58.8 57.0 77.0 8 | 20111007 57.9 56.7 82.3 9 | 20111008 61.8 56.8 78.9 10 | 20111009 69.3 56.7 68.8 11 | 20111010 71.2 60.1 68.7 12 | 20111011 68.7 61.1 70.3 13 | 20111012 61.8 61.5 75.3 14 | 20111013 63.0 64.3 76.6 15 | 20111014 66.9 67.1 66.6 16 | 20111015 61.7 64.6 68.0 17 | 20111016 61.8 61.6 70.6 18 | 20111017 62.8 61.1 71.1 19 | 20111018 60.8 59.2 70.0 20 | 20111019 62.1 58.9 61.6 21 | 20111020 65.1 57.2 57.4 22 | 20111021 55.6 56.4 64.3 23 | 20111022 54.4 60.7 72.4 24 | 20111023 54.4 65.1 72.4 25 | 20111024 54.8 60.9 72.5 26 | 20111025 57.9 56.1 72.7 27 | 20111026 54.6 54.6 73.4 28 | 20111027 54.4 56.1 70.7 29 | 20111028 42.5 58.1 56.8 30 | 20111029 40.9 57.5 51.0 31 | 20111030 38.6 57.7 54.9 32 | 20111031 44.2 55.1 58.8 33 | 20111101 49.6 57.9 62.6 34 | 20111102 47.2 64.6 71.0 35 | 20111103 50.1 56.2 58.4 36 | 20111104 50.1 50.5 45.1 37 | 20111105 43.5 51.3 52.2 38 | 20111106 43.8 52.6 73.0 39 | 20111107 48.9 51.4 75.4 40 | 20111108 55.5 50.6 72.1 41 | 20111109 53.7 54.6 56.6 42 | 20111110 57.7 55.6 55.4 43 | 20111111 48.5 53.9 46.7 44 | 20111112 46.8 54.0 62.0 45 | 20111113 51.1 53.8 71.6 46 | 20111114 56.8 53.5 75.5 47 | 20111115 59.7 53.4 72.1 48 | 20111116 56.5 52.2 65.7 49 | 20111117 49.6 52.7 56.8 50 | 20111118 41.5 53.1 49.9 51 | 20111119 44.3 49.0 71.7 52 | 20111120 54.0 50.4 77.7 53 | 20111121 54.1 51.1 76.4 54 | 20111122 49.4 52.3 68.8 55 | 20111123 50.0 54.6 57.0 56 | 20111124 44.0 55.1 55.5 57 | 20111125 50.3 51.5 61.6 58 | 20111126 52.1 53.6 64.1 59 | 20111127 49.6 52.3 51.1 60 | 20111128 57.2 51.0 43.0 61 | 20111129 59.1 49.5 46.4 62 | 20111130 50.6 49.8 48.0 63 | 20111201 44.3 60.4 48.1 64 | 20111202 43.9 62.2 60.6 65 | 20111203 42.1 58.3 62.6 66 | 20111204 43.9 52.7 57.1 67 | 20111205 50.2 51.5 44.2 68 | 20111206 54.2 49.9 37.4 69 | 20111207 54.6 48.6 35.0 70 | 20111208 43.4 46.4 37.0 71 | 20111209 42.2 49.8 45.4 72 | 20111210 45.0 52.1 50.7 73 | 20111211 33.8 48.8 48.6 74 | 20111212 36.8 47.4 52.2 75 | 20111213 38.6 47.2 60.8 76 | 20111214 41.9 46.1 70.0 77 | 20111215 49.6 48.8 64.2 78 | 20111216 50.2 47.9 50.9 79 | 20111217 40.6 49.8 51.6 80 | 20111218 29.1 49.1 55.2 81 | 20111219 33.7 48.3 62.1 82 | 20111220 45.8 49.3 56.3 83 | 20111221 47.4 48.4 47.2 84 | 20111222 54.4 53.3 52.3 85 | 20111223 47.8 47.5 45.2 86 | 20111224 34.9 47.9 43.6 87 | 20111225 35.9 48.9 42.9 88 | 20111226 43.6 45.9 48.2 89 | 20111227 42.9 47.2 45.4 90 | 20111228 46.2 48.9 44.2 91 | 20111229 30.8 50.9 50.4 92 | 20111230 40.8 52.9 52.4 93 | 20111231 49.8 50.1 53.5 94 | 20120101 46.3 53.9 55.9 95 | 20120102 43.2 53.1 48.2 96 | 20120103 30.3 49.7 41.0 97 | 20120104 19.2 52.7 48.9 98 | 20120105 32.1 52.6 54.8 99 | 20120106 41.2 49.0 61.2 100 | 20120107 47.0 51.0 59.7 101 | 20120108 46.0 56.8 52.5 102 | 20120109 34.7 52.3 54.0 103 | 20120110 39.4 51.6 47.7 104 | 20120111 40.4 49.8 49.2 105 | 20120112 45.4 51.9 48.4 106 | 20120113 40.7 53.7 40.2 107 | 20120114 30.4 52.9 43.9 108 | 20120115 23.9 49.7 45.2 109 | 20120116 22.6 45.3 65.0 110 | 20120117 39.8 43.6 68.2 111 | 20120118 43.2 45.0 47.5 112 | 20120119 26.3 47.3 57.1 113 | 20120120 32.8 51.4 61.9 114 | 20120121 27.4 53.7 54.6 115 | 20120122 25.0 48.3 56.7 116 | 20120123 39.4 52.9 54.4 117 | 20120124 48.7 49.1 52.7 118 | 20120125 43.0 52.1 61.8 119 | 20120126 37.1 53.6 55.0 120 | 20120127 48.2 50.4 50.7 121 | 20120128 43.7 50.3 52.9 122 | 20120129 40.1 53.8 44.4 123 | 20120130 38.0 51.9 49.1 124 | 20120131 43.5 50.0 62.8 125 | 20120201 50.4 50.0 64.6 126 | 20120202 45.8 51.3 61.1 127 | 20120203 37.5 51.5 70.0 128 | 20120204 40.8 52.0 61.3 129 | 20120205 36.5 53.8 48.2 130 | 20120206 39.1 54.6 44.2 131 | 20120207 43.2 54.3 51.3 132 | 20120208 36.5 51.9 49.2 133 | 20120209 36.5 53.8 45.7 134 | 20120210 38.3 53.9 54.1 135 | 20120211 36.9 52.3 44.9 136 | 20120212 29.7 50.1 36.5 137 | 20120213 33.1 49.5 44.8 138 | 20120214 39.6 48.6 52.3 139 | 20120215 42.3 49.9 68.0 140 | 20120216 39.7 52.4 54.6 141 | 20120217 46.0 49.9 53.8 142 | 20120218 41.2 51.6 56.2 143 | 20120219 39.8 47.8 50.8 144 | 20120220 38.1 48.7 53.0 145 | 20120221 37.1 49.7 61.0 146 | 20120222 45.5 53.4 68.8 147 | 20120223 50.6 54.1 69.4 148 | 20120224 42.7 55.9 59.3 149 | 20120225 42.6 51.7 47.2 150 | 20120226 36.9 47.7 47.7 151 | 20120227 40.9 45.4 61.9 152 | 20120228 45.9 47.0 67.2 153 | 20120229 40.7 49.8 70.1 154 | 20120301 41.3 48.9 62.1 155 | 20120302 36.8 48.1 72.7 156 | 20120303 47.6 50.7 59.0 157 | 20120304 44.2 55.0 51.8 158 | 20120305 38.5 48.8 55.0 159 | 20120306 32.9 48.4 61.8 160 | 20120307 43.3 49.9 67.1 161 | 20120308 51.2 49.2 72.0 162 | 20120309 47.8 51.7 46.4 163 | 20120310 37.2 49.3 46.7 164 | 20120311 42.9 50.0 56.9 165 | 20120312 48.8 48.6 61.9 166 | 20120313 52.6 53.9 68.8 167 | 20120314 60.5 55.2 71.9 168 | 20120315 47.2 55.9 72.0 169 | 20120316 44.7 54.6 72.5 170 | 20120317 48.2 48.2 71.7 171 | 20120318 48.2 47.1 71.1 172 | 20120319 53.1 45.8 73.0 173 | 20120320 57.8 49.7 63.8 174 | 20120321 57.5 51.4 60.0 175 | 20120322 57.3 51.4 62.3 176 | 20120323 61.7 48.4 61.1 177 | 20120324 55.8 49.0 62.0 178 | 20120325 48.4 46.4 64.6 179 | 20120326 49.8 49.7 66.0 180 | 20120327 39.6 54.1 65.8 181 | 20120328 49.7 54.6 69.2 182 | 20120329 56.8 52.3 69.5 183 | 20120330 46.5 54.5 73.5 184 | 20120331 42.2 56.2 73.9 185 | 20120401 45.3 51.1 75.3 186 | 20120402 48.1 50.5 75.4 187 | 20120403 51.2 52.2 77.3 188 | 20120404 61.0 50.6 67.0 189 | 20120405 50.7 47.9 71.1 190 | 20120406 48.0 47.4 70.4 191 | 20120407 51.1 49.4 73.6 192 | 20120408 55.7 50.0 71.1 193 | 20120409 58.3 51.3 70.0 194 | 20120410 55.0 53.8 69.0 195 | 20120411 49.0 52.9 69.2 196 | 20120412 51.7 53.9 74.5 197 | 20120413 53.1 50.2 73.4 198 | 20120414 55.2 50.9 76.0 199 | 20120415 62.3 51.5 74.5 200 | 20120416 62.9 51.9 63.6 201 | 20120417 69.3 53.2 67.3 202 | 20120418 59.0 53.0 65.1 203 | 20120419 54.1 55.1 67.9 204 | 20120420 56.5 55.8 68.9 205 | 20120421 58.2 58.0 65.1 206 | 20120422 52.4 52.8 65.4 207 | 20120423 51.6 55.1 70.1 208 | 20120424 49.3 57.9 67.0 209 | 20120425 52.5 57.5 75.4 210 | 20120426 50.5 55.3 77.5 211 | 20120427 51.9 53.5 77.0 212 | 20120428 47.4 54.7 77.7 213 | 20120429 54.1 54.0 77.7 214 | 20120430 51.9 53.4 77.7 215 | 20120501 57.4 52.7 77.0 216 | 20120502 53.7 50.7 77.9 217 | 20120503 53.1 52.6 79.1 218 | 20120504 57.2 53.4 80.1 219 | 20120505 57.0 53.1 82.1 220 | 20120506 56.6 56.5 79.0 221 | 20120507 54.6 55.3 79.8 222 | 20120508 57.9 52.0 70.0 223 | 20120509 59.2 52.4 69.8 224 | 20120510 61.1 53.4 71.3 225 | 20120511 59.7 53.1 69.4 226 | 20120512 64.1 49.9 72.0 227 | 20120513 65.3 52.0 72.4 228 | 20120514 64.2 56.0 72.5 229 | 20120515 62.0 53.0 67.6 230 | 20120516 63.8 51.0 69.0 231 | 20120517 64.5 51.4 72.7 232 | 20120518 61.0 52.2 73.7 233 | 20120519 62.6 52.4 77.5 234 | 20120520 66.2 54.5 75.8 235 | 20120521 62.7 52.8 76.9 236 | 20120522 63.7 53.9 78.8 237 | 20120523 66.4 56.5 77.7 238 | 20120524 64.5 54.7 80.6 239 | 20120525 65.4 52.5 81.4 240 | 20120526 69.4 52.1 82.3 241 | 20120527 71.9 52.2 80.3 242 | 20120528 74.4 52.9 80.3 243 | 20120529 75.9 52.1 82.2 244 | 20120530 72.9 52.1 81.9 245 | 20120531 72.5 53.3 82.4 246 | 20120601 67.2 54.8 77.9 247 | 20120602 68.3 54.0 81.1 248 | 20120603 67.7 52.3 82.2 249 | 20120604 61.9 55.3 81.2 250 | 20120605 58.3 53.5 83.0 251 | 20120606 61.7 54.1 83.2 252 | 20120607 66.7 53.9 82.1 253 | 20120608 68.7 54.4 77.5 254 | 20120609 72.2 55.0 77.9 255 | 20120610 72.6 60.0 82.9 256 | 20120611 69.2 57.2 86.8 257 | 20120612 66.9 55.1 85.3 258 | 20120613 66.7 53.3 76.9 259 | 20120614 67.7 53.4 84.5 260 | 20120615 68.5 54.6 84.4 261 | 20120616 67.5 57.0 83.8 262 | 20120617 64.2 55.6 82.5 263 | 20120618 61.7 52.5 82.9 264 | 20120619 66.4 53.9 82.5 265 | 20120620 77.9 55.3 81.3 266 | 20120621 88.3 53.3 80.8 267 | 20120622 82.2 54.1 81.7 268 | 20120623 77.0 55.2 83.9 269 | 20120624 75.4 55.8 85.5 270 | 20120625 70.9 56.8 87.2 271 | 20120626 65.9 57.5 88.0 272 | 20120627 73.5 57.7 89.6 273 | 20120628 77.4 56.6 86.7 274 | 20120629 79.6 56.4 85.3 275 | 20120630 84.2 58.4 81.7 276 | 20120701 81.8 58.8 78.5 277 | 20120702 82.5 56.4 83.1 278 | 20120703 80.2 56.5 83.1 279 | 20120704 77.8 55.8 84.5 280 | 20120705 86.1 54.8 84.6 281 | 20120706 79.9 54.9 84.2 282 | 20120707 83.5 54.7 86.7 283 | 20120708 81.5 52.8 84.3 284 | 20120709 77.8 53.7 83.7 285 | 20120710 76.1 53.1 77.1 286 | 20120711 76.3 52.7 77.4 287 | 20120712 75.8 52.0 80.6 288 | 20120713 77.2 53.4 81.4 289 | 20120714 79.3 54.0 80.2 290 | 20120715 78.9 54.0 81.8 291 | 20120716 79.6 54.5 77.3 292 | 20120717 83.3 56.7 80.8 293 | 20120718 84.3 57.5 81.6 294 | 20120719 75.1 57.1 80.9 295 | 20120720 68.4 58.1 83.9 296 | 20120721 68.4 57.6 85.6 297 | 20120722 72.2 56.0 83.6 298 | 20120723 75.6 56.6 84.0 299 | 20120724 82.6 57.8 83.0 300 | 20120725 78.4 57.5 84.8 301 | 20120726 77.0 56.4 84.4 302 | 20120727 79.4 55.3 84.3 303 | 20120728 77.4 55.0 83.9 304 | 20120729 72.5 55.6 85.0 305 | 20120730 72.9 55.6 84.9 306 | 20120731 73.6 55.9 86.3 307 | 20120801 75.0 55.4 86.5 308 | 20120802 77.7 54.4 85.8 309 | 20120803 79.7 53.7 85.3 310 | 20120804 79.6 54.1 86.0 311 | 20120805 81.5 57.8 84.2 312 | 20120806 80.0 58.2 81.9 313 | 20120807 75.7 58.0 86.5 314 | 20120808 77.8 57.0 86.1 315 | 20120809 78.6 55.0 86.8 316 | 20120810 77.8 54.8 88.0 317 | 20120811 78.5 53.0 85.1 318 | 20120812 78.8 52.5 87.4 319 | 20120813 78.6 53.3 88.0 320 | 20120814 76.8 53.9 88.0 321 | 20120815 76.7 56.2 87.2 322 | 20120816 75.9 57.1 86.1 323 | 20120817 77.6 55.3 86.8 324 | 20120818 72.6 56.2 84.9 325 | 20120819 70.4 54.3 76.8 326 | 20120820 71.8 53.1 80.6 327 | 20120821 73.6 53.4 80.0 328 | 20120822 74.7 54.5 78.2 329 | 20120823 74.6 55.7 79.1 330 | 20120824 76.0 54.8 81.9 331 | 20120825 76.2 53.8 84.7 332 | 20120826 73.4 56.5 83.5 333 | 20120827 74.6 58.3 82.1 334 | 20120828 79.4 58.7 84.0 335 | 20120829 74.7 57.5 85.7 336 | 20120830 73.5 55.9 87.2 337 | 20120831 77.9 55.4 82.9 338 | 20120901 80.7 55.7 84.8 339 | 20120902 75.1 53.1 83.9 340 | 20120903 73.5 53.5 85.5 341 | 20120904 73.5 52.5 86.4 342 | 20120905 77.7 54.5 85.8 343 | 20120906 74.2 56.3 85.4 344 | 20120907 76.0 56.4 85.3 345 | 20120908 77.1 56.5 81.9 346 | 20120909 69.7 56.4 74.8 347 | 20120910 67.8 55.4 71.6 348 | 20120911 64.0 56.2 75.9 349 | 20120912 68.1 55.7 82.1 350 | 20120913 69.3 54.3 80.5 351 | 20120914 70.0 55.2 70.0 352 | 20120915 69.3 54.3 71.2 353 | 20120916 66.3 52.9 70.3 354 | 20120917 67.0 54.8 72.1 355 | 20120918 72.8 54.8 73.7 356 | 20120919 67.2 56.8 72.7 357 | 20120920 62.1 55.4 71.7 358 | 20120921 64.0 55.8 72.9 359 | 20120922 65.5 55.9 73.1 360 | 20120923 65.7 52.8 75.6 361 | 20120924 60.4 54.5 78.3 362 | 20120925 63.2 53.3 78.3 363 | 20120926 68.5 53.6 79.6 364 | 20120927 69.2 52.1 76.4 365 | 20120928 68.7 52.6 77.2 366 | 20120929 62.5 53.9 75.2 367 | 20120930 62.3 55.1 71.9 -------------------------------------------------------------------------------- /examples/multiseries/line.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/pie/data.csv: -------------------------------------------------------------------------------- 1 | age,population 2 | <5,2704659 3 | 5-13,4499890 4 | 14-17,2159981 5 | 18-24,3853788 6 | 25-44,14106543 7 | 45-64,8819342 8 | ≥65,612463 -------------------------------------------------------------------------------- /examples/pie/pie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/quartz/data.csv: -------------------------------------------------------------------------------- 1 | age,population 2 | 13,4499890 3 | 17,2159981 4 | 18,3853788 5 | 44,14106543 6 | 64,8819342 7 | ≥65,1912463 -------------------------------------------------------------------------------- /examples/quartz/quartz.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/scatterplot/data.tsv: -------------------------------------------------------------------------------- 1 | sepalLength sepalWidth petalLength petalWidth species 2 | 5.1 3.5 1.4 0.2 setosa 3 | 4.9 3.0 1.4 0.2 setosa 4 | 4.7 3.2 1.3 0.2 setosa 5 | 4.6 3.1 1.5 0.2 setosa 6 | 5.0 3.6 1.4 0.2 setosa 7 | 5.4 3.9 1.7 0.4 setosa 8 | 4.6 3.4 1.4 0.3 setosa 9 | 5.0 3.4 1.5 0.2 setosa 10 | 4.4 2.9 1.4 0.2 setosa 11 | 4.9 3.1 1.5 0.1 setosa 12 | 5.4 3.7 1.5 0.2 setosa 13 | 4.8 3.4 1.6 0.2 setosa 14 | 4.8 3.0 1.4 0.1 setosa 15 | 4.3 3.0 1.1 0.1 setosa 16 | 5.8 4.0 1.2 0.2 setosa 17 | 5.7 4.4 1.5 0.4 setosa 18 | 5.4 3.9 1.3 0.4 setosa 19 | 5.1 3.5 1.4 0.3 setosa 20 | 5.7 3.8 1.7 0.3 setosa 21 | 5.1 3.8 1.5 0.3 setosa 22 | 5.4 3.4 1.7 0.2 setosa 23 | 5.1 3.7 1.5 0.4 setosa 24 | 4.6 3.6 1.0 0.2 setosa 25 | 5.1 3.3 1.7 0.5 setosa 26 | 4.8 3.4 1.9 0.2 setosa 27 | 5.0 3.0 1.6 0.2 setosa 28 | 5.0 3.4 1.6 0.4 setosa 29 | 5.2 3.5 1.5 0.2 setosa 30 | 5.2 3.4 1.4 0.2 setosa 31 | 4.7 3.2 1.6 0.2 setosa 32 | 4.8 3.1 1.6 0.2 setosa 33 | 5.4 3.4 1.5 0.4 setosa 34 | 5.2 4.1 1.5 0.1 setosa 35 | 5.5 4.2 1.4 0.2 setosa 36 | 4.9 3.1 1.5 0.2 setosa 37 | 5.0 3.2 1.2 0.2 setosa 38 | 5.5 3.5 1.3 0.2 setosa 39 | 4.9 3.6 1.4 0.1 setosa 40 | 4.4 3.0 1.3 0.2 setosa 41 | 5.1 3.4 1.5 0.2 setosa 42 | 5.0 3.5 1.3 0.3 setosa 43 | 4.5 2.3 1.3 0.3 setosa 44 | 4.4 3.2 1.3 0.2 setosa 45 | 5.0 3.5 1.6 0.6 setosa 46 | 5.1 3.8 1.9 0.4 setosa 47 | 4.8 3.0 1.4 0.3 setosa 48 | 5.1 3.8 1.6 0.2 setosa 49 | 4.6 3.2 1.4 0.2 setosa 50 | 5.3 3.7 1.5 0.2 setosa 51 | 5.0 3.3 1.4 0.2 setosa 52 | 7.0 3.2 4.7 1.4 versicolor 53 | 6.4 3.2 4.5 1.5 versicolor 54 | 6.9 3.1 4.9 1.5 versicolor 55 | 5.5 2.3 4.0 1.3 versicolor 56 | 6.5 2.8 4.6 1.5 versicolor 57 | 5.7 2.8 4.5 1.3 versicolor 58 | 6.3 3.3 4.7 1.6 versicolor 59 | 4.9 2.4 3.3 1.0 versicolor 60 | 6.6 2.9 4.6 1.3 versicolor 61 | 5.2 2.7 3.9 1.4 versicolor 62 | 5.0 2.0 3.5 1.0 versicolor 63 | 5.9 3.0 4.2 1.5 versicolor 64 | 6.0 2.2 4.0 1.0 versicolor 65 | 6.1 2.9 4.7 1.4 versicolor 66 | 5.6 2.9 3.6 1.3 versicolor 67 | 6.7 3.1 4.4 1.4 versicolor 68 | 5.6 3.0 4.5 1.5 versicolor 69 | 5.8 2.7 4.1 1.0 versicolor 70 | 6.2 2.2 4.5 1.5 versicolor 71 | 5.6 2.5 3.9 1.1 versicolor 72 | 5.9 3.2 4.8 1.8 versicolor 73 | 6.1 2.8 4.0 1.3 versicolor 74 | 6.3 2.5 4.9 1.5 versicolor 75 | 6.1 2.8 4.7 1.2 versicolor 76 | 6.4 2.9 4.3 1.3 versicolor 77 | 6.6 3.0 4.4 1.4 versicolor 78 | 6.8 2.8 4.8 1.4 versicolor 79 | 6.7 3.0 5.0 1.7 versicolor 80 | 6.0 2.9 4.5 1.5 versicolor 81 | 5.7 2.6 3.5 1.0 versicolor 82 | 5.5 2.4 3.8 1.1 versicolor 83 | 5.5 2.4 3.7 1.0 versicolor 84 | 5.8 2.7 3.9 1.2 versicolor 85 | 6.0 2.7 5.1 1.6 versicolor 86 | 5.4 3.0 4.5 1.5 versicolor 87 | 6.0 3.4 4.5 1.6 versicolor 88 | 6.7 3.1 4.7 1.5 versicolor 89 | 6.3 2.3 4.4 1.3 versicolor 90 | 5.6 3.0 4.1 1.3 versicolor 91 | 5.5 2.5 4.0 1.3 versicolor 92 | 5.5 2.6 4.4 1.2 versicolor 93 | 6.1 3.0 4.6 1.4 versicolor 94 | 5.8 2.6 4.0 1.2 versicolor 95 | 5.0 2.3 3.3 1.0 versicolor 96 | 5.6 2.7 4.2 1.3 versicolor 97 | 5.7 3.0 4.2 1.2 versicolor 98 | 5.7 2.9 4.2 1.3 versicolor 99 | 6.2 2.9 4.3 1.3 versicolor 100 | 5.1 2.5 3.0 1.1 versicolor 101 | 5.7 2.8 4.1 1.3 versicolor 102 | 6.3 3.3 6.0 2.5 virginica 103 | 5.8 2.7 5.1 1.9 virginica 104 | 7.1 3.0 5.9 2.1 virginica 105 | 6.3 2.9 5.6 1.8 virginica 106 | 6.5 3.0 5.8 2.2 virginica 107 | 7.6 3.0 6.6 2.1 virginica 108 | 4.9 2.5 4.5 1.7 virginica 109 | 7.3 2.9 6.3 1.8 virginica 110 | 6.7 2.5 5.8 1.8 virginica 111 | 7.2 3.6 6.1 2.5 virginica 112 | 6.5 3.2 5.1 2.0 virginica 113 | 6.4 2.7 5.3 1.9 virginica 114 | 6.8 3.0 5.5 2.1 virginica 115 | 5.7 2.5 5.0 2.0 virginica 116 | 5.8 2.8 5.1 2.4 virginica 117 | 6.4 3.2 5.3 2.3 virginica 118 | 6.5 3.0 5.5 1.8 virginica 119 | 7.7 3.8 6.7 2.2 virginica 120 | 7.7 2.6 6.9 2.3 virginica 121 | 6.0 2.2 5.0 1.5 virginica 122 | 6.9 3.2 5.7 2.3 virginica 123 | 5.6 2.8 4.9 2.0 virginica 124 | 7.7 2.8 6.7 2.0 virginica 125 | 6.3 2.7 4.9 1.8 virginica 126 | 6.7 3.3 5.7 2.1 virginica 127 | 7.2 3.2 6.0 1.8 virginica 128 | 6.2 2.8 4.8 1.8 virginica 129 | 6.1 3.0 4.9 1.8 virginica 130 | 6.4 2.8 5.6 2.1 virginica 131 | 7.2 3.0 5.8 1.6 virginica 132 | 7.4 2.8 6.1 1.9 virginica 133 | 7.9 3.8 6.4 2.0 virginica 134 | 6.4 2.8 5.6 2.2 virginica 135 | 6.3 2.8 5.1 1.5 virginica 136 | 6.1 2.6 5.6 1.4 virginica 137 | 7.7 3.0 6.1 2.3 virginica 138 | 6.3 3.4 5.6 2.4 virginica 139 | 6.4 3.1 5.5 1.8 virginica 140 | 6.0 3.0 4.8 1.8 virginica 141 | 6.9 3.1 5.4 2.1 virginica 142 | 6.7 3.1 5.6 2.4 virginica 143 | 6.9 3.1 5.1 2.3 virginica 144 | 5.8 2.7 5.1 1.9 virginica 145 | 6.8 3.2 5.9 2.3 virginica 146 | 6.7 3.3 5.7 2.5 virginica 147 | 6.7 3.0 5.2 2.3 virginica 148 | 6.3 2.5 5.0 1.9 virginica 149 | 6.5 3.0 5.2 2.0 virginica 150 | 6.2 3.4 5.4 2.3 virginica 151 | 5.9 3.0 5.1 1.8 virginica -------------------------------------------------------------------------------- /examples/scatterplot/scatterplot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/stacked_bar/data.csv: -------------------------------------------------------------------------------- 1 | State,Under 5 Years,5 to 13 Years,14 to 17 Years,18 to 24 Years,25 to 44 Years,45 to 64 Years,65 Years and Over 2 | AL,310504,552339,259034,450818,1231572,1215966,641667 3 | AK,52083,85640,42153,74257,198724,183159,50277 4 | AZ,515910,828669,362642,601943,1804762,1523681,862573 5 | AR,202070,343207,157204,264160,754420,727124,407205 6 | CA,2704659,4499890,2159981,3853788,10604510,8819342,4114496 7 | CO,358280,587154,261701,466194,1464939,1290094,511094 8 | CT,211637,403658,196918,325110,916955,968967,478007 9 | DE,59319,99496,47414,84464,230183,230528,121688 10 | DC,36352,50439,25225,75569,193557,140043,70648 11 | FL,1140516,1938695,925060,1607297,4782119,4746856,3187797 12 | GA,740521,1250460,557860,919876,2846985,2389018,981024 13 | HI,87207,134025,64011,124834,356237,331817,190067 14 | ID,121746,201192,89702,147606,406247,375173,182150 15 | IL,894368,1558919,725973,1311479,3596343,3239173,1575308 16 | IN,443089,780199,361393,605863,1724528,1647881,813839 17 | IA,201321,345409,165883,306398,750505,788485,444554 18 | KS,202529,342134,155822,293114,728166,713663,366706 19 | KY,284601,493536,229927,381394,1179637,1134283,565867 20 | LA,310716,542341,254916,471275,1162463,1128771,540314 21 | ME,71459,133656,69752,112682,331809,397911,199187 22 | MD,371787,651923,316873,543470,1556225,1513754,679565 23 | MA,383568,701752,341713,665879,1782449,1751508,871098 24 | MI,625526,1179503,585169,974480,2628322,2706100,1304322 25 | MN,358471,606802,289371,507289,1416063,1391878,650519 26 | MS,220813,371502,174405,305964,764203,730133,371598 27 | MO,399450,690476,331543,560463,1569626,1554812,805235 28 | MT,61114,106088,53156,95232,236297,278241,137312 29 | NE,132092,215265,99638,186657,457177,451756,240847 30 | NV,199175,325650,142976,212379,769913,653357,296717 31 | NH,75297,144235,73826,119114,345109,388250,169978 32 | NJ,557421,1011656,478505,769321,2379649,2335168,1150941 33 | NM,148323,241326,112801,203097,517154,501604,260051 34 | NY,1208495,2141490,1058031,1999120,5355235,5120254,2607672 35 | NC,652823,1097890,492964,883397,2575603,2380685,1139052 36 | ND,41896,67358,33794,82629,154913,166615,94276 37 | OH,743750,1340492,646135,1081734,3019147,3083815,1570837 38 | OK,266547,438926,200562,369916,957085,918688,490637 39 | OR,243483,424167,199925,338162,1044056,1036269,503998 40 | PA,737462,1345341,679201,1203944,3157759,3414001,1910571 41 | RI,60934,111408,56198,114502,277779,282321,147646 42 | SC,303024,517803,245400,438147,1193112,1186019,596295 43 | SD,58566,94438,45305,82869,196738,210178,116100 44 | TN,416334,725948,336312,550612,1719433,1646623,819626 45 | TX,2027307,3277946,1420518,2454721,7017731,5656528,2472223 46 | UT,268916,413034,167685,329585,772024,538978,246202 47 | VT,32635,62538,33757,61679,155419,188593,86649 48 | VA,522672,887525,413004,768475,2203286,2033550,940577 49 | WA,433119,750274,357782,610378,1850983,1762811,783877 50 | WV,105435,189649,91074,157989,470749,514505,285067 51 | WI,362277,640286,311849,553914,1487457,1522038,750146 52 | WY,38253,60890,29314,53980,137338,147279,65614 -------------------------------------------------------------------------------- /examples/stacked_bar/stacked_bar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /lib/compat/compat.js: -------------------------------------------------------------------------------- 1 | // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map 2 | // Production steps of ECMA-262, Edition 5, 15.4.4.19 3 | // Reference: http://es5.github.com/#x15.4.4.19 4 | if (!Array.prototype.map) { 5 | Array.prototype.map = function(callback, thisArg) { 6 | 7 | var T, A, k; 8 | 9 | if (this == null) { 10 | throw new TypeError(" this is null or not defined"); 11 | } 12 | 13 | // 1. Let O be the result of calling ToObject passing the |this| value as the argument. 14 | var O = Object(this); 15 | 16 | // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". 17 | // 3. Let len be ToUint32(lenValue). 18 | var len = O.length >>> 0; 19 | 20 | // 4. If IsCallable(callback) is false, throw a TypeError exception. 21 | // See: http://es5.github.com/#x9.11 22 | if ({}.toString.call(callback) != "[object Function]") { 23 | throw new TypeError(callback + " is not a function"); 24 | } 25 | 26 | // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. 27 | if (thisArg) { 28 | T = thisArg; 29 | } 30 | 31 | // 6. Let A be a new array created as if by the expression new Array(len) where Array is 32 | // the standard built-in constructor with that name and len is the value of len. 33 | A = new Array(len); 34 | 35 | // 7. Let k be 0 36 | k = 0; 37 | 38 | // 8. Repeat, while k < len 39 | while(k < len) { 40 | 41 | var kValue, mappedValue; 42 | 43 | // a. Let Pk be ToString(k). 44 | // This is implicit for LHS operands of the in operator 45 | // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. 46 | // This step can be combined with c 47 | // c. If kPresent is true, then 48 | if (k in O) { 49 | 50 | // i. Let kValue be the result of calling the Get internal method of O with argument Pk. 51 | kValue = O[ k ]; 52 | 53 | // ii. Let mappedValue be the result of calling the Call internal method of callback 54 | // with T as the this value and argument list containing kValue, k, and O. 55 | mappedValue = callback.call(T, kValue, k, O); 56 | 57 | // iii. Call the DefineOwnProperty internal method of A with arguments 58 | // Pk, Property Descriptor {Value: mappedValue, Writable: true, Enumerable: true, Configurable: true}, 59 | // and false. 60 | 61 | // In browsers that support Object.defineProperty, use the following: 62 | // Object.defineProperty(A, Pk, { value: mappedValue, writable: true, enumerable: true, configurable: true }); 63 | 64 | // For best browser support, use the following: 65 | A[ k ] = mappedValue; 66 | } 67 | // d. Increase k by 1. 68 | k++; 69 | } 70 | 71 | // 9. return A 72 | return A; 73 | }; 74 | } 75 | 76 | // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach 77 | // Production steps of ECMA-262, Edition 5, 15.4.4.18 78 | // Reference: http://es5.github.com/#x15.4.4.18 79 | if ( !Array.prototype.forEach ) { 80 | 81 | Array.prototype.forEach = function( callback, thisArg ) { 82 | 83 | var T, k; 84 | 85 | if ( this == null ) { 86 | throw new TypeError( " this is null or not defined" ); 87 | } 88 | 89 | // 1. Let O be the result of calling ToObject passing the |this| value as the argument. 90 | var O = Object(this); 91 | 92 | // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". 93 | // 3. Let len be ToUint32(lenValue). 94 | var len = O.length >>> 0; // Hack to convert O.length to a UInt32 95 | 96 | // 4. If IsCallable(callback) is false, throw a TypeError exception. 97 | // See: http://es5.github.com/#x9.11 98 | if ( {}.toString.call(callback) != "[object Function]" ) { 99 | throw new TypeError( callback + " is not a function" ); 100 | } 101 | 102 | // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. 103 | if ( thisArg ) { 104 | T = thisArg; 105 | } 106 | 107 | // 6. Let k be 0 108 | k = 0; 109 | 110 | // 7. Repeat, while k < len 111 | while( k < len ) { 112 | 113 | var kValue; 114 | 115 | // a. Let Pk be ToString(k). 116 | // This is implicit for LHS operands of the in operator 117 | // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. 118 | // This step can be combined with c 119 | // c. If kPresent is true, then 120 | if ( k in O ) { 121 | 122 | // i. Let kValue be the result of calling the Get internal method of O with argument Pk. 123 | kValue = O[ k ]; 124 | 125 | // ii. Call the Call internal method of callback with T as the this value and 126 | // argument list containing kValue, k, and O. 127 | callback.call( T, kValue, k, O ); 128 | } 129 | // d. Increase k by 1. 130 | k++; 131 | } 132 | // 8. return undefined 133 | }; 134 | } 135 | 136 | // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf 137 | if (!Array.prototype.indexOf) { 138 | Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { 139 | "use strict"; 140 | if (this == null) { 141 | throw new TypeError(); 142 | } 143 | var t = Object(this); 144 | var len = t.length >>> 0; 145 | if (len === 0) { 146 | return -1; 147 | } 148 | var n = 0; 149 | if (arguments.length > 0) { 150 | n = Number(arguments[1]); 151 | if (n != n) { // shortcut for verifying if it's NaN 152 | n = 0; 153 | } else if (n != 0 && n != Infinity && n != -Infinity) { 154 | n = (n > 0 || -1) * Math.floor(Math.abs(n)); 155 | } 156 | } 157 | if (n >= len) { 158 | return -1; 159 | } 160 | var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); 161 | for (; k < len; k++) { 162 | if (k in t && t[k] === searchElement) { 163 | return k; 164 | } 165 | } 166 | return -1; 167 | }; 168 | } 169 | 170 | // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter 171 | if (!Array.prototype.filter) 172 | { 173 | Array.prototype.filter = function(fun /*, thisp */) 174 | { 175 | "use strict"; 176 | 177 | if (this == null) { 178 | throw new TypeError(); 179 | } 180 | 181 | var t = Object(this); 182 | var len = t.length >>> 0; 183 | if (typeof fun != "function") { 184 | throw new TypeError(); 185 | } 186 | 187 | var res = []; 188 | var thisp = arguments[1]; 189 | for (var i = 0; i < len; i++) 190 | { 191 | if (i in t) 192 | { 193 | var val = t[i]; // in case fun mutates this 194 | if (fun.call(thisp, val, i, t)) { 195 | res.push(val); 196 | } 197 | } 198 | } 199 | 200 | return res; 201 | }; 202 | } 203 | 204 | if (!Array.prototype.reduce) { 205 | Array.prototype.reduce = function reduce(accumulator){ 206 | if (this===null || this===undefined) throw new TypeError("Object is null or undefined"); 207 | var i = 0, l = this.length >> 0, curr; 208 | 209 | if(typeof accumulator !== "function") // ES5 : "If IsCallable(callbackfn) is false, throw a TypeError exception." 210 | throw new TypeError("First argument is not callable"); 211 | 212 | if(arguments.length < 2) { 213 | if (l === 0) throw new TypeError("Array length is 0 and no second argument"); 214 | curr = this[0]; 215 | i = 1; // start accumulating at the second element 216 | } 217 | else 218 | curr = arguments[1]; 219 | 220 | while (i < l) { 221 | if(i in this) curr = accumulator.call(undefined, curr, this[i], i, this); 222 | ++i; 223 | } 224 | 225 | return curr; 226 | }; 227 | } 228 | 229 | if (!String.prototype.trim) { 230 | String.prototype.trim = function() { 231 | return this.replace(/^\s+|\s+$/g, ''); 232 | }; 233 | } 234 | 235 | 236 | // https://github.com/mbostock/d3/issues/42#issuecomment-1265410 237 | if(!document.createElementNS) { 238 | document.createElementNS = function(ns, name) { 239 | return document.createElement(name); 240 | }; 241 | } 242 | 243 | 244 | if (!Object.create) { 245 | Object.create = function (o) { 246 | if (arguments.length > 1) { 247 | throw new Error('Object.create implementation only accepts the first parameter.'); 248 | } 249 | function F() {} 250 | F.prototype = o; 251 | return new F(); 252 | }; 253 | } 254 | -------------------------------------------------------------------------------- /lib/compat/json3.min.js: -------------------------------------------------------------------------------- 1 | /*! JSON v3.2.4 | http://bestiejs.github.com/json3 | Copyright 2012, Kit Cambridge | http://kit.mit-license.org */ 2 | ;(function(){var e=void 0,i=!0,k=null,l={}.toString,m,n,p="function"===typeof define&&define.c,q=!p&&"object"==typeof exports&&exports;q||p?"object"==typeof JSON&&JSON?p?q=JSON:(q.stringify=JSON.stringify,q.parse=JSON.parse):p&&(q=this.JSON={}):q=this.JSON||(this.JSON={});var r,t,u,x,z,B,C,D,E,F,G,H,I,J=new Date(-3509827334573292),K,O,P;try{J=-109252==J.getUTCFullYear()&&0===J.getUTCMonth()&&1==J.getUTCDate()&&10==J.getUTCHours()&&37==J.getUTCMinutes()&&6==J.getUTCSeconds()&&708==J.getUTCMilliseconds()}catch(Q){} 3 | function R(b){var c,a,d,j=b=="json";if(j||b=="json-stringify"||b=="json-parse"){if(b=="json-stringify"||j){if(c=typeof q.stringify=="function"&&J){(d=function(){return 1}).toJSON=d;try{c=q.stringify(0)==="0"&&q.stringify(new Number)==="0"&&q.stringify(new String)=='""'&&q.stringify(l)===e&&q.stringify(e)===e&&q.stringify()===e&&q.stringify(d)==="1"&&q.stringify([d])=="[1]"&&q.stringify([e])=="[null]"&&q.stringify(k)=="null"&&q.stringify([e,l,k])=="[null,null,null]"&&q.stringify({A:[d,i,false,k,"\x00\u0008\n\u000c\r\t"]})== 4 | '{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'&&q.stringify(k,d)==="1"&&q.stringify([1,2],k,1)=="[\n 1,\n 2\n]"&&q.stringify(new Date(-864E13))=='"-271821-04-20T00:00:00.000Z"'&&q.stringify(new Date(864E13))=='"+275760-09-13T00:00:00.000Z"'&&q.stringify(new Date(-621987552E5))=='"-000001-01-01T00:00:00.000Z"'&&q.stringify(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(f){c=false}}if(!j)return c}if(b=="json-parse"||j){if(typeof q.parse=="function")try{if(q.parse("0")===0&&!q.parse(false)){d= 5 | q.parse('{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');if(a=d.a.length==5&&d.a[0]==1){try{a=!q.parse('"\t"')}catch(o){}if(a)try{a=q.parse("01")!=1}catch(g){}}}}catch(h){a=false}if(!j)return a}return c&&a}} 6 | if(!R("json")){J||(K=Math.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(b,c){return O[c]+365*(b-1970)+K((b-1969+(c=+(c>1)))/4)-K((b-1901+c)/100)+K((b-1601+c)/400)});if(!(m={}.hasOwnProperty))m=function(b){var c={},a;if((c.__proto__=k,c.__proto__={toString:1},c).toString!=l)m=function(a){var b=this.__proto__,a=a in(this.__proto__=k,this);this.__proto__=b;return a};else{a=c.constructor;m=function(b){var c=(this.constructor||a).prototype;return b in this&&!(b in c&&this[b]===c[b])}}c= 7 | k;return m.call(this,b)};n=function(b,c){var a=0,d,j,f;(d=function(){this.valueOf=0}).prototype.valueOf=0;j=new d;for(f in j)m.call(j,f)&&a++;d=j=k;if(a)a=a==2?function(a,b){var c={},d=l.call(a)=="[object Function]",f;for(f in a)!(d&&f=="prototype")&&!m.call(c,f)&&(c[f]=1)&&m.call(a,f)&&b(f)}:function(a,b){var c=l.call(a)=="[object Function]",d,f;for(d in a)!(c&&d=="prototype")&&m.call(a,d)&&!(f=d==="constructor")&&b(d);(f||m.call(a,d="constructor"))&&b(d)};else{j=["valueOf","toString","toLocaleString", 8 | "propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];a=function(a,b){var c=l.call(a)=="[object Function]",d;for(d in a)!(c&&d=="prototype")&&m.call(a,d)&&b(d);for(c=j.length;d=j[--c];m.call(a,d)&&b(d));}}a(b,c)};R("json-stringify")||(r={"\\":"\\\\",'"':'\\"',"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},t=function(b,c){return("000000"+(c||0)).slice(-b)},u=function(b){for(var c='"',a=0,d;d=b.charAt(a);a++)c=c+('\\"\u0008\u000c\n\r\t'.indexOf(d)>-1?r[d]:r[d]=d<" "? 9 | "\\u00"+t(2,d.charCodeAt(0).toString(16)):d);return c+'"'},x=function(b,c,a,d,j,f,o){var g=c[b],h,s,v,w,L,M,N,y,A;if(typeof g=="object"&&g){h=l.call(g);if(h=="[object Date]"&&!m.call(g,"toJSON"))if(g>-1/0&&g<1/0){if(P){v=K(g/864E5);for(h=K(v/365.2425)+1970-1;P(h+1,0)<=v;h++);for(s=K((v-P(h,0))/30.42);P(h,s+1)<=v;s++);v=1+v-P(h,s);w=(g%864E5+864E5)%864E5;L=K(w/36E5)%24;M=K(w/6E4)%60;N=K(w/1E3)%60;w=w%1E3}else{h=g.getUTCFullYear();s=g.getUTCMonth();v=g.getUTCDate();L=g.getUTCHours();M=g.getUTCMinutes(); 10 | N=g.getUTCSeconds();w=g.getUTCMilliseconds()}g=(h<=0||h>=1E4?(h<0?"-":"+")+t(6,h<0?-h:h):t(4,h))+"-"+t(2,s+1)+"-"+t(2,v)+"T"+t(2,L)+":"+t(2,M)+":"+t(2,N)+"."+t(3,w)+"Z"}else g=k;else if(typeof g.toJSON=="function"&&(h!="[object Number]"&&h!="[object String]"&&h!="[object Array]"||m.call(g,"toJSON")))g=g.toJSON(b)}a&&(g=a.call(c,b,g));if(g===k)return"null";h=l.call(g);if(h=="[object Boolean]")return""+g;if(h=="[object Number]")return g>-1/0&&g<1/0?""+g:"null";if(h=="[object String]")return u(g);if(typeof g== 11 | "object"){for(b=o.length;b--;)if(o[b]===g)throw TypeError();o.push(g);y=[];c=f;f=f+j;if(h=="[object Array]"){s=0;for(b=g.length;s0){d="";for(a>10&&(a=10);d.length-1)H++;else{if("{}[]:,".indexOf(a)>-1){H++;return a}if(a=='"'){d="@";for(H++;H-1){d=d+B[a];H++}else if(a=="u"){j=++H;for(f=H+4;H="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F"||C()}d=d+z("0x"+b.slice(j,H))}else C()}else{if(a=='"')break; 14 | d=d+a;H++}}if(b.charAt(H)=='"'){H++;return d}}else{j=H;if(a=="-"){o=i;a=b.charAt(++H)}if(a>="0"&&a<="9"){for(a=="0"&&(a=b.charAt(H+1),a>="0"&&a<="9")&&C();H="0"&&a<="9");H++);if(b.charAt(H)=="."){for(f=++H;f="0"&&a<="9");f++);f==H&&C();H=f}a=b.charAt(H);if(a=="e"||a=="E"){a=b.charAt(++H);(a=="+"||a=="-")&&H++;for(f=H;f="0"&&a<="9");f++);f==H&&C();H=f}return+b.slice(j,H)}o&&C();if(b.slice(H,H+4)=="true"){H=H+4;return i}if(b.slice(H,H+5)== 15 | "false"){H=H+5;return false}if(b.slice(H,H+4)=="null"){H=H+4;return k}}C()}}return"$"},E=function(b){var c,a;b=="$"&&C();if(typeof b=="string"){if(b.charAt(0)=="@")return b.slice(1);if(b=="["){for(c=[];;a||(a=i)){b=D();if(b=="]")break;if(a)if(b==","){b=D();b=="]"&&C()}else C();b==","&&C();c.push(E(b))}return c}if(b=="{"){for(c={};;a||(a=i)){b=D();if(b=="}")break;if(a)if(b==","){b=D();b=="}"&&C()}else C();(b==","||typeof b!="string"||b.charAt(0)!="@"||D()!=":")&&C();c[b.slice(1)]=E(D())}return c}C()}return b}, 16 | G=function(b,c,a){a=F(b,c,a);a===e?delete b[c]:b[c]=a},F=function(b,c,a){var d=b[c],j;if(typeof d=="object"&&d)if(l.call(d)=="[object Array]")for(j=d.length;j--;)G(d,j,a);else n(d,function(b){G(d,b,a)});return a.call(b,c,d)},q.parse=function(b,c){var a,d;H=0;I=b;a=E(D());D()!="$"&&C();H=I=k;return c&&l.call(c)=="[object Function]"?F((d={},d[""]=a,d),"",c):a})}p&&define(function(){return q}); 17 | }()); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "r2d3", 3 | "version": "0.2.0", 4 | "description": "Raphael Rendered, Data Driven Documents", 5 | "repository": { 6 | "type": "git", 7 | "url": "git@github.com:mhemesath/r2d3.git" 8 | }, 9 | "devDependencies": { 10 | "uglify-js": "~2.4.x" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/compat/style.js: -------------------------------------------------------------------------------- 1 | if (window.CSSStyleDeclaration) { 2 | window.CSSStyleDeclaration.prototype.getProperty = function(a) { 3 | return this.getAttribute(a); 4 | }; 5 | 6 | window.CSSStyleDeclaration.prototype.setProperty = function(a,b) { 7 | return this.setAttribute(a,b); 8 | }; 9 | 10 | window.CSSStyleDeclaration.prototype.removeProperty = function(a) { 11 | return this.removeAttribute(a); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/core/README.md: -------------------------------------------------------------------------------- 1 | D3 Patches 2 | ========== 3 | 4 | This directory contains the individual patch files to make D3 work in Internet Explorer. 5 | 6 | Adding a Patch 7 | --------------- 8 | 9 | To patch a d3 module, copy its contents from ```lib/d3/src``` into this directory then modify the code as needed to function in Internet Explorer. 10 | Once the patch has been made, update the makefile to reference the patched module and re-run the ```make``` command. -------------------------------------------------------------------------------- /src/core/format.js: -------------------------------------------------------------------------------- 1 | d3.format = function(specifier) { 2 | var match = d3_format_re.exec(specifier), 3 | fill = match[1] || " ", 4 | align = match[2] || ">", 5 | sign = match[3] || "", 6 | basePrefix = match[4] || "", 7 | zfill = match[5], 8 | width = +match[6], 9 | comma = match[7], 10 | precision = match[8], 11 | type = match[9], 12 | scale = 1, 13 | suffix = "", 14 | integer = false; 15 | 16 | if (precision) precision = +precision.substring(1); 17 | 18 | if (zfill || fill === "0" && align === "=") { 19 | zfill = fill = "0"; 20 | align = "="; 21 | if (comma) width -= Math.floor((width - 1) / 4); 22 | } 23 | 24 | switch (type) { 25 | case "n": comma = true; type = "g"; break; 26 | case "%": scale = 100; suffix = "%"; type = "f"; break; 27 | case "p": scale = 100; suffix = "%"; type = "r"; break; 28 | case "b": 29 | case "o": 30 | case "x": 31 | case "X": if (basePrefix) basePrefix = "0" + type.toLowerCase(); 32 | case "c": 33 | case "d": integer = true; precision = 0; break; 34 | case "s": scale = -1; type = "r"; break; 35 | } 36 | 37 | if (basePrefix === "#") basePrefix = ""; 38 | 39 | // If no precision is specified for r, fallback to general notation. 40 | if (type == "r" && !precision) type = "g"; 41 | 42 | type = d3_format_types.get(type) || d3_format_typeDefault; 43 | 44 | var zcomma = zfill && comma; 45 | 46 | return function(value) { 47 | 48 | // Return the empty string for floats formatted as ints. 49 | if (integer && (value % 1)) return ""; 50 | 51 | // Convert negative to positive, and record the sign prefix. 52 | var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign; 53 | 54 | // Apply the scale, computing it from the value's exponent for si format. 55 | if (scale < 0) { 56 | var prefix = d3.formatPrefix(value, precision); 57 | value = prefix.scale(value); 58 | suffix = prefix.symbol; 59 | } else { 60 | value *= scale; 61 | } 62 | 63 | // Convert to the desired precision. 64 | value = type(value, precision); 65 | 66 | // If the fill character is not "0", grouping is applied before padding. 67 | if (!zfill && comma) value = d3_format_group(value); 68 | 69 | var length = basePrefix.length + value.length + (zcomma ? 0 : negative.length), 70 | padding = length < width ? new Array(length = width - length + 1).join(fill) : ""; 71 | 72 | // If the fill character is "0", grouping is applied after padding. 73 | if (zcomma) value = d3_format_group(padding + value); 74 | 75 | if (d3_format_decimalPoint) value.replace(".", d3_format_decimalPoint); 76 | 77 | negative += basePrefix; 78 | 79 | return (align === "<" ? negative + value + padding 80 | : align === ">" ? padding + negative + value 81 | : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) 82 | : negative + (zcomma ? value : padding + value)) + suffix; 83 | }; 84 | }; 85 | 86 | // [[fill]align][sign][#][0][width][,][.precision][type] 87 | var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/; 88 | 89 | var d3_format_types = d3.map({ 90 | b: function(x) { return x.toString(2); }, 91 | c: function(x) { return String.fromCharCode(x); }, 92 | o: function(x) { return x.toString(8); }, 93 | x: function(x) { return x.toString(16); }, 94 | X: function(x) { return x.toString(16).toUpperCase(); }, 95 | g: function(x, p) { return p ? x.toPrecision(p) : x.toString(); }, 96 | e: function(x, p) { return x.toExponential(p); }, 97 | f: function(x, p) { return x.toFixed(p); }, 98 | r: function(x, p) { return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p)))); } 99 | }); 100 | 101 | function d3_format_precision(x, p) { 102 | return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1); 103 | } 104 | 105 | function d3_format_typeDefault(x) { 106 | return x + ""; 107 | } 108 | 109 | // Apply comma grouping for thousands. 110 | var d3_format_group = d3_identity; 111 | if (d3_format_grouping) { 112 | var d3_format_groupingLength = d3_format_grouping.length; 113 | d3_format_group = function(value) { 114 | var i = value.lastIndexOf("."), 115 | f = i >= 0 ? "." + value.substring(i + 1) : (i = value.length, ""), 116 | t = [], 117 | j = 0, 118 | g = d3_format_grouping[0]; 119 | while (i > 0 && g > 0) { 120 | t.push(value.substring(i -= g, i + g)); 121 | g = d3_format_grouping[j = (j + 1) % d3_format_groupingLength]; 122 | } 123 | return t.reverse().join(d3_format_thousandsSeparator || "") + f; 124 | }; 125 | } 126 | -------------------------------------------------------------------------------- /src/core/selection-append.js: -------------------------------------------------------------------------------- 1 | // TODO append(node)? 2 | // TODO append(function)? 3 | 4 | /** 5 | * Gives IE a performance boost on creating elements from clone 6 | * rather than from scratch. 7 | */ 8 | var createElementFromCache = (function() { 9 | var cache = {}, 10 | fragmentDiv = document.createElement('div'); 11 | fragmentDiv.style.display = "none"; 12 | 13 | return function(ns, name) { 14 | // Special case for title, IE doesn't like it to be cloned 15 | // in the body 16 | if (name === 'title') { 17 | return document.createElement(name);; 18 | } 19 | 20 | if (fragmentDiv.parentNode !== document.body) { 21 | document.body.appendChild(fragmentDiv); 22 | } 23 | 24 | if (cache[name] === undefined) { 25 | cache[name] = document.createElement(name); 26 | } 27 | 28 | fragmentDiv.innerHTML = cache[name].outerHTML; 29 | var clone = fragmentDiv.firstChild; 30 | fragmentDiv.removeChild(clone); 31 | return clone; 32 | }; 33 | }()); 34 | 35 | 36 | d3_selectionPrototype.append = function(name) { 37 | name = d3.ns.qualify(name); 38 | 39 | function append() { 40 | if (name.local === 'svg') return appendRaphael(this); 41 | 42 | return this.appendChild(createElementFromCache(this.namespaceURI, name)); 43 | } 44 | 45 | function appendNS() { 46 | if (name.local === 'svg') return appendRaphael(this); 47 | 48 | return this.appendChild(createElementFromCache(name.space, name.local)); 49 | } 50 | 51 | return this.select(name.local ? appendNS : append); 52 | }; 53 | -------------------------------------------------------------------------------- /src/core/selection-classed.js: -------------------------------------------------------------------------------- 1 | d3_selectionPrototype.classed = function(name, value) { 2 | if (arguments.length < 2) { 3 | 4 | // For classed(string), return true only if the first node has the specified 5 | // class or classes. Note that even if the browser supports DOMTokenList, it 6 | // probably doesn't support it on SVG elements (which can be animated). 7 | if (typeof name === "string") { 8 | var node = this.node(), 9 | n = (name = name.trim().split(/^|\s+/g)).length, 10 | i = -1; 11 | if (value = node.classList) { 12 | while (++i < n) if (!value.contains(name[i])) return false; 13 | } else { 14 | value = node.getAttribute('class') || ''; 15 | if (value.baseVal != null) value = value.baseVal; 16 | while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false; 17 | } 18 | return true; 19 | } 20 | 21 | // For classed(object), the object specifies the names of classes to add or 22 | // remove. The values may be functions that are evaluated for each element. 23 | for (value in name) this.each(d3_selection_classed(value, name[value])); 24 | return this; 25 | } 26 | 27 | // Otherwise, both a name and a value are specified, and are handled as below. 28 | return this.each(d3_selection_classed(name, value)); 29 | }; 30 | 31 | function d3_selection_classedRe(name) { 32 | return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g"); 33 | } 34 | 35 | // Multiple class names are allowed (e.g., "foo bar"). 36 | function d3_selection_classed(name, value) { 37 | name = name.trim().split(/\s+/).map(d3_selection_classedName); 38 | var n = name.length; 39 | 40 | function classedConstant() { 41 | var i = -1; 42 | while (++i < n) name[i](this, value); 43 | } 44 | 45 | // When the value is a function, the function is still evaluated only once per 46 | // element even if there are multiple class names. 47 | function classedFunction() { 48 | var i = -1, x = value.apply(this, arguments); 49 | while (++i < n) name[i](this, x); 50 | } 51 | 52 | return typeof value === "function" 53 | ? classedFunction 54 | : classedConstant; 55 | } 56 | 57 | function d3_selection_classedName(name) { 58 | var re = d3_selection_classedRe(name); 59 | return function(node, value) { 60 | if (c = node.classList) return value ? c.add(name) : c.remove(name); 61 | var c = node.getAttribute('class') || '', 62 | cb = c.baseVal != null, 63 | cv = cb ? c.baseVal : c; 64 | if (value) { 65 | re.lastIndex = 0; 66 | if (!re.test(cv)) { 67 | cv = d3_collapse(cv + " " + name); 68 | if (cb) c.baseVal = cv; 69 | else node.setAttribute('class', cv); 70 | } 71 | } else if (cv) { 72 | cv = d3_collapse(cv.replace(re, " ")); 73 | if (cb) c.baseVal = cv; 74 | else node.setAttribute('class', cv); 75 | } 76 | }; 77 | } 78 | -------------------------------------------------------------------------------- /src/core/selection-on.js: -------------------------------------------------------------------------------- 1 | d3_selectionPrototype.on = function(type, listener, capture) { 2 | var n = arguments.length; 3 | if (n < 3) { 4 | 5 | // For on(object) or on(object, boolean), the object specifies the event 6 | // types and listeners to add or remove. The optional boolean specifies 7 | // whether the listener captures events. 8 | if (typeof type !== "string") { 9 | if (n < 2) listener = false; 10 | for (capture in type) this.each(d3_selection_on(capture, type[capture], listener)); 11 | return this; 12 | } 13 | 14 | // For on(string), return the listener for the first node. 15 | if (n < 2) return (n = this.node()["__on" + type]) && n._; 16 | 17 | // For on(string, function), use the default capture. 18 | capture = false; 19 | } 20 | 21 | // Otherwise, a type, listener and capture are specified, and handled as below. 22 | return this.each(d3_selection_on(type, listener, capture)); 23 | }; 24 | 25 | function d3_selection_on(type, listener, capture) { 26 | var name = "__on" + type, i = type.indexOf("."); 27 | if (i > 0) type = type.substring(0, i); 28 | 29 | function onRemove() { 30 | var wrapper = this[name]; 31 | if (wrapper) { 32 | if (this.removeEventListener) { 33 | this.removeEventListener(type, wrapper, wrapper.$); 34 | } else { 35 | this.detachEvent("on" + type, wrapper); 36 | } 37 | delete this[name]; 38 | } 39 | } 40 | 41 | function onAdd() { 42 | var node = this, 43 | args = d3_array(arguments); 44 | 45 | onRemove.call(this); 46 | if (this.addEventListener) { 47 | this.addEventListener(type, this[name] = wrapper, wrapper.$ = capture); 48 | } else { 49 | this.attachEvent("on" + type, this[name] = wrapper); 50 | } 51 | wrapper._ = listener; 52 | 53 | function wrapper(e) { 54 | var o = d3.event; // Events can be reentrant (e.g., focus). 55 | d3.event = e; 56 | args[0] = node.__data__; 57 | try { 58 | listener.apply(node, args); 59 | } finally { 60 | d3.event = o; 61 | } 62 | } 63 | } 64 | 65 | return listener ? onAdd : onRemove; 66 | } 67 | -------------------------------------------------------------------------------- /src/core/selection-style.js: -------------------------------------------------------------------------------- 1 | // Returns an IE-style attribute name from a CSS property name. 2 | function _convertPropertyToIEAttribute(name) { 3 | var i = 1, ar = name.split('-'), len = ar.length; 4 | for (; i < len; i++) { 5 | ar[i] = ar[i].substring(0,1).toUpperCase() + ar[i].substring(1); 6 | } 7 | return ar.join(''); 8 | } 9 | 10 | d3_selectionPrototype.style = function(name, value, priority) { 11 | var n = arguments.length; 12 | if (n < 3) { 13 | 14 | // For style(object) or style(object, string), the object specifies the 15 | // names and values of the attributes to set or remove. The values may be 16 | // functions that are evaluated for each element. The optional string 17 | // specifies the priority. 18 | if (typeof name !== "string") { 19 | if (n < 2) value = ""; 20 | for (priority in name) this.each(d3_selection_style(priority, name[priority], value)); 21 | return this; 22 | } 23 | 24 | // For style(string), return the computed style value for the first node. 25 | if (n < 2) { 26 | if (this.node() && this.node().paper) { 27 | return this.node().raphaelNode.attr(name); 28 | } else { 29 | return window.getComputedStylePropertyValue(this.node(), name); 30 | } 31 | } 32 | 33 | // For style(string, string) or style(string, function), use the default 34 | // priority. The priority is ignored for style(string, null). 35 | priority = ""; 36 | } 37 | 38 | // Otherwise, a name, value and priority are specified, and handled as below. 39 | return this.each(d3_selection_style(name, value, priority)); 40 | }; 41 | 42 | function d3_selection_style(name, value, priority) { 43 | 44 | // For style(name, null) or style(name, null, priority), remove the style 45 | // property with the specified name. The priority is ignored. 46 | function styleNull() { 47 | if (this.paper) { 48 | this.removeStyleProperty(name); 49 | } else { 50 | if (this.style.removeProperty) { 51 | this.style.removeProperty(name); 52 | } else { 53 | this.style.removeAttribute(name); 54 | } 55 | } 56 | } 57 | 58 | // For style(name, string) or style(name, string, priority), set the style 59 | // property with the specified name, using the specified priority. 60 | function styleConstant() { 61 | if (this.paper) { 62 | this.setStyleProperty(name, value); 63 | } else { 64 | if (this.style.setProperty) { 65 | this.style.setProperty(name, value, priority); 66 | } else { 67 | this.style[name] = value; 68 | } 69 | } 70 | } 71 | 72 | // For style(name, function) or style(name, function, priority), evaluate the 73 | // function for each element, and set or remove the style property as 74 | // appropriate. When setting, use the specified priority. 75 | function styleFunction() { 76 | var x = value.apply(this, arguments); 77 | if (x == null) { 78 | if (this.paper) { 79 | this.removeStyleProperty(name); 80 | } else { 81 | if (this.style.removeProperty) { 82 | this.style.removeProperty(name); 83 | } else { 84 | this.style.removeAttribute(name); 85 | } 86 | } 87 | } else { 88 | if (this.paper) { 89 | this.setStyleProperty(name, x); 90 | } else { 91 | if (this.style.setProperty) { 92 | this.style.setProperty(name, x, priority); 93 | } else { 94 | this.style[name] = x; 95 | } 96 | } 97 | } 98 | } 99 | 100 | return value == null 101 | ? styleNull : (typeof value === "function" 102 | ? styleFunction : styleConstant); 103 | } 104 | -------------------------------------------------------------------------------- /src/core/selection-text.js: -------------------------------------------------------------------------------- 1 | d3_selectionPrototype.text = function(value) { 2 | 3 | // For raphael elements get/set text through paper. 4 | if (this.node() && this.node().paper) { 5 | return arguments.length < 1 6 | ? this.node().getAttribute('text') : this.each(typeof value === "function" 7 | ? function() { var v = value.apply(this, arguments); this.setAttribute('text', v == null ? "" : v); } : value == null 8 | ? function() { this.setAttribute('text', ''); } 9 | : function() { this.setAttribute('text', value); }); 10 | } 11 | 12 | // Replaced instances of "textContent" to "innerText", since textContent isn't supported in IE 7/8. 13 | return arguments.length < 1 14 | ? this.node().innerText : this.each(typeof value === "function" 15 | ? function() { var v = value.apply(this, arguments); this.innerText = v == null ? "" : v; } : value == null 16 | ? function() { this.innerText = ""; } 17 | : function() { this.innerText = value; }); 18 | }; 19 | -------------------------------------------------------------------------------- /src/core/selection.js: -------------------------------------------------------------------------------- 1 | function d3_selection(groups) { 2 | d3_arraySubclass(groups, d3_selectionPrototype); 3 | return groups; 4 | } 5 | 6 | var d3_selectRoot = document.documentElement, 7 | d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, 8 | d3_selectMatches = Sizzle.matchesSelector; 9 | 10 | 11 | var d3_select = function(s, n) { 12 | // If the selection is on a raphael element, 13 | // set the context to its shadowDom node 14 | if (n.domNode) { 15 | n = n.domNode; 16 | } 17 | 18 | var node = Sizzle(s, n)[0] || null; 19 | // If the match is a R2D3 element, return the 20 | // Raphael Element 21 | return node && (node.r2d3 || node); 22 | }; 23 | 24 | 25 | var d3_selectAll = function(s, n) { 26 | // If the selection is on a raphael element, 27 | // set the context to its shadowDom node 28 | if (n.domNode) { 29 | n = n.domNode; 30 | } 31 | 32 | var nodes = Sizzle.uniqueSort(Sizzle(s, n)), 33 | matches = []; 34 | 35 | for (var i=0; i 3 && respond(); }; 23 | 24 | function respond() { 25 | var s = request.status; 26 | !s && request.responseText || s >= 200 && s < 300 || s === 304 27 | ? dispatch.load.call(xhr, response.call(xhr, request)) 28 | : dispatch.error.call(xhr, request); 29 | } 30 | 31 | /* IE Doesn't support this 32 | request.onprogress = function(event) { 33 | var o = d3.event; 34 | d3.event = event; 35 | try { dispatch.progress.call(xhr, request); } 36 | finally { d3.event = o; } 37 | }; 38 | */ 39 | 40 | xhr.header = function(name, value) { 41 | name = (name + "").toLowerCase(); 42 | if (arguments.length < 2) return headers[name]; 43 | if (value == null) delete headers[name]; 44 | else headers[name] = value + ""; 45 | return xhr; 46 | }; 47 | 48 | // If mimeType is non-null and no Accept header is set, a default is used. 49 | xhr.mimeType = function(value) { 50 | if (!arguments.length) return mimeType; 51 | mimeType = value == null ? null : value + ""; 52 | return xhr; 53 | }; 54 | 55 | // Specify how to convert the response content to a specific type; 56 | // changes the callback value on "load" events. 57 | xhr.response = function(value) { 58 | response = value; 59 | return xhr; 60 | }; 61 | 62 | // Convenience methods. 63 | ["get", "post"].forEach(function(method) { 64 | xhr[method] = function() { 65 | return xhr.send.apply(xhr, [method].concat(d3_array(arguments))); 66 | }; 67 | }); 68 | 69 | // If callback is non-null, it will be used for error and load events. 70 | xhr.send = function(method, data, callback) { 71 | if (arguments.length === 2 && typeof data === "function") callback = data, data = null; 72 | request.open(method, url, true); 73 | if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*"; 74 | for (var name in headers) request.setRequestHeader(name, headers[name]); 75 | if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType); 76 | if (callback != null) xhr.on("error", callback).on("load", function(request) { callback(null, request); }); 77 | request.send(data == null ? null : data); 78 | return xhr; 79 | }; 80 | 81 | xhr.abort = function() { 82 | request.abort(); 83 | return xhr; 84 | }; 85 | 86 | d3.rebind(xhr, dispatch, "on"); 87 | 88 | if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, mimeType = null; 89 | return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback)); 90 | }; 91 | 92 | function d3_xhr_fixCallback(callback) { 93 | return callback.length === 1 94 | ? function(error, request) { callback(error == null ? request : null); } 95 | : callback; 96 | } 97 | 98 | // Solution from http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript 99 | function _r2d3AddParameter(url, parameterName, parameterValue, atStart/*Add param before others*/){ 100 | replaceDuplicates = true; 101 | if(url.indexOf('#') > 0){ 102 | var cl = url.indexOf('#'); 103 | urlhash = url.substring(url.indexOf('#'),url.length); 104 | } else { 105 | urlhash = ''; 106 | cl = url.length; 107 | } 108 | sourceUrl = url.substring(0,cl); 109 | 110 | var urlParts = sourceUrl.split("?"); 111 | var newQueryString = ""; 112 | 113 | if (urlParts.length > 1) 114 | { 115 | var parameters = urlParts[1].split("&"); 116 | for (var i=0; (i < parameters.length); i++) 117 | { 118 | var parameterParts = parameters[i].split("="); 119 | if (!(replaceDuplicates && parameterParts[0] == parameterName)) 120 | { 121 | if (newQueryString == "") 122 | newQueryString = "?"; 123 | else 124 | newQueryString += "&"; 125 | newQueryString += parameterParts[0] + "=" + (parameterParts[1]?parameterParts[1]:''); 126 | } 127 | } 128 | } 129 | if (newQueryString == "") 130 | newQueryString = "?"; 131 | 132 | if(atStart){ 133 | newQueryString = '?'+ parameterName + "=" + parameterValue + (newQueryString.length>1?'&'+newQueryString.substring(1):''); 134 | } else { 135 | if (newQueryString !== "" && newQueryString != '?') 136 | newQueryString += "&"; 137 | newQueryString += parameterName + "=" + (parameterValue?parameterValue:''); 138 | } 139 | return urlParts[0] + newQueryString + urlhash; 140 | }; 141 | -------------------------------------------------------------------------------- /src/raphael/element.js: -------------------------------------------------------------------------------- 1 | /** 2 | * element.js 3 | * 4 | * Wrapper object containing the SVG DOM node and corresponding Raphael element. This is the object that D3 interacts with 5 | * build the data visualizations. The DOM node is used as a hook for queries and styling via CSS and the style element. The attributes 6 | * are then taken from the DOM node and mapped onto Raphael to be drawn on the canvas. 7 | */ 8 | function R2D3Element(paper, node) { 9 | // Raphael Paper object 10 | this.paper = paper; 11 | 12 | // The SVG DOM node representing the Raphael element 13 | // This is used as a hook for querying and styling 14 | this.domNode = node; 15 | 16 | // Reference back to the R2D3 element wrapper 17 | this.domNode.r2d3 = this; 18 | 19 | // Reference to the rendered Raphael element 20 | // Initialization is delayed until all required props 21 | // are set 22 | this.raphaelNode = null; 23 | 24 | // Reference to the parent R2D3 element 25 | this.parentNode = node.parentNode.r2d3; 26 | 27 | switch(node.tagName) { 28 | case 'polyline': 29 | case 'polygon': 30 | case 'path': 31 | this.raphaelNode = paper.path('Z'); 32 | break; 33 | case 'rect': 34 | this.raphaelNode = paper.rect(0, 0, 0, 0); 35 | break; 36 | case 'circle': 37 | this.raphaelNode = paper.circle(0, 0, 0); 38 | break; 39 | case 'g': 40 | this.isGroup = true; 41 | break; 42 | case 'line': 43 | this.raphaelNode = paper.path('Z'); 44 | break; 45 | case 'img': 46 | case 'image': 47 | this.raphaelNode = paper.image('#', 0, 0, 0, 0); 48 | break; 49 | case 'text': 50 | this.isText = true; 51 | this.raphaelNode = paper.text(0, 0, ''); 52 | break; 53 | case 'ellipse': 54 | this.raphaelNode = paper.ellipse(0, 0, 0, 0); 55 | break; 56 | case 'svg': 57 | this.isSVG = true; 58 | } 59 | 60 | this.updateProperty('transform'); 61 | this.updateCurrentStyle(); 62 | } 63 | 64 | 65 | R2D3Element.prototype._linePath = function() { 66 | var x1 = this.domNode.getAttribute('x1') || 0, 67 | x2 = this.domNode.getAttribute('x2') || 0, 68 | y1 = this.domNode.getAttribute('y1') || 0, 69 | y2 = this.domNode.getAttribute('y2') || 0; 70 | 71 | return ['M', x1, ' ', y1, 'L', x2, ' ', y2, 'Z'].join(''); 72 | }; 73 | 74 | 75 | R2D3Element.prototype._strokeDashArray = function(dashValue) { 76 | // There values were derived from raphael's source 77 | // https://github.com/DmitryBaranovskiy/raphael/blob/master/dev/raphael.svg.js#L282 78 | var dasharray = { 79 | '3 1': '-', 80 | '1 1': '.', 81 | '3 1 1 1': '-.', 82 | '3 1 1 1 1 1': '-..', 83 | '1 3': '. ', 84 | '4 3': '- ', 85 | '8 3': '--', 86 | '4 3 1 3': '- .', 87 | '8 3 1 3': '--.', 88 | '8 3 1 3 1 3': '--..' 89 | }; 90 | 91 | // Get dashValue from domNode if it was not passed in 92 | if (dashValue === undefined) { 93 | dashValue = this.domNode.getAttribute('stroke-dasharray'); 94 | } 95 | 96 | dashValue = (dashValue) ? dashValue.match(/\d+/g) : ''; 97 | 98 | if (dashValue.length) { 99 | dashValue = dashValue.join(' '); 100 | } 101 | 102 | return dasharray[dashValue] || ''; 103 | }; 104 | 105 | 106 | /** 107 | * Updates an individual property. If the classname changes, all restyle 108 | * of the element will be triggered. 109 | */ 110 | R2D3Element.prototype.updateProperty = function(propertyName) { 111 | switch(propertyName) { 112 | // transform, traverse up DOM to determine nested tranforms 113 | case 'transform': 114 | var node = this.domNode; 115 | var transforms = new Array(5); 116 | 117 | // Groups trigger transforms on all child raphael nodes 118 | // as they don't have a raphael reference themselves 119 | if (this.isGroup) { 120 | var childNodes = node.childNodes, 121 | length = childNodes.length, 122 | i=0; 123 | 124 | for (i; i < length; i++) { 125 | if (childNodes[i].r2d3) { 126 | childNodes[i].r2d3.updateProperty('transform'); 127 | } 128 | } 129 | 130 | // Raphael nodes search up the DOM tree to get all transforms affecting them 131 | } else if (this.raphaelNode) { 132 | transform = node.getAttribute('transform'); 133 | if (transform) { 134 | transforms.push(_map_svg_transform_to_raphael(transform)); 135 | } 136 | 137 | while(node.parentNode && node.parentNode.r2d3) { 138 | node = node.parentNode; 139 | transform = node.getAttribute('transform'); 140 | if (transform) { 141 | transforms.push(_map_svg_transform_to_raphael(transform)); 142 | } 143 | } 144 | this.raphaelNode.transform(transforms.reverse().join('')); 145 | } 146 | break; 147 | 148 | // Class change, update all the styles 149 | case 'class': 150 | this.updateCurrentStyle(); 151 | break; 152 | 153 | // Update SVG height 154 | case 'height': 155 | var width = this.domNode.getAttribute('width') || 0, 156 | height = this.domNode.getAttribute('height') || 0; 157 | if (this.domNode.tagName === 'svg') { 158 | this.paper.setSize(width, height); 159 | } else { 160 | this.raphaelNode.attr('height', height); 161 | } 162 | break; 163 | 164 | // Update SVG width 165 | case 'width': 166 | var width = this.domNode.getAttribute('width') || 0, 167 | height = this.domNode.getAttribute('height') || 0; 168 | if (this.domNode.tagName === 'svg') { 169 | this.paper.setSize(width, height); 170 | } else { 171 | this.raphaelNode.attr('width', width); 172 | } 173 | break; 174 | 175 | case 'href': 176 | this.raphaelNode.attr('src', this.domNode.getAttribute('href')); 177 | break; 178 | 179 | // Polylines/Polygons map points to raphael path attribute, with a little help 180 | case 'points': 181 | // see http://stackoverflow.com/a/9709153/433558 182 | var path = ['M', this.domNode.getAttribute('points')]; 183 | if (this.domNode.tagName === 'polygon') { 184 | path.push('Z'); 185 | } 186 | this.raphaelNode.attr('path', path.join('')); 187 | break; 188 | 189 | // Paths map d to raphael path attribute 190 | case 'd': 191 | this.raphaelNode.attr('path', this.domNode.getAttribute('d')); 192 | break; 193 | 194 | // Line Attributes need to rebuild path representing line 195 | case 'x1': 196 | this.raphaelNode.attr('path', this._linePath()); 197 | break; 198 | case 'x2': 199 | this.raphaelNode.attr('path', this._linePath()); 200 | break; 201 | case 'y1': 202 | this.raphaelNode.attr('path', this._linePath()); 203 | break; 204 | case 'y2': 205 | this.raphaelNode.attr('path', this._linePath()); 206 | break; 207 | case 'stroke-dasharray': 208 | this.raphaelNode.attr('stroke-dasharray', this._strokeDashArray()); 209 | break; 210 | 211 | // Just apply the attribute 212 | default: 213 | if (this.raphaelNode) { 214 | var value = this.domNode.style.getAttribute(propertyName) 215 | || this.domNode.currentStyle.getAttribute(propertyName) 216 | || this.domNode.getAttribute(propertyName); 217 | this.raphaelNode.attr(propertyName, value); 218 | } 219 | } 220 | }; 221 | 222 | /** 223 | * Looks up the current style applied by CSS, inline styles and attributes and 224 | * applies them to the raphael object. If not styles are found, the SVG defaults 225 | * are used for each property. 226 | */ 227 | R2D3Element.prototype.updateCurrentStyle = function(name) { 228 | // convert a name from "css-style" to "cssStyle" 229 | function undash(name) { 230 | return name.replace(/-\w/, function (match) { 231 | return match.charAt(1).toUpperCase(); 232 | }); 233 | } 234 | 235 | function getValue(el, name, currentStyle) { 236 | return el.style.getAttribute(name) 237 | || currentStyle.getAttribute(name) 238 | || el.getAttribute(name) 239 | || currentStyle.getAttribute(undash(name)); 240 | } 241 | 242 | var currentStyle = this.domNode.currentStyle, 243 | el = this.domNode; 244 | 245 | // SVG can have the size set via CSS 246 | if (this.isSVG) { 247 | var height = getValue(el, 'height', currentStyle), 248 | width = getValue(el, 'width', currentStyle); 249 | 250 | // If the browser returns auto, default to using the attribute height/width 251 | height = height === 'auto' ? el.getAttribute('height') : height; 252 | width = width === 'auto' ? el.getAttribute('width') : width; 253 | 254 | this.paper.setSize(width || 0, height || 0); 255 | } 256 | 257 | // Groups don't have raphael nodes 258 | if (!this.raphaelNode) { 259 | return; 260 | } 261 | 262 | var attrs = { 263 | 'cursor': getValue(el, 'cursor', currentStyle), 264 | 'fill': getValue(el, 'fill', currentStyle) || 'black', 265 | 'fill-opacity': getValue(el, 'fill-opacity', currentStyle) || 1, 266 | 'opacity': getValue(el, 'opacity', currentStyle) || 1, 267 | 'stroke': getValue(el, 'stroke', currentStyle) || 'none', 268 | 'stroke-dasharray': this._strokeDashArray(getValue(el, 'stroke-dasharray', currentStyle)), 269 | 'stroke-linecap': getValue(el, 'stroke-linecap', currentStyle)|| 'butt', 270 | 'stroke-linejoin': getValue(el, 'stroke-linejoin', currentStyle) || 'miter', 271 | 'stroke-miterlimit': getValue(el, 'stroke-miterlimit', currentStyle) || 4, 272 | 'stroke-opacity': getValue(el, 'stroke-opacity', currentStyle) || 1, 273 | 'stroke-width': getValue(el, 'stroke-width', currentStyle) || 1, 274 | }; 275 | 276 | if (this.isText) { 277 | attrs['font'] = getValue(el, 'font', currentStyle); 278 | attrs['font-family'] = getValue(el, 'font-family', currentStyle); 279 | attrs['font-size'] = getValue(el, 'font-size', currentStyle); 280 | attrs['font-weight'] = getValue(el, 'font-weight', currentStyle); 281 | attrs['text-anchor'] = getValue(el, 'text-anchor', currentStyle) || 'start'; 282 | } 283 | 284 | if (name && attrs[name] === undefined) { 285 | attrs[name] = el.getAttribute(name); 286 | } 287 | 288 | if (this.isImage) { 289 | // Images wont render in raphael if fill set 290 | delete attrs['fill']; 291 | } 292 | 293 | this.raphaelNode.attr(attrs); 294 | }; 295 | 296 | R2D3Element.prototype.setStyleProperty = function(name, value) { 297 | this.domNode.style.setAttribute(name, value); 298 | this.updateProperty(name); 299 | }; 300 | 301 | R2D3Element.prototype.getStyleProperty = function(name) { 302 | return this.domNode.style.getAttribute(name); 303 | }; 304 | 305 | R2D3Element.prototype.removeStyleProperty = function(name) { 306 | this.domNode.style.removeAttribute(name); 307 | this.updateProperty(name); 308 | }; 309 | 310 | R2D3Element.prototype.getCurrentStyle = function() { 311 | return this.domNode.currentStyle; 312 | }; 313 | 314 | R2D3Element.prototype.removeRaphaelNode = function(removeChildren) { 315 | 316 | if (removeChildren === true) { 317 | var children = this.domNode.children, 318 | length = children.length, 319 | i = 0; 320 | 321 | for (i; i < length; i++) { 322 | var node = children[i]; 323 | if (node.r2d3) { 324 | node.r2d3.removeRaphaelNode(removeChildren); 325 | } 326 | } 327 | } 328 | 329 | this.domNode.r2d3 = null; 330 | if (this.raphaelNode) { 331 | this.raphaelNode.remove(); 332 | } 333 | }; 334 | 335 | 336 | var _raphael_transform_map = {}; 337 | function _map_svg_transform_to_raphael(transform) { 338 | if (transform === null || transform === undefined || transform === '') { 339 | return ''; 340 | } 341 | 342 | if (_raphael_transform_map[transform] === undefined) { 343 | _raphael_transform_map[transform] = transform.replace(/translate\(/gi, "t") 344 | .replace(/rotate\(/gi, "r") 345 | .replace(/scale\(/gi, "s") 346 | .replace(/[)]/g, ""); 347 | } 348 | return _raphael_transform_map[transform]; 349 | } 350 | 351 | 352 | window.transformMap = _raphael_transform_map; 353 | 354 | 355 | //===================================== 356 | // DOM APIs 357 | //===================================== 358 | 359 | 360 | 361 | R2D3Element.prototype.appendChild = function(node) { 362 | if (node.r2d3) { 363 | // TODO: Reposition raphael paper node 364 | return node.r2d3; 365 | } 366 | this.domNode.appendChild(node); 367 | return new R2D3Element(this.paper, node); 368 | }; 369 | 370 | 371 | R2D3Element.prototype.removeChild = function(node) { 372 | node.removeRaphaelNode(true); 373 | this.domNode.removeChild(node.domNode); 374 | if (!this.domNode){ alert('oh shit'); } 375 | return node; 376 | }; 377 | 378 | 379 | R2D3Element.prototype.addEventListener = function(type, listener) { 380 | 381 | var self = this; 382 | if (!listener._callback) { 383 | listener._callback = function(e) { 384 | // Ensure the listener is invoked with 'this' 385 | // as the raphael node and not the window 386 | listener.apply(self, [e]); 387 | }; 388 | } 389 | 390 | // Groups don't exist, bind the events to the children directly 391 | if (this.isGroup) { 392 | for (var i=0; i < this.domNode.childNodes; i++) { 393 | this.domNode.childNodes[i].r2d3.addEventListener(type, listener); 394 | } 395 | 396 | // Bind directly to the raphael node 397 | } else { 398 | if (this.isSVG) { 399 | this.domNode.parentNode.attachEvent("on" + type, listener._callback); 400 | } else { 401 | this.raphaelNode.node.attachEvent("on" + type, listener._callback); 402 | } 403 | } 404 | }; 405 | 406 | 407 | R2D3Element.prototype.removeEventListener = function(type, listener) { 408 | // Groups don't exist, bind the events to the children directly 409 | if (this.isGroup) { 410 | for (var i=0; i < this.domNode.childNodes; i++) { 411 | this.domNode.childNodes[i].r2d3.removeEventListener(type, listener); 412 | } 413 | 414 | // Bind directly to the raphael node 415 | } else { 416 | if (this.isSVG) { 417 | this.domNode.parentNode.detachEvent("on" + type, listener._callback || listener); 418 | } else { 419 | this.raphaelNode.node.detachEvent("on" + type, listener._callback || listener); 420 | } 421 | } 422 | }; 423 | 424 | 425 | R2D3Element.prototype.setAttribute = function(name, value) { 426 | this.domNode.setAttribute(name, value); 427 | this.updateProperty(name); 428 | }; 429 | 430 | 431 | R2D3Element.prototype.insertBefore = function(node, before) { 432 | 433 | var r2D3Element, 434 | domNode, 435 | beforeDomNode = before ? before.domNode : before; 436 | 437 | // Node is a R2D3 Element 438 | if (node.paper) { 439 | domNode = node.domNode; 440 | 441 | // Node is a DOM node 442 | } else { 443 | domNode = node; 444 | } 445 | 446 | // Put the DOM in the correct order 447 | this.domNode.insertBefore(domNode, beforeDomNode); 448 | 449 | // Create R2D3 element if it doesn't exist after node appended to DOM 450 | r2D3Element = domNode.r2d3 || new R2D3Element(this.paper, domNode); 451 | 452 | 453 | // Put the raphael objects in the correct order 454 | if (before && r2D3Element.domNode.tagName !== 'g') { 455 | r2D3Element.raphaelNode.insertBefore(before.raphaelNode); 456 | } 457 | 458 | return r2D3Element; 459 | }; 460 | 461 | 462 | R2D3Element.prototype.setAttributeNS = function(namespace, name, value) { 463 | this.setAttribute(name, value); 464 | }; 465 | 466 | 467 | R2D3Element.prototype.removeAttribute = function(name) { 468 | this.domNode.removeAttribute(name); 469 | this.updateProperty(name); 470 | }; 471 | 472 | 473 | R2D3Element.prototype.getAttribute = function(name) { 474 | return this.domNode.getAttribute(name); 475 | }; 476 | 477 | R2D3Element.prototype.getBBox = function() { 478 | if (this.raphaelNode) { 479 | return this.raphaelNode.getBBox(); 480 | } 481 | 482 | return { x: 0, y: 0, width: 0, height: 0 }; 483 | }; 484 | -------------------------------------------------------------------------------- /src/raphael/raphael.js: -------------------------------------------------------------------------------- 1 | // getComputedStyle shim: http://johnkpaul.tumblr.com/post/17380987688/shim-for-javascript 2 | (function(window, undefined){ 3 | window.getComputedStylePropertyValue = function(el,cssProperty){ 4 | el = el.domNode || el; 5 | if(!window.getComputedStyle){ 6 | if(document.defaultView && document.defaultView.getComputedStyle){ 7 | return document.defaultView.getComputedStyle.getPropertyValue(cssProperty); 8 | } else { 9 | var camelCasedCssProperty = getCamelCasedCssProperty(cssProperty); 10 | if(el.currentStyle){ 11 | return el.currentStyle[camelCasedCssProperty]; 12 | } else { 13 | return el.style[camelCasedCssProperty]; 14 | } 15 | } 16 | } else{ 17 | return window.getComputedStyle(el).getPropertyValue(cssProperty); 18 | } 19 | } 20 | 21 | function getCamelCasedCssProperty(cssProperty){ 22 | return cssProperty.replace(/-([a-z])/g, function (g) { return g.charAt(1).toUpperCase() }); 23 | } 24 | 25 | })(this); 26 | 27 | 28 | 29 | // Register SVG elements with IE so they can be styled 30 | (function() { 31 | var svgElements = 'circle ellipse line polygon polyline rect g svg image path text'.split(' '); 32 | 33 | for (var i=0; i< svgElements.length; i++) { 34 | document.createElement(svgElements[i]); 35 | } 36 | })(); 37 | 38 | 39 | function appendRaphael(parent) { 40 | var paper = Raphael(parent, 0, 0), 41 | svg = document.createElement('svg'); 42 | 43 | // Create the DOM node representing the SVG docuemnt 44 | // This will enable us to pull in styles from the stylesheets using 45 | // node.currentStyle 46 | svg.style.display = 'none'; 47 | parent.appendChild(svg); 48 | 49 | return new R2D3Element(paper, svg); 50 | } 51 | -------------------------------------------------------------------------------- /tests/core/append-tests.js: -------------------------------------------------------------------------------- 1 | module( "Selection Append", { 2 | teardown: function() { 3 | document.getElementById('append').innerHTML = ''; 4 | } 5 | }); 6 | 7 | 8 | test( "SVG", function() { 9 | var svg = d3.select('#append').append('svg'); 10 | ok(svg.node().paper, "Raphael paper appended to DOM" ); 11 | svg.remove(); 12 | }); 13 | 14 | test('image', function() { 15 | var svg = d3.select('#append').append('svg'); 16 | var el = svg.append('image'); 17 | ok(el.node().domNode.tagName, 'image'); 18 | }); 19 | 20 | test('line', function() { 21 | var svg = d3.select('#append').append('svg'); 22 | var el = svg.append('line'); 23 | ok(el.node().domNode.tagName, 'line'); 24 | }); 25 | 26 | test('path', function() { 27 | var svg = d3.select('#append').append('svg'); 28 | var el = svg.append('path'); 29 | ok(el.node().domNode.tagName, 'path'); 30 | }); 31 | 32 | test('polygon', function() { 33 | var svg = d3.select('#append').append('svg'); 34 | var el = svg.append('polygon'); 35 | ok(el.node().domNode.tagName, 'polygon'); 36 | }); 37 | 38 | test('polyline', function() { 39 | var svg = d3.select('#append').append('svg'); 40 | var el = svg.append('polyline'); 41 | ok(el.node().domNode.tagName, 'polyline'); 42 | }); 43 | 44 | test('rect', function() { 45 | var svg = d3.select('#append').append('svg'); 46 | var el = svg.append('rect'); 47 | ok(el.node().domNode.tagName, 'rect'); 48 | }); 49 | 50 | test('circle', function() { 51 | var svg = d3.select('#append').append('svg'); 52 | var el = svg.append('circle'); 53 | ok(el.node().domNode.tagName, 'circle'); 54 | }); 55 | 56 | test('text', function() { 57 | var svg = d3.select('#append').append('svg'); 58 | var el = svg.append('text'); 59 | ok(el.node().domNode.tagName, 'text'); 60 | }); 61 | -------------------------------------------------------------------------------- /tests/core/attr-tests.js: -------------------------------------------------------------------------------- 1 | //================================ 2 | // Selection Tests 3 | module( "Selection Attributes", { 4 | teardown: function() { 5 | document.getElementById('attr').innerHTML = ''; 6 | } 7 | }); 8 | 9 | 10 | test( "path.d", function() { 11 | var svg = d3.select('#attr').append('svg'), 12 | path = "M0 0L10 10Z", 13 | el = svg.append('path'); 14 | 15 | el.attr('d', path); 16 | equal(el.attr('d'), path) 17 | }); 18 | 19 | test( "path.class", function() { 20 | var svg = d3.select('#attr').append('svg'), 21 | el = svg.append('path'); 22 | 23 | el.attr('class', 'foo'); 24 | equal(el.attr('class'), 'foo') 25 | }); 26 | 27 | test( "polygon.points", function() { 28 | var svg = d3.select('#attr').append('svg'), 29 | polygon = "0,0 0,10 10,10 10,0", 30 | el = svg.append('polygon'); 31 | 32 | el.attr('points', polygon); 33 | equal(el.attr('points'), polygon) 34 | }); 35 | 36 | test( "polygon.class", function() { 37 | var svg = d3.select('#attr').append('svg'), 38 | el = svg.append('polygon'); 39 | 40 | el.attr('class', 'foo'); 41 | equal(el.attr('class'), 'foo') 42 | }); 43 | 44 | test( "polyline.points", function() { 45 | var svg = d3.select('#attr').append('svg'), 46 | polyline = "0,0 0,10 10,10", 47 | el = svg.append('polyline'); 48 | 49 | el.attr('points', polyline); 50 | equal(el.attr('points'), polyline) 51 | }); 52 | 53 | test( "polyline.class", function() { 54 | var svg = d3.select('#attr').append('svg'), 55 | el = svg.append('polyline'); 56 | 57 | el.attr('class', 'foo'); 58 | equal(el.attr('class'), 'foo') 59 | }); 60 | 61 | test( "rect.fill", function() { 62 | var svg = d3.select('#attr').append('svg'), 63 | el = svg.append('rect'); 64 | 65 | el.attr('fill', 'red'); 66 | equal(el.attr('fill'), 'red') 67 | }); 68 | 69 | test( "rect.translate", function() { 70 | var svg = d3.select('#attr').append('svg'), 71 | el = svg.append('rect').attr({'x': 0, 'y': 0, 'width': 100, 'height': 100 }); 72 | 73 | el.attr('transform', 'translate(20,20)') 74 | equal(el.attr('transform'), 'translate(20,20)') 75 | }); 76 | //================================ 77 | // Dom Attribute Tests 78 | module("DOM id attribute", { 79 | teardown: function() { 80 | document.getElementById('attr').innerHTML = ''; 81 | } 82 | }); 83 | 84 | test('id', function() { 85 | var svg = d3.select('#attr').append('svg'), 86 | el = svg.append('text'); 87 | 88 | el.attr('id', 'foo'); 89 | equal(el.attr('id'), 'foo'); 90 | equal(d3.select('#foo').attr('id'), 'foo'); 91 | }); 92 | 93 | //================================ 94 | // Circle Tests 95 | module( "Circle Selection Attributes", { 96 | teardown: function() { 97 | document.getElementById('attr').innerHTML = ''; 98 | } 99 | }); 100 | 101 | test('circle.cx', function() { 102 | var svg = d3.select('#attr').append('svg'), 103 | el = svg.append('circle'); 104 | 105 | el.attr('cx', 10); 106 | equal(el.attr('cx'), 10) 107 | }); 108 | 109 | test('circle.cy', function() { 110 | var svg = d3.select('#attr').append('svg'), 111 | el = svg.append('circle'); 112 | 113 | el.attr('cy', 10); 114 | equal(el.attr('cy'), 10) 115 | }); 116 | 117 | test('circle.r', function() { 118 | var svg = d3.select('#attr').append('svg'), 119 | el = svg.append('circle'); 120 | 121 | el.attr('r', 2); 122 | equal(el.attr('r'), 2) 123 | }); 124 | 125 | //================================ 126 | // Rect Tests 127 | module( "Rect Selection Attributes", { 128 | teardown: function() { 129 | document.getElementById('attr').innerHTML = ''; 130 | } 131 | }); 132 | 133 | test('rect.x', function() { 134 | var svg = d3.select('#attr').append('svg'), 135 | el = svg.append('rect'); 136 | 137 | el.attr('x', 10); 138 | equal(el.attr('x'), 10) 139 | }); 140 | 141 | test('rect.y', function() { 142 | var svg = d3.select('#attr').append('svg'), 143 | el = svg.append('rect'); 144 | 145 | el.attr('y', 10); 146 | equal(el.attr('y'), 10) 147 | }); 148 | 149 | test('rect.width', function() { 150 | var svg = d3.select('#attr').append('svg'), 151 | el = svg.append('rect'); 152 | 153 | el.attr('width', 10); 154 | equal(el.attr('width'), 10) 155 | }); 156 | 157 | test('rect.height', function() { 158 | var svg = d3.select('#attr').append('svg'), 159 | el = svg.append('rect'); 160 | 161 | el.attr('height', 10); 162 | equal(el.attr('height'), 10) 163 | }); 164 | 165 | //================================ 166 | // Line Tests 167 | module( "Line Selection Attributes", { 168 | teardown: function() { 169 | document.getElementById('attr').innerHTML = ''; 170 | } 171 | }); 172 | 173 | test('line.x1', function() { 174 | var svg = d3.select('#attr').append('svg'), 175 | el = svg.append('line'); 176 | 177 | el.attr('x1', 10); 178 | equal(el.attr('x1'), 10) 179 | }); 180 | 181 | test('line.y1', function() { 182 | var svg = d3.select('#attr').append('svg'), 183 | el = svg.append('line'); 184 | 185 | el.attr('y1', 10); 186 | equal(el.attr('y1'), 10) 187 | }); 188 | 189 | test('line.x2', function() { 190 | var svg = d3.select('#attr').append('svg'), 191 | el = svg.append('line'); 192 | 193 | el.attr('x2', 10); 194 | equal(el.attr('x2'), 10) 195 | }); 196 | 197 | test('line.y2', function() { 198 | var svg = d3.select('#attr').append('svg'), 199 | el = svg.append('line'); 200 | 201 | el.attr('y2', 10); 202 | equal(el.attr('y2'), 10) 203 | }); 204 | -------------------------------------------------------------------------------- /tests/core/group-tests.js: -------------------------------------------------------------------------------- 1 | module( "Group", { 2 | teardown: function() { 3 | document.getElementById('group').innerHTML = ''; 4 | } 5 | }); 6 | 7 | 8 | test( "group select", function() { 9 | var svg = d3.select('#group').append('svg'), 10 | el = svg.append('g'); 11 | 12 | equal(svg.select('g').length, 1); 13 | }); 14 | 15 | test( "group transform before", function() { 16 | var svg = d3.select('#group').append('svg'), 17 | g = svg.append('g'); 18 | 19 | g.attr('transform', 'translate(10,10)'); 20 | 21 | var rect = g.append('rect').attr({ 'x': 0, 'y': 0, 'width': 1, 'height': 1 }); 22 | 23 | var bbox = rect.node().getBBox(); 24 | equal(bbox.x, 10) 25 | equal(bbox.y, 10) 26 | }); 27 | 28 | test( "group transform after", function() { 29 | var svg = d3.select('#group').append('svg'), 30 | g = svg.append('g'); 31 | 32 | var rect = g.append('rect').attr({ 'x': 0, 'y': 0, 'width': 1, 'height': 1 }); 33 | g.attr('transform', 'translate(10,10)'); 34 | 35 | var bbox = rect.node().getBBox(); 36 | equal(bbox.x, 10) 37 | equal(bbox.y, 10) 38 | }); 39 | 40 | test( "nested group transform before", function() { 41 | var svg = d3.select('#group').append('svg'), 42 | g = svg.append('g'), 43 | g2 = g.append('g'); 44 | 45 | g.attr('transform', 'translate(10,10)'); 46 | g2.attr('transform', 'translate(5,5)'); 47 | 48 | var rect = g2.append('rect').attr({ 'x': 0, 'y': 0, 'width': 1, 'height': 1 }); 49 | 50 | var bbox = rect.node().getBBox(); 51 | equal(bbox.x, 15) 52 | equal(bbox.y, 15) 53 | }); 54 | 55 | 56 | test( "nested group transform after", function() { 57 | var svg = d3.select('#group').append('svg'), 58 | g = svg.append('g'), 59 | g2 = g.append('g'); 60 | 61 | var rect = g2.append('rect').attr({ 'x': 0, 'y': 0, 'width': 1, 'height': 1 }); 62 | 63 | g.attr('transform', 'translate(10,10)'); 64 | g2.attr('transform', 'translate(5,5)'); 65 | 66 | 67 | var bbox = rect.node().getBBox(); 68 | equal(bbox.x, 15) 69 | equal(bbox.y, 15) 70 | }); 71 | 72 | test("insert on empty group", function() { 73 | var svg = d3.select('#group').append('svg'), 74 | g = svg.append('g'), 75 | rect = g.insert('rect', ':first-child'); 76 | 77 | equal(g.selectAll('rect').length, 1); 78 | }); 79 | 80 | test("insert on group with no matching elements", function() { 81 | var svg = d3.select('#group').append('svg'), 82 | g = svg.append('g'), 83 | rect = g.append('rect'), 84 | circle = g.insert('circle', 'path'); 85 | 86 | equal(g.selectAll('circle').length, 1); 87 | }); 88 | 89 | test('insert on group with matching element', function() { 90 | var svg = d3.select('#group').append('svg'), 91 | g = svg.append('g'), 92 | rect = g.append('rect'), 93 | circle = g.insert('circle', 'rect'); 94 | 95 | equal(g.selectAll('circle').length, 1); 96 | }); -------------------------------------------------------------------------------- /tests/core/selection-classed-tests.js: -------------------------------------------------------------------------------- 1 | //================================ 2 | // Selection Tests 3 | module( "Selection Classed", { 4 | teardown: function() { 5 | document.getElementById('selectionClassed').innerHTML = ''; 6 | } 7 | }); 8 | 9 | 10 | test( "add first class", function() { 11 | var svg = d3.select('#selectionClassed').append('svg'), 12 | path = "M0 0L10 10Z", 13 | el = svg.append('path'); 14 | 15 | el.classed('foo', true); 16 | equal(el.attr('class'), 'foo') 17 | }); 18 | 19 | 20 | test( "add class to existing", function() { 21 | var svg = d3.select('#selectionClassed').append('svg'), 22 | path = "M0 0L10 10Z", 23 | el = svg.append('path').attr('class', 'foo'); 24 | 25 | el.classed('bar', true); 26 | equal(el.attr('class'), 'foo bar') 27 | }); 28 | 29 | test( "add class to existing with function", function() { 30 | var svg = d3.select('#selectionClassed').append('svg'), 31 | path = "M0 0L10 10Z", 32 | el = svg.append('path').attr('class', 'foo'); 33 | 34 | el.classed('bar', function(){ return true; }); 35 | equal(el.attr('class'), 'foo bar') 36 | }); 37 | 38 | 39 | test( "remove class from existing", function() { 40 | var svg = d3.select('#selectionClassed').append('svg'), 41 | path = "M0 0L10 10Z", 42 | el = svg.append('path').attr('class', 'foo bar'); 43 | 44 | el.classed('bar', false); 45 | equal(el.attr('class'), 'foo') 46 | }); 47 | 48 | 49 | test( "remove class from existing with function", function() { 50 | var svg = d3.select('#selectionClassed').append('svg'), 51 | path = "M0 0L10 10Z", 52 | el = svg.append('path').attr('class', 'foo bar'); 53 | 54 | el.classed('bar', function(){ return false; }); 55 | equal(el.attr('class'), 'foo') 56 | }); 57 | -------------------------------------------------------------------------------- /tests/core/selection-remove-tests.js: -------------------------------------------------------------------------------- 1 | module( "Selection", { 2 | teardown: function() { 3 | document.getElementById('selectionRemove').innerHTML = ''; 4 | } 5 | }); 6 | 7 | 8 | test( "remove one", function() { 9 | var svg = d3.select('#selectionRemove').append('svg'), 10 | el = svg.append('rect'); 11 | 12 | el.remove(); 13 | equal(svg.selectAll('rect')[0].length, 0); 14 | }); 15 | 16 | 17 | test( "group remove one", function() { 18 | var svg = d3.select('#selectionRemove').append('svg'), 19 | g = svg.append('g'), 20 | el = g.append('rect'); 21 | 22 | el.remove(); 23 | equal(svg.selectAll('rect')[0].length, 0); 24 | }); 25 | 26 | -------------------------------------------------------------------------------- /tests/core/selection-tests.js: -------------------------------------------------------------------------------- 1 | module( "Selection", { 2 | teardown: function() { 3 | document.getElementById('selection').innerHTML = ''; 4 | } 5 | }); 6 | 7 | 8 | test( "selectAll tagname", function() { 9 | var svg = d3.select('#selection').append('svg'), 10 | el = svg.append('rect'), 11 | rects = svg.selectAll('rect'); 12 | 13 | equal(rects[0].length, 1) 14 | equal(rects.node(), el.node()) 15 | }); 16 | 17 | test( "selectAll class", function() { 18 | var svg = d3.select('#selection').append('svg'), 19 | el = svg.append('rect').attr('class', 'foo'), 20 | el2 = svg.append('rect').attr('class', 'foo'), 21 | rects = svg.selectAll('.foo'); 22 | 23 | equal(rects[0].length, 2) 24 | }); 25 | 26 | test( "selectAll tagname.class", function() { 27 | var svg = d3.select('#selection').append('svg'), 28 | el1 = svg.append('rect').attr('class', 'foo'), 29 | el2 = svg.append('rect').attr('class', 'foo'), 30 | rects = svg.selectAll('rect.foo'); 31 | 32 | equal(rects[0].length, 2) 33 | }); 34 | 35 | test( "select tagname", function() { 36 | var svg = d3.select('#selection').append('svg'), 37 | el = svg.append('rect'); 38 | 39 | equal(svg.select('rect').node(), el.node()) 40 | }); 41 | 42 | test('select class', function() { 43 | var svg = d3.select('#selection').append('svg'), 44 | el = svg.append('rect').attr('class', 'foo'); 45 | 46 | equal(svg.select('.foo').node(), el.node()) 47 | }); 48 | 49 | test('select tagname with class', function() { 50 | var svg = d3.select('#selection').append('svg'), 51 | el = svg.append('rect').attr('class', 'foo'); 52 | 53 | equal(svg.select('rect.foo').node(), el.node()) 54 | }); 55 | -------------------------------------------------------------------------------- /tests/core/style-tests.js: -------------------------------------------------------------------------------- 1 | module( "Style", { 2 | teardown: function () { 3 | document.getElementById('style').innerHTML = ''; 4 | } 5 | }); 6 | 7 | test("path styling", function () { 8 | var svg = d3.select('#style').append('svg'), 9 | el = svg.append('path'); 10 | 11 | // default stroke-width for SVG 12 | equal(el.style('stroke-width'), 1); 13 | }); 14 | 15 | test("text styling", function () { 16 | var svg = d3.select('#style').append('svg'), 17 | el = svg.append('text'); 18 | 19 | // 400 == font-weight: normal 20 | equal(el.style('font-weight'), 400); 21 | equal(el.style('font-size'), '12pt'); 22 | }); 23 | 24 | asyncTest("div style and transition", function() { 25 | var div = d3.select('#style').append('div'); 26 | 27 | div.style('width', '100px'); 28 | equal(div.style('width'), '100px'); 29 | 30 | div.transition().style('width', '1000px'); 31 | 32 | setTimeout(function() { 33 | start(); 34 | equal(div.style('width'), '1000px'); 35 | }, 500); 36 | }); 37 | -------------------------------------------------------------------------------- /tests/core/text-tests.js: -------------------------------------------------------------------------------- 1 | module( "Text", { 2 | teardown: function() { 3 | document.getElementById('text').innerHTML = ''; 4 | } 5 | }); 6 | 7 | test( "text", function() { 8 | var svg = d3.select('#text').append('svg'), 9 | el = svg.append('text'); 10 | 11 | el.text('hello'); 12 | equal(el.text(), 'hello'); 13 | }); 14 | 15 | test("text function", function() { 16 | var svg = d3.select('#text').append('svg'), 17 | el = svg.append('text'); 18 | 19 | el.text(function() { return "hello"; }); 20 | equal(el.text(), 'hello'); 21 | }); 22 | 23 | test("text on HTML element", function() { 24 | var div = d3.select('#text').append('div'); 25 | 26 | div.text('hello'); 27 | equal(div.text(), 'hello'); 28 | }); 29 | -------------------------------------------------------------------------------- /tests/core/transform-tests.js: -------------------------------------------------------------------------------- 1 | module("Transforms"); 2 | 3 | test( "translate(20,20)", function() { 4 | transform = d3.transform('translate(20,20)') 5 | equal(transform.translate[0], 20) 6 | equal(transform.translate[1], 20) 7 | }); 8 | 9 | test( "translate(0,20)", function() { 10 | transform = d3.transform('translate(0,20)') 11 | equal(transform.translate[0], 0) 12 | equal(transform.translate[1], 20) 13 | }); 14 | 15 | test( "translate(20,0)", function() { 16 | transform = d3.transform('translate(20,0)') 17 | equal(transform.translate[0], 20) 18 | equal(transform.translate[1], 0) 19 | }); 20 | 21 | test( "translate(20,0) translate(-20, 0)", function() { 22 | transform = d3.transform( "translate(20,0) translate(-20, 0)") 23 | equal(transform.translate[0], 0) 24 | equal(transform.translate[1], 0) 25 | }); 26 | 27 | test( "translate(20,0) translate(20, 1)", function() { 28 | transform = d3.transform( "translate(20,0) translate(20, 1)") 29 | equal(transform.translate[0], 40) 30 | equal(transform.translate[1], 1) 31 | }); 32 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | R2D3 Tests 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | --------------------------------------------------------------------------------