mdarray-sol 0.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +35 -0
- data/LICENSE.txt~ +73 -0
- data/README.md +140 -0
- data/README.md~ +290 -0
- data/Rakefile +80 -0
- data/config.rb +223 -0
- data/doc/Nashorn.html +1406 -0
- data/doc/Sol.html +692 -0
- data/doc/Sol/BarChart.html +181 -0
- data/doc/Sol/BaseChart.html +799 -0
- data/doc/Sol/Bootstrap.html +1134 -0
- data/doc/Sol/Bridge.html +448 -0
- data/doc/Sol/Chart.html +1162 -0
- data/doc/Sol/CoordinateChart.html +673 -0
- data/doc/Sol/DCFX.html +807 -0
- data/doc/Sol/Dashboard.html +1967 -0
- data/doc/Sol/ExecMessages.html +332 -0
- data/doc/Sol/GuiCommunication.html +230 -0
- data/doc/Sol/Interval.html +1213 -0
- data/doc/Sol/JS.html +448 -0
- data/doc/Sol/LineChart.html +344 -0
- data/doc/Sol/LinearScale.html +334 -0
- data/doc/Sol/Margins.html +219 -0
- data/doc/Sol/OrdinalScale.html +263 -0
- data/doc/Sol/ReadBuffer.html +302 -0
- data/doc/Sol/Scale.html +462 -0
- data/doc/Sol/Stack.html +199 -0
- data/doc/Sol/TimeScale.html +396 -0
- data/doc/_index.html +362 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +95 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +95 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +849 -0
- data/doc/top-level-namespace.html +135 -0
- data/examples/bar_chart/bar_chart.rb +268 -0
- data/examples/bar_plot.rb +96 -0
- data/examples/charts/area.rb +25 -0
- data/examples/charts/area_script.rb +69 -0
- data/examples/charts/env.rb +8 -0
- data/examples/charts/monthly-move.csv +6725 -0
- data/examples/charts/morley.csv +101 -0
- data/examples/charts/morley2.csv +81 -0
- data/examples/charts/morley3.csv +121 -0
- data/examples/d3_tutorial.rb +98 -0
- data/examples/sc_plot.rb +57 -0
- data/examples/scatterplot/axes.rb +111 -0
- data/examples/scatterplot/scatterplot.rb +221 -0
- data/examples/us_states/map.rb +90 -0
- data/examples/us_states/us-ag-productivity2004.csv +49 -0
- data/examples/us_states/us-cities.csv +51 -0
- data/examples/util/linear_scale.rb +83 -0
- data/examples/util/ordinal_scale.rb +72 -0
- data/init.rb +39 -0
- data/lib/jx/array_handler.js +70 -0
- data/lib/jx/callback.rb +255 -0
- data/lib/jx/hash_handler.js +87 -0
- data/lib/jx/irbobject.rb +121 -0
- data/lib/jx/js.rb +442 -0
- data/lib/jx/js_array.rb +31 -0
- data/lib/jx/js_hash.rb +76 -0
- data/lib/jx/js_init.rb +62 -0
- data/lib/jx/jsarray.rb +66 -0
- data/lib/jx/jsfunction.rb +73 -0
- data/lib/jx/jsobject.rb +188 -0
- data/lib/jx/jsstyle_sheet.rb +231 -0
- data/lib/jx/jsundefined.rb +46 -0
- data/lib/jx/proxy_array.rb +62 -0
- data/lib/jx/rbobject.rb +80 -0
- data/lib/jx/ruby_proxy.js +176 -0
- data/lib/jx/ruby_rich.js +70 -0
- data/lib/jx/sol.rb +109 -0
- data/lib/mdarray-sol.rb +34 -0
- data/lib/mdarray/jsmdarray.rb +39 -0
- data/lib/ruby_rich/bootstrap.rb +230 -0
- data/lib/ruby_rich/config.html +22 -0
- data/lib/ruby_rich/dashboard.rb +299 -0
- data/lib/ruby_rich/ruby_rich.rb +120 -0
- data/lib/sol/bar_chart.rb +35 -0
- data/lib/sol/base_chart.rb +148 -0
- data/lib/sol/chart.rb +138 -0
- data/lib/sol/coordinate_chart.rb +128 -0
- data/lib/sol/interval.rb +156 -0
- data/lib/sol/line_chart.rb +58 -0
- data/lib/sol/margins.rb +52 -0
- data/lib/sol/scale.rb +212 -0
- data/lib/sol/stack.rb +44 -0
- data/node_modules/bootstrap/Gruntfile.js +533 -0
- data/node_modules/bootstrap/dist/js/bootstrap.js +2363 -0
- data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/node_modules/bootstrap/dist/js/npm.js +13 -0
- data/node_modules/bootstrap/grunt/bs-commonjs-generator.js +30 -0
- data/node_modules/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
- data/node_modules/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
- data/node_modules/bootstrap/grunt/bs-raw-files-generator.js +44 -0
- data/node_modules/bootstrap/js/affix.js +162 -0
- data/node_modules/bootstrap/js/alert.js +94 -0
- data/node_modules/bootstrap/js/button.js +120 -0
- data/node_modules/bootstrap/js/carousel.js +237 -0
- data/node_modules/bootstrap/js/collapse.js +211 -0
- data/node_modules/bootstrap/js/dropdown.js +165 -0
- data/node_modules/bootstrap/js/modal.js +337 -0
- data/node_modules/bootstrap/js/popover.js +108 -0
- data/node_modules/bootstrap/js/scrollspy.js +172 -0
- data/node_modules/bootstrap/js/tab.js +155 -0
- data/node_modules/bootstrap/js/tooltip.js +514 -0
- data/node_modules/bootstrap/js/transition.js +59 -0
- data/node_modules/chai/chai.js +6142 -0
- data/node_modules/chai/index.js +1 -0
- data/node_modules/chai/karma.conf.js +28 -0
- data/node_modules/chai/karma.sauce.js +41 -0
- data/node_modules/chai/lib/chai.js +93 -0
- data/node_modules/chai/lib/chai/assertion.js +131 -0
- data/node_modules/chai/lib/chai/config.js +55 -0
- data/node_modules/chai/lib/chai/core/assertions.js +1860 -0
- data/node_modules/chai/lib/chai/interface/assert.js +1645 -0
- data/node_modules/chai/lib/chai/interface/expect.js +34 -0
- data/node_modules/chai/lib/chai/interface/should.js +201 -0
- data/node_modules/chai/lib/chai/utils/addChainableMethod.js +112 -0
- data/node_modules/chai/lib/chai/utils/addMethod.js +44 -0
- data/node_modules/chai/lib/chai/utils/addProperty.js +48 -0
- data/node_modules/chai/lib/chai/utils/expectTypes.js +42 -0
- data/node_modules/chai/lib/chai/utils/flag.js +33 -0
- data/node_modules/chai/lib/chai/utils/getActual.js +20 -0
- data/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
- data/node_modules/chai/lib/chai/utils/getMessage.js +51 -0
- data/node_modules/chai/lib/chai/utils/getName.js +22 -0
- data/node_modules/chai/lib/chai/utils/getPathInfo.js +111 -0
- data/node_modules/chai/lib/chai/utils/getPathValue.js +43 -0
- data/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
- data/node_modules/chai/lib/chai/utils/hasProperty.js +64 -0
- data/node_modules/chai/lib/chai/utils/index.js +130 -0
- data/node_modules/chai/lib/chai/utils/inspect.js +335 -0
- data/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
- data/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +54 -0
- data/node_modules/chai/lib/chai/utils/overwriteMethod.js +52 -0
- data/node_modules/chai/lib/chai/utils/overwriteProperty.js +55 -0
- data/node_modules/chai/lib/chai/utils/test.js +28 -0
- data/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
- data/node_modules/chai/node_modules/assertion-error/index.js +116 -0
- data/node_modules/chai/node_modules/deep-eql/index.js +1 -0
- data/node_modules/chai/node_modules/deep-eql/karma.conf.js +20 -0
- data/node_modules/chai/node_modules/deep-eql/lib/eql.js +257 -0
- data/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js +1 -0
- data/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js +142 -0
- data/node_modules/chai/node_modules/type-detect/index.js +1 -0
- data/node_modules/chai/node_modules/type-detect/lib/type.js +134 -0
- data/node_modules/chai/sauce.browsers.js +128 -0
- data/node_modules/dc/Gruntfile.js +437 -0
- data/node_modules/dc/dc.js +10477 -0
- data/node_modules/dc/dc.min.js +23 -0
- data/node_modules/dc/docs/coverage.js +203 -0
- data/node_modules/dc/grunt/format-file-list.js +33 -0
- data/node_modules/dc/index.js +5 -0
- data/node_modules/dc/node_modules/crossfilter2/crossfilter.js +1401 -0
- data/node_modules/dc/node_modules/crossfilter2/crossfilter.min.js +1 -0
- data/node_modules/dc/node_modules/crossfilter2/index.js +1 -0
- data/node_modules/dc/node_modules/crossfilter2/src/array.js +46 -0
- data/node_modules/dc/node_modules/crossfilter2/src/bisect.js +44 -0
- data/node_modules/dc/node_modules/crossfilter2/src/crossfilter.js +872 -0
- data/node_modules/dc/node_modules/crossfilter2/src/filter.js +19 -0
- data/node_modules/dc/node_modules/crossfilter2/src/heap.js +44 -0
- data/node_modules/dc/node_modules/crossfilter2/src/heapselect.js +36 -0
- data/node_modules/dc/node_modules/crossfilter2/src/identity.js +3 -0
- data/node_modules/dc/node_modules/crossfilter2/src/insertionsort.js +18 -0
- data/node_modules/dc/node_modules/crossfilter2/src/null.js +3 -0
- data/node_modules/dc/node_modules/crossfilter2/src/permute.js +8 -0
- data/node_modules/dc/node_modules/crossfilter2/src/quicksort.js +283 -0
- data/node_modules/dc/node_modules/crossfilter2/src/reduce.js +19 -0
- data/node_modules/dc/node_modules/crossfilter2/src/zero.js +3 -0
- data/node_modules/dc/node_modules/d3/d3.js +9554 -0
- data/node_modules/dc/node_modules/d3/d3.min.js +5 -0
- data/node_modules/dc/node_modules/d3/package.js +13 -0
- data/node_modules/dc/node_modules/d3/src/arrays/ascending.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/bisect.js +36 -0
- data/node_modules/dc/node_modules/d3/src/arrays/descending.js +3 -0
- data/node_modules/dc/node_modules/d3/src/arrays/deviation.js +6 -0
- data/node_modules/dc/node_modules/d3/src/arrays/entries.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/extent.js +21 -0
- data/node_modules/dc/node_modules/d3/src/arrays/index.js +25 -0
- data/node_modules/dc/node_modules/d3/src/arrays/keys.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/map.js +84 -0
- data/node_modules/dc/node_modules/d3/src/arrays/max.js +14 -0
- data/node_modules/dc/node_modules/d3/src/arrays/mean.js +15 -0
- data/node_modules/dc/node_modules/d3/src/arrays/median.js +16 -0
- data/node_modules/dc/node_modules/d3/src/arrays/merge.js +21 -0
- data/node_modules/dc/node_modules/d3/src/arrays/min.js +14 -0
- data/node_modules/dc/node_modules/d3/src/arrays/nest.js +97 -0
- data/node_modules/dc/node_modules/d3/src/arrays/pairs.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/permute.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/quantile.js +8 -0
- data/node_modules/dc/node_modules/d3/src/arrays/range.js +26 -0
- data/node_modules/dc/node_modules/d3/src/arrays/set.js +27 -0
- data/node_modules/dc/node_modules/d3/src/arrays/shuffle.js +9 -0
- data/node_modules/dc/node_modules/d3/src/arrays/sum.js +14 -0
- data/node_modules/dc/node_modules/d3/src/arrays/transpose.js +15 -0
- data/node_modules/dc/node_modules/d3/src/arrays/values.js +5 -0
- data/node_modules/dc/node_modules/d3/src/arrays/variance.js +29 -0
- data/node_modules/dc/node_modules/d3/src/arrays/zip.js +5 -0
- data/node_modules/dc/node_modules/d3/src/behavior/behavior.js +1 -0
- data/node_modules/dc/node_modules/d3/src/behavior/drag.js +88 -0
- data/node_modules/dc/node_modules/d3/src/behavior/index.js +3 -0
- data/node_modules/dc/node_modules/d3/src/behavior/zoom.js +348 -0
- data/node_modules/dc/node_modules/d3/src/color/color.js +7 -0
- data/node_modules/dc/node_modules/d3/src/color/hcl.js +34 -0
- data/node_modules/dc/node_modules/d3/src/color/hsl.js +56 -0
- data/node_modules/dc/node_modules/d3/src/color/index.js +6 -0
- data/node_modules/dc/node_modules/d3/src/color/lab.js +60 -0
- data/node_modules/dc/node_modules/d3/src/color/rgb.js +301 -0
- data/node_modules/dc/node_modules/d3/src/color/xyz.js +7 -0
- data/node_modules/dc/node_modules/d3/src/compat/array.js +15 -0
- data/node_modules/dc/node_modules/d3/src/compat/date.js +3 -0
- data/node_modules/dc/node_modules/d3/src/compat/index.js +3 -0
- data/node_modules/dc/node_modules/d3/src/compat/style.js +23 -0
- data/node_modules/dc/node_modules/d3/src/core/array.js +2 -0
- data/node_modules/dc/node_modules/d3/src/core/class.js +8 -0
- data/node_modules/dc/node_modules/d3/src/core/document.js +15 -0
- data/node_modules/dc/node_modules/d3/src/core/functor.js +5 -0
- data/node_modules/dc/node_modules/d3/src/core/identity.js +3 -0
- data/node_modules/dc/node_modules/d3/src/core/index.js +3 -0
- data/node_modules/dc/node_modules/d3/src/core/noop.js +1 -0
- data/node_modules/dc/node_modules/d3/src/core/ns.js +18 -0
- data/node_modules/dc/node_modules/d3/src/core/rebind.js +16 -0
- data/node_modules/dc/node_modules/d3/src/core/source.js +3 -0
- data/node_modules/dc/node_modules/d3/src/core/subclass.js +11 -0
- data/node_modules/dc/node_modules/d3/src/core/target.js +3 -0
- data/node_modules/dc/node_modules/d3/src/core/true.js +3 -0
- data/node_modules/dc/node_modules/d3/src/core/vendor.js +10 -0
- data/node_modules/dc/node_modules/d3/src/core/zero.js +3 -0
- data/node_modules/dc/node_modules/d3/src/d3.js +23 -0
- data/node_modules/dc/node_modules/d3/src/dsv/csv.js +3 -0
- data/node_modules/dc/node_modules/d3/src/dsv/dsv.js +136 -0
- data/node_modules/dc/node_modules/d3/src/dsv/index.js +3 -0
- data/node_modules/dc/node_modules/d3/src/dsv/tsv.js +3 -0
- data/node_modules/dc/node_modules/d3/src/end.js +4 -0
- data/node_modules/dc/node_modules/d3/src/event/dispatch.js +69 -0
- data/node_modules/dc/node_modules/d3/src/event/drag.js +36 -0
- data/node_modules/dc/node_modules/d3/src/event/event.js +50 -0
- data/node_modules/dc/node_modules/d3/src/event/index.js +6 -0
- data/node_modules/dc/node_modules/d3/src/event/mouse.js +39 -0
- data/node_modules/dc/node_modules/d3/src/event/timer.js +82 -0
- data/node_modules/dc/node_modules/d3/src/event/touch.js +11 -0
- data/node_modules/dc/node_modules/d3/src/event/touches.js +12 -0
- data/node_modules/dc/node_modules/d3/src/format/collapse.js +3 -0
- data/node_modules/dc/node_modules/d3/src/format/format.js +3 -0
- data/node_modules/dc/node_modules/d3/src/format/formatPrefix.js +24 -0
- data/node_modules/dc/node_modules/d3/src/format/index.js +4 -0
- data/node_modules/dc/node_modules/d3/src/format/precision.js +3 -0
- data/node_modules/dc/node_modules/d3/src/format/requote.js +5 -0
- data/node_modules/dc/node_modules/d3/src/format/round.js +5 -0
- data/node_modules/dc/node_modules/d3/src/geo/albers-usa.js +129 -0
- data/node_modules/dc/node_modules/d3/src/geo/albers.js +11 -0
- data/node_modules/dc/node_modules/d3/src/geo/area.js +69 -0
- data/node_modules/dc/node_modules/d3/src/geo/azimuthal-equal-area.js +12 -0
- data/node_modules/dc/node_modules/d3/src/geo/azimuthal-equidistant.js +13 -0
- data/node_modules/dc/node_modules/d3/src/geo/azimuthal.js +25 -0
- data/node_modules/dc/node_modules/d3/src/geo/bounds.js +168 -0
- data/node_modules/dc/node_modules/d3/src/geo/cartesian.js +47 -0
- data/node_modules/dc/node_modules/d3/src/geo/centroid.js +149 -0
- data/node_modules/dc/node_modules/d3/src/geo/circle.js +81 -0
- data/node_modules/dc/node_modules/d3/src/geo/clip-antimeridian.js +95 -0
- data/node_modules/dc/node_modules/d3/src/geo/clip-circle.js +178 -0
- data/node_modules/dc/node_modules/d3/src/geo/clip-extent.js +196 -0
- data/node_modules/dc/node_modules/d3/src/geo/clip-polygon.js +104 -0
- data/node_modules/dc/node_modules/d3/src/geo/clip.js +149 -0
- data/node_modules/dc/node_modules/d3/src/geo/compose.js +12 -0
- data/node_modules/dc/node_modules/d3/src/geo/conic-conformal.js +39 -0
- data/node_modules/dc/node_modules/d3/src/geo/conic-equal-area.js +33 -0
- data/node_modules/dc/node_modules/d3/src/geo/conic-equidistant.js +36 -0
- data/node_modules/dc/node_modules/d3/src/geo/conic.js +16 -0
- data/node_modules/dc/node_modules/d3/src/geo/distance.js +13 -0
- data/node_modules/dc/node_modules/d3/src/geo/equirectangular.js +10 -0
- data/node_modules/dc/node_modules/d3/src/geo/geo.js +1 -0
- data/node_modules/dc/node_modules/d3/src/geo/gnomonic.js +12 -0
- data/node_modules/dc/node_modules/d3/src/geo/graticule.js +103 -0
- data/node_modules/dc/node_modules/d3/src/geo/greatArc.js +42 -0
- data/node_modules/dc/node_modules/d3/src/geo/index.js +33 -0
- data/node_modules/dc/node_modules/d3/src/geo/interpolate.js +38 -0
- data/node_modules/dc/node_modules/d3/src/geo/length.js +44 -0
- data/node_modules/dc/node_modules/d3/src/geo/mercator.js +48 -0
- data/node_modules/dc/node_modules/d3/src/geo/orthographic.js +12 -0
- data/node_modules/dc/node_modules/d3/src/geo/path-area.js +41 -0
- data/node_modules/dc/node_modules/d3/src/geo/path-bounds.js +21 -0
- data/node_modules/dc/node_modules/d3/src/geo/path-buffer.js +59 -0
- data/node_modules/dc/node_modules/d3/src/geo/path-centroid.js +78 -0
- data/node_modules/dc/node_modules/d3/src/geo/path-context.js +49 -0
- data/node_modules/dc/node_modules/d3/src/geo/path.js +87 -0
- data/node_modules/dc/node_modules/d3/src/geo/point-in-polygon.js +71 -0
- data/node_modules/dc/node_modules/d3/src/geo/projection.js +121 -0
- data/node_modules/dc/node_modules/d3/src/geo/resample.js +109 -0
- data/node_modules/dc/node_modules/d3/src/geo/rotation.js +79 -0
- data/node_modules/dc/node_modules/d3/src/geo/spherical.js +13 -0
- data/node_modules/dc/node_modules/d3/src/geo/stereographic.js +12 -0
- data/node_modules/dc/node_modules/d3/src/geo/stream.js +71 -0
- data/node_modules/dc/node_modules/d3/src/geo/transform.js +36 -0
- data/node_modules/dc/node_modules/d3/src/geo/transverse-mercator.js +31 -0
- data/node_modules/dc/node_modules/d3/src/geom/clip-line.js +66 -0
- data/node_modules/dc/node_modules/d3/src/geom/delaunay.js +6 -0
- data/node_modules/dc/node_modules/d3/src/geom/geom.js +1 -0
- data/node_modules/dc/node_modules/d3/src/geom/hull.js +91 -0
- data/node_modules/dc/node_modules/d3/src/geom/index.js +6 -0
- data/node_modules/dc/node_modules/d3/src/geom/point.js +7 -0
- data/node_modules/dc/node_modules/d3/src/geom/polygon.js +105 -0
- data/node_modules/dc/node_modules/d3/src/geom/quadtree.js +243 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi.js +110 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/beach.js +186 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/cell.js +64 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/circle.js +73 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/clip.js +80 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/edge.js +50 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/index.js +59 -0
- data/node_modules/dc/node_modules/d3/src/geom/voronoi/red-black.js +235 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/array.js +19 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/ease.js +111 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/hcl.js +20 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/hsl.js +20 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/index.js +14 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/interpolate.js +26 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/lab.js +17 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/number.js +6 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/object.js +25 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/rgb.js +20 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/round.js +6 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/string.js +54 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/transform.js +59 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/uninterpolate.js +9 -0
- data/node_modules/dc/node_modules/d3/src/interpolate/zoom.js +53 -0
- data/node_modules/dc/node_modules/d3/src/layout/bundle.js +59 -0
- data/node_modules/dc/node_modules/d3/src/layout/chord.js +157 -0
- data/node_modules/dc/node_modules/d3/src/layout/cluster.js +92 -0
- data/node_modules/dc/node_modules/d3/src/layout/force.js +372 -0
- data/node_modules/dc/node_modules/d3/src/layout/hierarchy.js +136 -0
- data/node_modules/dc/node_modules/d3/src/layout/histogram.js +110 -0
- data/node_modules/dc/node_modules/d3/src/layout/index.js +13 -0
- data/node_modules/dc/node_modules/d3/src/layout/layout.js +1 -0
- data/node_modules/dc/node_modules/d3/src/layout/pack.js +211 -0
- data/node_modules/dc/node_modules/d3/src/layout/partition.js +51 -0
- data/node_modules/dc/node_modules/d3/src/layout/pie.js +78 -0
- data/node_modules/dc/node_modules/d3/src/layout/stack.js +247 -0
- data/node_modules/dc/node_modules/d3/src/layout/tree.js +240 -0
- data/node_modules/dc/node_modules/d3/src/layout/treemap.js +229 -0
- data/node_modules/dc/node_modules/d3/src/locale/ca-ES.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/de-CH.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/de-DE.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/en-CA.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/en-GB.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/en-US.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/es-ES.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/fi-FI.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/fr-CA.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/fr-FR.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/he-IL.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/hu-HU.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/it-IT.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/ja-JP.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/ko-KR.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/locale.js +9 -0
- data/node_modules/dc/node_modules/d3/src/locale/mk-MK.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/nl-NL.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/number-format.js +155 -0
- data/node_modules/dc/node_modules/d3/src/locale/pl-PL.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/pt-BR.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/ru-RU.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/sv-SE.js +16 -0
- data/node_modules/dc/node_modules/d3/src/locale/time-format.js +370 -0
- data/node_modules/dc/node_modules/d3/src/locale/time-scale.js +0 -0
- data/node_modules/dc/node_modules/d3/src/locale/zh-CN.js +16 -0
- data/node_modules/dc/node_modules/d3/src/math/abs.js +1 -0
- data/node_modules/dc/node_modules/d3/src/math/adder.js +34 -0
- data/node_modules/dc/node_modules/d3/src/math/index.js +2 -0
- data/node_modules/dc/node_modules/d3/src/math/number.js +7 -0
- data/node_modules/dc/node_modules/d3/src/math/random.js +34 -0
- data/node_modules/dc/node_modules/d3/src/math/transform.js +64 -0
- data/node_modules/dc/node_modules/d3/src/math/trigonometry.js +44 -0
- data/node_modules/dc/node_modules/d3/src/scale/bilinear.js +7 -0
- data/node_modules/dc/node_modules/d3/src/scale/category.js +58 -0
- data/node_modules/dc/node_modules/d3/src/scale/identity.js +33 -0
- data/node_modules/dc/node_modules/d3/src/scale/index.js +11 -0
- data/node_modules/dc/node_modules/d3/src/scale/linear.js +160 -0
- data/node_modules/dc/node_modules/d3/src/scale/log.js +92 -0
- data/node_modules/dc/node_modules/d3/src/scale/nice.js +30 -0
- data/node_modules/dc/node_modules/d3/src/scale/ordinal.js +102 -0
- data/node_modules/dc/node_modules/d3/src/scale/polylinear.js +24 -0
- data/node_modules/dc/node_modules/d3/src/scale/pow.js +57 -0
- data/node_modules/dc/node_modules/d3/src/scale/quantile.js +55 -0
- data/node_modules/dc/node_modules/d3/src/scale/quantize.js +44 -0
- data/node_modules/dc/node_modules/d3/src/scale/scale.js +10 -0
- data/node_modules/dc/node_modules/d3/src/scale/sqrt.js +6 -0
- data/node_modules/dc/node_modules/d3/src/scale/threshold.js +36 -0
- data/node_modules/dc/node_modules/d3/src/selection/append.js +28 -0
- data/node_modules/dc/node_modules/d3/src/selection/attr.js +62 -0
- data/node_modules/dc/node_modules/d3/src/selection/call.js +8 -0
- data/node_modules/dc/node_modules/d3/src/selection/classed.js +76 -0
- data/node_modules/dc/node_modules/d3/src/selection/data.js +117 -0
- data/node_modules/dc/node_modules/d3/src/selection/datum.js +7 -0
- data/node_modules/dc/node_modules/d3/src/selection/each.js +16 -0
- data/node_modules/dc/node_modules/d3/src/selection/empty.js +5 -0
- data/node_modules/dc/node_modules/d3/src/selection/enter-insert.js +20 -0
- data/node_modules/dc/node_modules/d3/src/selection/enter-select.js +27 -0
- data/node_modules/dc/node_modules/d3/src/selection/enter.js +21 -0
- data/node_modules/dc/node_modules/d3/src/selection/filter.js +28 -0
- data/node_modules/dc/node_modules/d3/src/selection/html.js +10 -0
- data/node_modules/dc/node_modules/d3/src/selection/index.js +1 -0
- data/node_modules/dc/node_modules/d3/src/selection/insert.js +9 -0
- data/node_modules/dc/node_modules/d3/src/selection/interrupt.js +27 -0
- data/node_modules/dc/node_modules/d3/src/selection/node.js +11 -0
- data/node_modules/dc/node_modules/d3/src/selection/on.js +106 -0
- data/node_modules/dc/node_modules/d3/src/selection/order.js +13 -0
- data/node_modules/dc/node_modules/d3/src/selection/property.js +43 -0
- data/node_modules/dc/node_modules/d3/src/selection/remove.js +13 -0
- data/node_modules/dc/node_modules/d3/src/selection/select.js +32 -0
- data/node_modules/dc/node_modules/d3/src/selection/selectAll.js +27 -0
- data/node_modules/dc/node_modules/d3/src/selection/selection.js +81 -0
- data/node_modules/dc/node_modules/d3/src/selection/size.js +7 -0
- data/node_modules/dc/node_modules/d3/src/selection/sort.js +15 -0
- data/node_modules/dc/node_modules/d3/src/selection/style.js +59 -0
- data/node_modules/dc/node_modules/d3/src/selection/text.js +10 -0
- data/node_modules/dc/node_modules/d3/src/selection/transition.js +21 -0
- data/node_modules/dc/node_modules/d3/src/start.js +2 -0
- data/node_modules/dc/node_modules/d3/src/svg/arc.js +292 -0
- data/node_modules/dc/node_modules/d3/src/svg/area-radial.js +14 -0
- data/node_modules/dc/node_modules/d3/src/svg/area.js +121 -0
- data/node_modules/dc/node_modules/d3/src/svg/axis.js +160 -0
- data/node_modules/dc/node_modules/d3/src/svg/brush.js +429 -0
- data/node_modules/dc/node_modules/d3/src/svg/chord.js +90 -0
- data/node_modules/dc/node_modules/d3/src/svg/diagonal-radial.js +27 -0
- data/node_modules/dc/node_modules/d3/src/svg/diagonal.js +43 -0
- data/node_modules/dc/node_modules/d3/src/svg/index.js +12 -0
- data/node_modules/dc/node_modules/d3/src/svg/line-radial.js +27 -0
- data/node_modules/dc/node_modules/d3/src/svg/line.js +432 -0
- data/node_modules/dc/node_modules/d3/src/svg/svg.js +1 -0
- data/node_modules/dc/node_modules/d3/src/svg/symbol.js +105 -0
- data/node_modules/dc/node_modules/d3/src/time/day.js +21 -0
- data/node_modules/dc/node_modules/d3/src/time/format-iso.js +19 -0
- data/node_modules/dc/node_modules/d3/src/time/format-utc.js +3 -0
- data/node_modules/dc/node_modules/d3/src/time/format.js +4 -0
- data/node_modules/dc/node_modules/d3/src/time/hour.js +14 -0
- data/node_modules/dc/node_modules/d3/src/time/index.js +14 -0
- data/node_modules/dc/node_modules/d3/src/time/interval.js +71 -0
- data/node_modules/dc/node_modules/d3/src/time/minute.js +13 -0
- data/node_modules/dc/node_modules/d3/src/time/month.js +16 -0
- data/node_modules/dc/node_modules/d3/src/time/scale-utc.js +25 -0
- data/node_modules/dc/node_modules/d3/src/time/scale.js +155 -0
- data/node_modules/dc/node_modules/d3/src/time/second.js +13 -0
- data/node_modules/dc/node_modules/d3/src/time/time.js +33 -0
- data/node_modules/dc/node_modules/d3/src/time/week.js +31 -0
- data/node_modules/dc/node_modules/d3/src/time/year.js +16 -0
- data/node_modules/dc/node_modules/d3/src/transition/attr.js +58 -0
- data/node_modules/dc/node_modules/d3/src/transition/delay.js +10 -0
- data/node_modules/dc/node_modules/d3/src/transition/duration.js +10 -0
- data/node_modules/dc/node_modules/d3/src/transition/each.js +26 -0
- data/node_modules/dc/node_modules/d3/src/transition/ease.js +10 -0
- data/node_modules/dc/node_modules/d3/src/transition/filter.js +22 -0
- data/node_modules/dc/node_modules/d3/src/transition/index.js +1 -0
- data/node_modules/dc/node_modules/d3/src/transition/remove.js +9 -0
- data/node_modules/dc/node_modules/d3/src/transition/select.js +28 -0
- data/node_modules/dc/node_modules/d3/src/transition/selectAll.js +31 -0
- data/node_modules/dc/node_modules/d3/src/transition/style.js +53 -0
- data/node_modules/dc/node_modules/d3/src/transition/subtransition.js +25 -0
- data/node_modules/dc/node_modules/d3/src/transition/text.js +11 -0
- data/node_modules/dc/node_modules/d3/src/transition/transition.js +161 -0
- data/node_modules/dc/node_modules/d3/src/transition/tween.js +17 -0
- data/node_modules/dc/node_modules/d3/src/xhr/html.js +12 -0
- data/node_modules/dc/node_modules/d3/src/xhr/index.js +5 -0
- data/node_modules/dc/node_modules/d3/src/xhr/json.js +9 -0
- data/node_modules/dc/node_modules/d3/src/xhr/text.js +5 -0
- data/node_modules/dc/node_modules/d3/src/xhr/xhr.js +126 -0
- data/node_modules/dc/node_modules/d3/src/xhr/xml.js +5 -0
- data/node_modules/dc/regression/inject-serializer.js +6 -0
- data/node_modules/dc/regression/stock-regression-test.js +140 -0
- data/node_modules/dc/spec/bar-chart-spec.js +1230 -0
- data/node_modules/dc/spec/base-mixin-spec.js +611 -0
- data/node_modules/dc/spec/biggish-data-spec.js +136 -0
- data/node_modules/dc/spec/box-plot-spec.js +211 -0
- data/node_modules/dc/spec/bubble-chart-spec.js +450 -0
- data/node_modules/dc/spec/bubble-overlay-spec.js +102 -0
- data/node_modules/dc/spec/color-spec.js +89 -0
- data/node_modules/dc/spec/composite-chart-spec.js +691 -0
- data/node_modules/dc/spec/coordinate-grid-chart-spec.js +962 -0
- data/node_modules/dc/spec/core-spec.js +301 -0
- data/node_modules/dc/spec/data-addition-spec.js +122 -0
- data/node_modules/dc/spec/data-count-spec.js +180 -0
- data/node_modules/dc/spec/data-grid-spec.js +124 -0
- data/node_modules/dc/spec/data-table-spec.js +251 -0
- data/node_modules/dc/spec/event-spec.js +41 -0
- data/node_modules/dc/spec/filter-dates-spec.js +92 -0
- data/node_modules/dc/spec/filters-spec.js +140 -0
- data/node_modules/dc/spec/geo-choropleth-chart-spec.js +225 -0
- data/node_modules/dc/spec/heatmap-spec.js +363 -0
- data/node_modules/dc/spec/helpers/custom_matchers.js +213 -0
- data/node_modules/dc/spec/helpers/fixtures.js +81 -0
- data/node_modules/dc/spec/helpers/geoFixtures.js +113 -0
- data/node_modules/dc/spec/helpers/load-jsreporter.js +37 -0
- data/node_modules/dc/spec/helpers/spec-helper.js +53 -0
- data/node_modules/dc/spec/legend-spec.js +266 -0
- data/node_modules/dc/spec/line-chart-spec.js +709 -0
- data/node_modules/dc/spec/logger-spec.js +80 -0
- data/node_modules/dc/spec/number-display-spec.js +168 -0
- data/node_modules/dc/spec/pie-chart-spec.js +677 -0
- data/node_modules/dc/spec/row-chart-spec.js +362 -0
- data/node_modules/dc/spec/scatter-plot-spec.js +336 -0
- data/node_modules/dc/spec/series-chart-spec.js +133 -0
- data/node_modules/dc/spec/utils-spec.js +110 -0
- data/node_modules/dc/src/banner.js +2 -0
- data/node_modules/dc/src/bar-chart.js +374 -0
- data/node_modules/dc/src/base-mixin.js +1478 -0
- data/node_modules/dc/src/box-plot.js +240 -0
- data/node_modules/dc/src/bubble-chart.js +177 -0
- data/node_modules/dc/src/bubble-mixin.js +244 -0
- data/node_modules/dc/src/bubble-overlay.js +207 -0
- data/node_modules/dc/src/cap-mixin.js +151 -0
- data/node_modules/dc/src/color-mixin.js +172 -0
- data/node_modules/dc/src/composite-chart.js +544 -0
- data/node_modules/dc/src/coordinate-grid-mixin.js +1300 -0
- data/node_modules/dc/src/core.js +425 -0
- data/node_modules/dc/src/d3.box.js +317 -0
- data/node_modules/dc/src/data-count.js +110 -0
- data/node_modules/dc/src/data-grid.js +243 -0
- data/node_modules/dc/src/data-table.js +419 -0
- data/node_modules/dc/src/errors.js +28 -0
- data/node_modules/dc/src/events.js +37 -0
- data/node_modules/dc/src/filters.js +124 -0
- data/node_modules/dc/src/footer.js +35 -0
- data/node_modules/dc/src/geo-choropleth-chart.js +279 -0
- data/node_modules/dc/src/heatmap.js +378 -0
- data/node_modules/dc/src/legend.js +277 -0
- data/node_modules/dc/src/line-chart.js +504 -0
- data/node_modules/dc/src/logger.js +40 -0
- data/node_modules/dc/src/margin-mixin.js +44 -0
- data/node_modules/dc/src/number-display.js +141 -0
- data/node_modules/dc/src/pie-chart.js +571 -0
- data/node_modules/dc/src/row-chart.js +425 -0
- data/node_modules/dc/src/scatter-plot.js +338 -0
- data/node_modules/dc/src/series-chart.js +192 -0
- data/node_modules/dc/src/stack-mixin.js +319 -0
- data/node_modules/dc/src/utils.js +290 -0
- data/node_modules/dc/web/docs/html/scripts/docstrap.lib.js +11 -0
- data/node_modules/dc/web/docs/html/scripts/fulltext-search-ui.js +89 -0
- data/node_modules/dc/web/docs/html/scripts/fulltext-search.js +36 -0
- data/node_modules/dc/web/docs/html/scripts/lunr.min.js +7 -0
- data/node_modules/dc/web/docs/html/scripts/prettify/jquery.min.js +6 -0
- data/node_modules/dc/web/docs/html/scripts/prettify/lang-css.js +21 -0
- data/node_modules/dc/web/docs/html/scripts/prettify/prettify.js +496 -0
- data/node_modules/dc/web/docs/html/scripts/sunlight.js +1157 -0
- data/node_modules/dc/web/docs/html/scripts/toc.js +203 -0
- data/node_modules/dc/web/ep/list.js +106 -0
- data/node_modules/dc/web/examples/lysenko-interval-tree.js +447 -0
- data/node_modules/dc/web/highlighter/shAutoloader.js +17 -0
- data/node_modules/dc/web/highlighter/shBrushJScript.js +52 -0
- data/node_modules/dc/web/highlighter/shBrushXml.js +69 -0
- data/node_modules/dc/web/highlighter/shCore.js +17 -0
- data/node_modules/dc/web/js/colorbrewer.js +1 -0
- data/node_modules/dc/web/js/crossfilter.js +1401 -0
- data/node_modules/dc/web/js/d3.js +9554 -0
- data/node_modules/dc/web/js/dc.js +10477 -0
- data/node_modules/dc/web/js/dc.min.js +23 -0
- data/node_modules/dc/web/js/env-data.js +218 -0
- data/node_modules/dc/web/js/jasmine-jsreporter.js +394 -0
- data/node_modules/dc/web/stock.js +685 -0
- data/node_modules/dc/web/transitions/transition-test.js +45 -0
- data/node_modules/jquery/dist/jquery.js +9814 -0
- data/node_modules/jquery/dist/jquery.min.js +4 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +2143 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/node_modules/jquery/src/ajax.js +845 -0
- data/node_modules/jquery/src/ajax/jsonp.js +100 -0
- data/node_modules/jquery/src/ajax/load.js +83 -0
- data/node_modules/jquery/src/ajax/parseJSON.js +13 -0
- data/node_modules/jquery/src/ajax/parseXML.js +27 -0
- data/node_modules/jquery/src/ajax/script.js +68 -0
- data/node_modules/jquery/src/ajax/var/location.js +3 -0
- data/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/node_modules/jquery/src/ajax/var/rquery.js +3 -0
- data/node_modules/jquery/src/ajax/xhr.js +167 -0
- data/node_modules/jquery/src/attributes.js +11 -0
- data/node_modules/jquery/src/attributes/attr.js +142 -0
- data/node_modules/jquery/src/attributes/classes.js +177 -0
- data/node_modules/jquery/src/attributes/prop.js +125 -0
- data/node_modules/jquery/src/attributes/support.js +36 -0
- data/node_modules/jquery/src/attributes/val.js +177 -0
- data/node_modules/jquery/src/callbacks.js +232 -0
- data/node_modules/jquery/src/core.js +494 -0
- data/node_modules/jquery/src/core/access.js +65 -0
- data/node_modules/jquery/src/core/init.js +134 -0
- data/node_modules/jquery/src/core/parseHTML.js +41 -0
- data/node_modules/jquery/src/core/ready.js +103 -0
- data/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
- data/node_modules/jquery/src/css.js +502 -0
- data/node_modules/jquery/src/css/addGetHookIf.js +24 -0
- data/node_modules/jquery/src/css/adjustCSS.js +65 -0
- data/node_modules/jquery/src/css/curCSS.js +60 -0
- data/node_modules/jquery/src/css/defaultDisplay.js +72 -0
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/node_modules/jquery/src/css/showHide.js +48 -0
- data/node_modules/jquery/src/css/support.js +121 -0
- data/node_modules/jquery/src/css/var/cssExpand.js +3 -0
- data/node_modules/jquery/src/css/var/getStyles.js +15 -0
- data/node_modules/jquery/src/css/var/isHidden.js +16 -0
- data/node_modules/jquery/src/css/var/rmargin.js +3 -0
- data/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
- data/node_modules/jquery/src/css/var/swap.js +24 -0
- data/node_modules/jquery/src/data.js +187 -0
- data/node_modules/jquery/src/data/Data.js +200 -0
- data/node_modules/jquery/src/data/var/acceptData.js +18 -0
- data/node_modules/jquery/src/data/var/dataPriv.js +5 -0
- data/node_modules/jquery/src/data/var/dataUser.js +5 -0
- data/node_modules/jquery/src/deferred.js +158 -0
- data/node_modules/jquery/src/deprecated.js +32 -0
- data/node_modules/jquery/src/dimensions.js +54 -0
- data/node_modules/jquery/src/effects.js +629 -0
- data/node_modules/jquery/src/effects/Tween.js +121 -0
- data/node_modules/jquery/src/effects/animatedSelector.js +13 -0
- data/node_modules/jquery/src/event.js +711 -0
- data/node_modules/jquery/src/event/ajax.js +20 -0
- data/node_modules/jquery/src/event/alias.js +27 -0
- data/node_modules/jquery/src/event/focusin.js +53 -0
- data/node_modules/jquery/src/event/support.js +9 -0
- data/node_modules/jquery/src/event/trigger.js +183 -0
- data/node_modules/jquery/src/exports/amd.js +24 -0
- data/node_modules/jquery/src/exports/global.js +26 -0
- data/node_modules/jquery/src/intro.js +44 -0
- data/node_modules/jquery/src/jquery.js +37 -0
- data/node_modules/jquery/src/manipulation.js +481 -0
- data/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
- data/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
- data/node_modules/jquery/src/manipulation/getAll.js +21 -0
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/node_modules/jquery/src/manipulation/support.js +33 -0
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
- data/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
- data/node_modules/jquery/src/offset.js +218 -0
- data/node_modules/jquery/src/outro.js +2 -0
- data/node_modules/jquery/src/queue.js +143 -0
- data/node_modules/jquery/src/queue/delay.js +22 -0
- data/node_modules/jquery/src/selector-native.js +211 -0
- data/node_modules/jquery/src/selector-sizzle.js +14 -0
- data/node_modules/jquery/src/selector.js +1 -0
- data/node_modules/jquery/src/serialize.js +125 -0
- data/node_modules/jquery/src/traversing.js +175 -0
- data/node_modules/jquery/src/traversing/findFilter.js +100 -0
- data/node_modules/jquery/src/traversing/var/dir.js +20 -0
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/node_modules/jquery/src/traversing/var/siblings.js +15 -0
- data/node_modules/jquery/src/var/arr.js +3 -0
- data/node_modules/jquery/src/var/class2type.js +5 -0
- data/node_modules/jquery/src/var/concat.js +5 -0
- data/node_modules/jquery/src/var/document.js +3 -0
- data/node_modules/jquery/src/var/documentElement.js +5 -0
- data/node_modules/jquery/src/var/hasOwn.js +5 -0
- data/node_modules/jquery/src/var/indexOf.js +5 -0
- data/node_modules/jquery/src/var/pnum.js +3 -0
- data/node_modules/jquery/src/var/push.js +5 -0
- data/node_modules/jquery/src/var/rcssNum.js +7 -0
- data/node_modules/jquery/src/var/rnotwhite.js +3 -0
- data/node_modules/jquery/src/var/slice.js +5 -0
- data/node_modules/jquery/src/var/support.js +5 -0
- data/node_modules/jquery/src/var/toString.js +5 -0
- data/node_modules/jquery/src/wrap.js +79 -0
- data/target/mdarray_sol.jar +0 -0
- data/test/jx/test_complete.rb +35 -0
- data/test/jx/test_js.rb +543 -0
- data/test/jx/test_proxy_array.rb +239 -0
- data/test/jx/test_proxy_hash.rb +160 -0
- data/test/jx/test_proxy_lambda.rb +80 -0
- data/test/jx/test_rb_js_compat.rb +135 -0
- data/test/jx/test_style_sheets.rb +90 -0
- data/test/mdarray/test_mdarray.rb +75 -0
- data/util/cacert.pem +4095 -0
- data/util/download.rb +256 -0
- data/vendor/jxbrowser-6.8.jar +0 -0
- data/vendor/licence.jar +0 -0
- data/version.rb +2 -0
- metadata +817 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
describe('dc.logger', function () {
|
2
|
+
var message = 'Watch out for the bears';
|
3
|
+
|
4
|
+
describe('logging a warning', function () {
|
5
|
+
describe('when console.warn is defined', function () {
|
6
|
+
beforeEach(function () {
|
7
|
+
console.warn = function (msg) {};
|
8
|
+
spyOn(console, 'warn');
|
9
|
+
dc.logger.warn(message);
|
10
|
+
});
|
11
|
+
|
12
|
+
it('should log the message using console.warn', function () {
|
13
|
+
expect(console.warn).toHaveBeenCalledWith(message);
|
14
|
+
});
|
15
|
+
});
|
16
|
+
|
17
|
+
describe('when console.warn is not defined but console.log is', function () {
|
18
|
+
beforeEach(function () {
|
19
|
+
console.warn = undefined;
|
20
|
+
spyOn(console, 'log');
|
21
|
+
dc.logger.warn(message);
|
22
|
+
});
|
23
|
+
|
24
|
+
it('should log the message using console.log', function () {
|
25
|
+
expect(console.log).toHaveBeenCalledWith(message);
|
26
|
+
});
|
27
|
+
});
|
28
|
+
});
|
29
|
+
|
30
|
+
describe('debug flag', function () {
|
31
|
+
it('is off by default', function () {
|
32
|
+
expect(dc.logger.enableDebugLog).toBeFalsy();
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('debug logging', function () {
|
37
|
+
describe('when debugging is disabled', function () {
|
38
|
+
beforeEach(function () {
|
39
|
+
dc.logger.enableDebugLog = false;
|
40
|
+
console.debug = function (msg) {};
|
41
|
+
spyOn(console, 'debug');
|
42
|
+
dc.logger.debug(message);
|
43
|
+
});
|
44
|
+
|
45
|
+
it('should log nothing', function () {
|
46
|
+
expect(console.debug).not.toHaveBeenCalled();
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('when debugging is enabled', function () {
|
51
|
+
beforeEach(function () {
|
52
|
+
dc.logger.enableDebugLog = true;
|
53
|
+
});
|
54
|
+
|
55
|
+
describe('when console.debug is defined', function () {
|
56
|
+
beforeEach(function () {
|
57
|
+
console.debug = function (msg) {};
|
58
|
+
spyOn(console, 'debug');
|
59
|
+
dc.logger.debug(message);
|
60
|
+
});
|
61
|
+
|
62
|
+
it('should log the message using console.debug', function () {
|
63
|
+
expect(console.debug).toHaveBeenCalledWith(message);
|
64
|
+
});
|
65
|
+
});
|
66
|
+
|
67
|
+
describe('when console.debug is not defined', function () {
|
68
|
+
beforeEach(function () {
|
69
|
+
console.debug = undefined;
|
70
|
+
spyOn(console, 'log');
|
71
|
+
dc.logger.debug(message);
|
72
|
+
});
|
73
|
+
|
74
|
+
it('should log the message using console.log', function () {
|
75
|
+
expect(console.log).toHaveBeenCalledWith(message);
|
76
|
+
});
|
77
|
+
});
|
78
|
+
});
|
79
|
+
});
|
80
|
+
});
|
@@ -0,0 +1,168 @@
|
|
1
|
+
/* global appendChartID, loadDateFixture */
|
2
|
+
describe('dc.numberDisplay', function () {
|
3
|
+
var data, meanGroup;
|
4
|
+
var countryDimension;
|
5
|
+
function average (d) {
|
6
|
+
return d.n ? d.tot / d.n : 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
beforeEach(function () {
|
10
|
+
data = crossfilter(loadDateFixture());
|
11
|
+
var groupAll = data.groupAll();
|
12
|
+
meanGroup = groupAll.reduce(
|
13
|
+
function (p, v) {
|
14
|
+
++p.n;
|
15
|
+
p.tot += +v.value;
|
16
|
+
return p;
|
17
|
+
},
|
18
|
+
function (p, v) {
|
19
|
+
--p.n;
|
20
|
+
p.tot -= +v.value;
|
21
|
+
return p;
|
22
|
+
},
|
23
|
+
function () { return {n: 0,tot: 0}; }
|
24
|
+
);
|
25
|
+
countryDimension = data.dimension(function (d) {
|
26
|
+
return d.countrycode;
|
27
|
+
});
|
28
|
+
countryDimension.filter('CA');
|
29
|
+
});
|
30
|
+
|
31
|
+
function buildChart (id) {
|
32
|
+
var chart = dc.numberDisplay(id)
|
33
|
+
.transitionDuration(0)
|
34
|
+
.group(meanGroup)
|
35
|
+
.formatNumber(d3.format('.3s'))
|
36
|
+
.valueAccessor(average);
|
37
|
+
chart.render();
|
38
|
+
d3.timer.flush();
|
39
|
+
return chart;
|
40
|
+
}
|
41
|
+
|
42
|
+
describe('Empty Div', function () {
|
43
|
+
var chart;
|
44
|
+
beforeEach(function () {
|
45
|
+
var id = 'empty-div';
|
46
|
+
appendChartID(id);
|
47
|
+
chart = buildChart('#' + id);
|
48
|
+
});
|
49
|
+
it('should generate something', function () {
|
50
|
+
expect(chart).not.toBeNull();
|
51
|
+
});
|
52
|
+
it('should be registered', function () {
|
53
|
+
expect(dc.hasChart(chart)).toBeTruthy();
|
54
|
+
});
|
55
|
+
it('should return a value', function () {
|
56
|
+
expect(chart.value()).toEqual(38.5);
|
57
|
+
});
|
58
|
+
it('should have text value in child', function () {
|
59
|
+
expect(chart.select('span.number-display').text()).toEqual('38.5');
|
60
|
+
});
|
61
|
+
describe('redraw', function () {
|
62
|
+
beforeEach(function () {
|
63
|
+
countryDimension.filterAll();
|
64
|
+
chart.redraw();
|
65
|
+
d3.timer.flush();
|
66
|
+
});
|
67
|
+
it('should update value', function () {
|
68
|
+
expect(chart.select('span.number-display').text()).toEqual('41.8');
|
69
|
+
});
|
70
|
+
});
|
71
|
+
describe('html with one, some and none', function () {
|
72
|
+
beforeEach(function () {
|
73
|
+
chart.html({one: '%number number',none: 'no number',some: '%number numbers'});
|
74
|
+
chart.redraw();
|
75
|
+
d3.timer.flush();
|
76
|
+
});
|
77
|
+
it('should use some for some', function () {
|
78
|
+
expect(chart.select('span.number-display').text()).toEqual('38.5 numbers');
|
79
|
+
});
|
80
|
+
});
|
81
|
+
describe('html with one, some and none', function () {
|
82
|
+
beforeEach(function () {
|
83
|
+
chart.html({one: '%number number',none: 'no number',some: '%number numbers'});
|
84
|
+
chart.valueAccessor(function (d) {return 1;});
|
85
|
+
chart.redraw();
|
86
|
+
d3.timer.flush();
|
87
|
+
});
|
88
|
+
it('should use one for one', function () {
|
89
|
+
expect(chart.select('span.number-display').text()).toEqual('1.00 number');
|
90
|
+
});
|
91
|
+
});
|
92
|
+
describe('html with one, some and none', function () {
|
93
|
+
beforeEach(function () {
|
94
|
+
chart.html({one: '%number number',none: 'no number',some: '%number numbers'});
|
95
|
+
chart.valueAccessor(function (d) {return 0;});
|
96
|
+
chart.redraw();
|
97
|
+
d3.timer.flush();
|
98
|
+
});
|
99
|
+
it('should use zero for zero', function () {
|
100
|
+
expect(chart.select('span.number-display').text()).toEqual('no number');
|
101
|
+
});
|
102
|
+
});
|
103
|
+
describe('html with just one', function () {
|
104
|
+
beforeEach(function () {
|
105
|
+
chart.html({one: '%number number'});
|
106
|
+
chart.redraw();
|
107
|
+
d3.timer.flush();
|
108
|
+
});
|
109
|
+
it('should use one for showing some', function () {
|
110
|
+
expect(chart.select('span.number-display').text()).toEqual('38.5 number');
|
111
|
+
});
|
112
|
+
});
|
113
|
+
describe('html with just some', function () {
|
114
|
+
beforeEach(function () {
|
115
|
+
chart.html({some: '%number numbers'});
|
116
|
+
chart.redraw();
|
117
|
+
d3.timer.flush();
|
118
|
+
});
|
119
|
+
it('should use some for showing one', function () {
|
120
|
+
expect(chart.select('span.number-display').text()).toEqual('38.5 numbers');
|
121
|
+
});
|
122
|
+
});
|
123
|
+
describe('html with just none', function () {
|
124
|
+
beforeEach(function () {
|
125
|
+
chart.html({});
|
126
|
+
chart.redraw();
|
127
|
+
d3.timer.flush();
|
128
|
+
});
|
129
|
+
it('should just show the number in case of some and one', function () {
|
130
|
+
expect(chart.select('span.number-display').text()).toEqual('38.5');
|
131
|
+
});
|
132
|
+
});
|
133
|
+
afterEach(function () {
|
134
|
+
countryDimension.filterAll();
|
135
|
+
});
|
136
|
+
});
|
137
|
+
describe('Div with embedded span', function () {
|
138
|
+
var chart;
|
139
|
+
beforeEach(function () {
|
140
|
+
var id = 'full-div';
|
141
|
+
var div = appendChartID(id);
|
142
|
+
div.append('p').html('There are <span class="number-display">_</span> Total Widgets.');
|
143
|
+
chart = buildChart('#' + id);
|
144
|
+
});
|
145
|
+
it('should have text value in child', function () {
|
146
|
+
expect(chart.root().text()).toEqual('There are 38.5 Total Widgets.');
|
147
|
+
});
|
148
|
+
afterEach(function () {
|
149
|
+
countryDimension.filterAll();
|
150
|
+
});
|
151
|
+
});
|
152
|
+
describe('Inline nonspan element' , function () {
|
153
|
+
beforeEach(function () {
|
154
|
+
var div = d3.select('body').append('div').attr('id','number-display-test-section');
|
155
|
+
div.append('p').html('There are <em id="nonspan"></em> Total Widgets.');
|
156
|
+
buildChart('#nonspan');
|
157
|
+
});
|
158
|
+
it('should have text value in child', function () {
|
159
|
+
expect(d3.select('body').select('#number-display-test-section').html())
|
160
|
+
.toMatch(new RegExp('<p>There are <em (?:id="nonspan" class="dc-chart"|class="dc-chart" id="nonspan")>' +
|
161
|
+
'<span class="number-display">38.5</span></em> Total Widgets.</p>'));
|
162
|
+
});
|
163
|
+
afterEach(function () {
|
164
|
+
countryDimension.filterAll();
|
165
|
+
d3.select('#number-display-test-section').remove();
|
166
|
+
});
|
167
|
+
});
|
168
|
+
});
|
@@ -0,0 +1,677 @@
|
|
1
|
+
/* global appendChartID, loadDateFixture, makeDate */
|
2
|
+
describe('dc.pieChart', function () {
|
3
|
+
var width = 200;
|
4
|
+
var height = 200;
|
5
|
+
var radius = 100;
|
6
|
+
var defaultCenter = {x: width / 2, y: height / 2};
|
7
|
+
var newCenter = {x: 101, y: 99};
|
8
|
+
var innerRadius = 30;
|
9
|
+
var data, valueDimension, valueGroup;
|
10
|
+
var regionDimension, statusDimension;
|
11
|
+
var countryDimension, countryGroup, dateDimension;
|
12
|
+
var statusGroup, statusMultiGroup;
|
13
|
+
beforeEach(function () {
|
14
|
+
data = crossfilter(loadDateFixture());
|
15
|
+
valueDimension = data.dimension(function (d) {
|
16
|
+
return d.value;
|
17
|
+
});
|
18
|
+
valueGroup = valueDimension.group();
|
19
|
+
regionDimension = data.dimension(function (d) {
|
20
|
+
return d.region;
|
21
|
+
});
|
22
|
+
statusDimension = data.dimension(function (d) {
|
23
|
+
return d.status;
|
24
|
+
});
|
25
|
+
countryDimension = data.dimension(function (d) {
|
26
|
+
return d.countrycode;
|
27
|
+
});
|
28
|
+
countryGroup = countryDimension.group();
|
29
|
+
dateDimension = data.dimension(function (d) {
|
30
|
+
return d3.time.day.utc(d.dd);
|
31
|
+
});
|
32
|
+
statusGroup = statusDimension.group();
|
33
|
+
statusMultiGroup = statusGroup.reduce(
|
34
|
+
//add
|
35
|
+
function (p, v) {
|
36
|
+
++p.count;
|
37
|
+
p.value += +v.value;
|
38
|
+
return p;
|
39
|
+
},
|
40
|
+
//remove
|
41
|
+
function (p, v) {
|
42
|
+
--p.count;
|
43
|
+
p.value -= +v.value;
|
44
|
+
return p;
|
45
|
+
},
|
46
|
+
//init
|
47
|
+
function () {
|
48
|
+
return {count: 0, value: 0};
|
49
|
+
}
|
50
|
+
);
|
51
|
+
});
|
52
|
+
|
53
|
+
function buildChart (id) {
|
54
|
+
var div = appendChartID(id);
|
55
|
+
div.append('a').attr('class', 'reset').style('display', 'none');
|
56
|
+
div.append('span').attr('class', 'filter').style('display', 'none');
|
57
|
+
var chart = dc.pieChart('#' + id);
|
58
|
+
chart.dimension(valueDimension).group(valueGroup)
|
59
|
+
.width(width)
|
60
|
+
.height(height)
|
61
|
+
.radius(radius)
|
62
|
+
.transitionDuration(0);
|
63
|
+
chart.render();
|
64
|
+
return chart;
|
65
|
+
}
|
66
|
+
|
67
|
+
describe('generation', function () {
|
68
|
+
var chart;
|
69
|
+
beforeEach(function () {
|
70
|
+
chart = buildChart('pie-chart-age');
|
71
|
+
chart.innerRadius(innerRadius);
|
72
|
+
chart.render();
|
73
|
+
});
|
74
|
+
it('we get something', function () {
|
75
|
+
expect(chart).not.toBeNull();
|
76
|
+
});
|
77
|
+
it('should be registered', function () {
|
78
|
+
expect(dc.hasChart(chart)).toBeTruthy();
|
79
|
+
});
|
80
|
+
it('dc-chart class should be turned on for parent div', function () {
|
81
|
+
expect(d3.select('#pie-chart-age').attr('class')).toEqual('dc-chart');
|
82
|
+
});
|
83
|
+
it('inner radius can be set', function () {
|
84
|
+
expect(chart.innerRadius()).toEqual(innerRadius);
|
85
|
+
});
|
86
|
+
it('svg should be created', function () {
|
87
|
+
expect(chart.select('svg').empty()).toBeFalsy();
|
88
|
+
});
|
89
|
+
it('default color scheme should be created', function () {
|
90
|
+
expect(chart.colors().length > 0).toBeTruthy();
|
91
|
+
});
|
92
|
+
it('dimension should be set', function () {
|
93
|
+
expect(chart.dimension()).toBe(valueDimension);
|
94
|
+
});
|
95
|
+
it('group should be set', function () {
|
96
|
+
expect(chart.group()).toEqual(valueGroup);
|
97
|
+
});
|
98
|
+
it('width should be set', function () {
|
99
|
+
expect(chart.width()).toEqual(width);
|
100
|
+
});
|
101
|
+
it('height should be set', function () {
|
102
|
+
expect(chart.height()).toEqual(height);
|
103
|
+
});
|
104
|
+
it('radius should be set', function () {
|
105
|
+
expect(chart.radius()).toEqual(radius);
|
106
|
+
});
|
107
|
+
it('cx should be set', function () {
|
108
|
+
expect(chart.cx()).toEqual(defaultCenter.x);
|
109
|
+
});
|
110
|
+
it('cy should be set', function () {
|
111
|
+
expect(chart.cy()).toEqual(defaultCenter.y);
|
112
|
+
});
|
113
|
+
it('height should be used for svg', function () {
|
114
|
+
expect(chart.select('svg').attr('height')).toEqual(String(height));
|
115
|
+
});
|
116
|
+
it('root g should be created', function () {
|
117
|
+
expect(chart.select('svg g').empty()).toBeFalsy();
|
118
|
+
});
|
119
|
+
it('root g should be translated to center', function () {
|
120
|
+
expect(chart.select('svg g').attr('transform')).toMatchTranslate(defaultCenter.x, defaultCenter.y);
|
121
|
+
});
|
122
|
+
it('slice g should be created with class', function () {
|
123
|
+
expect(chart.selectAll('svg g g.pie-slice').data().length).toEqual(5);
|
124
|
+
});
|
125
|
+
it('slice path should be created', function () {
|
126
|
+
expect(chart.selectAll('svg g g.pie-slice path').data().length).toEqual(5);
|
127
|
+
});
|
128
|
+
it('slice css class should be numbered with index', function () {
|
129
|
+
chart.selectAll('g.pie-slice').each(function (p, i) {
|
130
|
+
expect(d3.select(this).attr('class')).toEqual('pie-slice _' + i);
|
131
|
+
});
|
132
|
+
});
|
133
|
+
it('slice path should be filled', function () {
|
134
|
+
chart.selectAll('svg g g.pie-slice path').each(function (p) {
|
135
|
+
expect(d3.select(this).attr('fill') !== '').toBeTruthy();
|
136
|
+
});
|
137
|
+
});
|
138
|
+
it('slice path d should be created', function () {
|
139
|
+
chart.selectAll('svg g g.pie-slice path').each(function (p) {
|
140
|
+
expect(d3.select(this).attr('d') !== '').toBeTruthy();
|
141
|
+
});
|
142
|
+
});
|
143
|
+
it('slice path fill should be set correctly', function () {
|
144
|
+
expect(d3.select(chart.selectAll('g.pie-slice path')[0][0]).attr('fill')).toEqual('#3182bd');
|
145
|
+
expect(d3.select(chart.selectAll('g.pie-slice path')[0][1]).attr('fill')).toEqual('#6baed6');
|
146
|
+
expect(d3.select(chart.selectAll('g.pie-slice path')[0][2]).attr('fill')).toEqual('#9ecae1');
|
147
|
+
expect(d3.select(chart.selectAll('g.pie-slice path')[0][3]).attr('fill')).toEqual('#c6dbef');
|
148
|
+
});
|
149
|
+
it('slice label should be created', function () {
|
150
|
+
expect(chart.selectAll('svg text.pie-slice').data().length).toEqual(5);
|
151
|
+
});
|
152
|
+
it('slice label transform to centroid', function () {
|
153
|
+
expect(chart.selectAll('svg g text.pie-slice').attr('transform'))
|
154
|
+
.toMatchTranslate(38.20604139901076, -52.58610463437158, 3);
|
155
|
+
});
|
156
|
+
it('slice label text should be set', function () {
|
157
|
+
chart.selectAll('svg g text.pie-slice').call(function (p) {
|
158
|
+
expect(p.text()).toEqual(p.datum().data.key);
|
159
|
+
});
|
160
|
+
});
|
161
|
+
it('slice label should be middle anchored', function () {
|
162
|
+
chart.selectAll('svg g text.pie-slice').each(function (p) {
|
163
|
+
expect(d3.select(this).attr('text-anchor')).toEqual('middle');
|
164
|
+
});
|
165
|
+
});
|
166
|
+
it('reset link hidden after init rendering', function () {
|
167
|
+
expect(chart.select('a.reset').style('display')).toEqual('none');
|
168
|
+
});
|
169
|
+
it('filter printer should be set', function () {
|
170
|
+
expect(chart.filterPrinter()).not.toBeNull();
|
171
|
+
});
|
172
|
+
it('filter info should be hidden after init rendering', function () {
|
173
|
+
expect(chart.select('span.filter').style('display')).toEqual('none');
|
174
|
+
});
|
175
|
+
describe('center positioning', function () {
|
176
|
+
beforeEach(function () {
|
177
|
+
chart
|
178
|
+
.cx(newCenter.x)
|
179
|
+
.cy(newCenter.y)
|
180
|
+
.render();
|
181
|
+
return chart;
|
182
|
+
});
|
183
|
+
afterEach(function () {
|
184
|
+
chart
|
185
|
+
.cx(defaultCenter.x)
|
186
|
+
.cy(defaultCenter.y)
|
187
|
+
.render();
|
188
|
+
return chart;
|
189
|
+
});
|
190
|
+
it('root g should be translated to ' + newCenter.x + ',' + newCenter.y, function () {
|
191
|
+
expect(chart.select('svg g').attr('transform')).toMatchTranslate(newCenter.x, newCenter.y);
|
192
|
+
});
|
193
|
+
});
|
194
|
+
describe('with radius padding', function () {
|
195
|
+
beforeEach(function () {
|
196
|
+
chart.externalRadiusPadding(17)
|
197
|
+
.render();
|
198
|
+
return chart;
|
199
|
+
});
|
200
|
+
it('should not change center', function () {
|
201
|
+
expect(chart.select('svg g').attr('transform')).toMatchTranslate(defaultCenter.x, defaultCenter.y);
|
202
|
+
});
|
203
|
+
it('should decrease outer radius', function () {
|
204
|
+
expect(chart.select('svg g.pie-slice path').attr('d')).toContainPath('A83,83 0 0,1 78,-25');
|
205
|
+
});
|
206
|
+
});
|
207
|
+
|
208
|
+
describe('re-render', function () {
|
209
|
+
beforeEach(function () {
|
210
|
+
chart.render();
|
211
|
+
return chart;
|
212
|
+
});
|
213
|
+
it('multiple invocation of render should update chart', function () {
|
214
|
+
expect(d3.selectAll('#pie-chart-age svg')[0].length).toEqual(1);
|
215
|
+
});
|
216
|
+
});
|
217
|
+
describe('filter', function () {
|
218
|
+
beforeEach(function () {
|
219
|
+
regionDimension.filter('East');
|
220
|
+
chart.render();
|
221
|
+
});
|
222
|
+
it('label should be hidden if filtered out', function () {
|
223
|
+
expect(chart.selectAll('svg g text.pie-slice')[0][0].textContent).toEqual('22');
|
224
|
+
expect(chart.selectAll('svg g text.pie-slice')[0][1].textContent).toEqual('');
|
225
|
+
});
|
226
|
+
afterEach(function () {
|
227
|
+
regionDimension.filterAll();
|
228
|
+
});
|
229
|
+
});
|
230
|
+
describe('n/a filter', function () {
|
231
|
+
beforeEach(function () {
|
232
|
+
statusDimension.filter('E');
|
233
|
+
chart.render();
|
234
|
+
return chart;
|
235
|
+
});
|
236
|
+
it('should draw an empty chart', function () {
|
237
|
+
expect(chart.select('g').classed('empty-chart')).toBeTruthy();
|
238
|
+
});
|
239
|
+
it('should have one slice', function () {
|
240
|
+
expect(chart.selectAll('svg g text.pie-slice').length).toBe(1);
|
241
|
+
});
|
242
|
+
afterEach(function () {
|
243
|
+
statusDimension.filterAll();
|
244
|
+
});
|
245
|
+
});
|
246
|
+
describe('slice selection', function () {
|
247
|
+
it('on click function should be defined', function () {
|
248
|
+
expect(chart.selectAll('svg g g.pie-slice path').on('click') !== undefined).toBeTruthy();
|
249
|
+
});
|
250
|
+
it('by default no slice should be selected', function () {
|
251
|
+
expect(chart.hasFilter()).toBeFalsy();
|
252
|
+
});
|
253
|
+
it('be able to set selected slice', function () {
|
254
|
+
expect(chart.filter('66').filter()).toEqual('66');
|
255
|
+
expect(chart.hasFilter()).toBeTruthy();
|
256
|
+
chart.filterAll();
|
257
|
+
});
|
258
|
+
it('should filter dimension by single selection', function () {
|
259
|
+
chart.filter('22');
|
260
|
+
expect(countryGroup.all()[0].value).toEqual(1);
|
261
|
+
expect(countryGroup.all()[1].value).toEqual(1);
|
262
|
+
chart.filterAll();
|
263
|
+
});
|
264
|
+
it('should filter dimension by multiple selections', function () {
|
265
|
+
chart.filter('66');
|
266
|
+
chart.filter('22');
|
267
|
+
expect(countryGroup.all()[0].value).toEqual(1);
|
268
|
+
expect(countryGroup.all()[1].value).toEqual(2);
|
269
|
+
chart.filterAll();
|
270
|
+
});
|
271
|
+
it('should filter dimension with deselection', function () {
|
272
|
+
chart.filter('22');
|
273
|
+
chart.filter('66');
|
274
|
+
chart.filter('22');
|
275
|
+
expect(countryGroup.all()[0].value).toEqual(0);
|
276
|
+
expect(countryGroup.all()[1].value).toEqual(1);
|
277
|
+
chart.filterAll();
|
278
|
+
});
|
279
|
+
it('should highlight selected slices', function () {
|
280
|
+
chart.filter('66');
|
281
|
+
chart.filter('22');
|
282
|
+
chart.render();
|
283
|
+
chart.selectAll('g.pie-slice').each(function (d) {
|
284
|
+
if (d.data.key === '66' || d.data.key === '22') {
|
285
|
+
expect(d3.select(this).attr('class').indexOf('selected') > 0).toBeTruthy();
|
286
|
+
} else {
|
287
|
+
expect(d3.select(this).attr('class').indexOf('deselected') > 0).toBeTruthy();
|
288
|
+
}
|
289
|
+
});
|
290
|
+
chart.filterAll();
|
291
|
+
});
|
292
|
+
it('reset link shown after slice selection', function () {
|
293
|
+
chart.filter('66');
|
294
|
+
expect(chart.select('a.reset').style('display')).not.toEqual('none');
|
295
|
+
});
|
296
|
+
it('filter info shown after slice selection', function () {
|
297
|
+
chart.filter(null);
|
298
|
+
chart.filter('66');
|
299
|
+
expect(chart.select('span.filter').style('display')).not.toEqual('none');
|
300
|
+
expect(chart.select('span.filter').text()).toEqual('66');
|
301
|
+
});
|
302
|
+
it('should remove highlight if no slice selected', function () {
|
303
|
+
chart.filterAll();
|
304
|
+
chart.redraw();
|
305
|
+
chart.selectAll('.pie-slice path').each(function (d) {
|
306
|
+
var cls = d3.select(this).attr('class');
|
307
|
+
expect(cls === null || cls === '').toBeTruthy();
|
308
|
+
});
|
309
|
+
});
|
310
|
+
});
|
311
|
+
|
312
|
+
describe('filter through clicking', function () {
|
313
|
+
it('onClick should trigger filtering of according group', function () {
|
314
|
+
chart.onClick(chart.group().all()[0]);
|
315
|
+
expect(chart.filter()).toEqual('22');
|
316
|
+
});
|
317
|
+
it('onClick should reset filter if clicked twice', function () {
|
318
|
+
chart.onClick(chart.group().all()[0]);
|
319
|
+
chart.onClick(chart.group().all()[0]);
|
320
|
+
expect(chart.filter()).toEqual(null);
|
321
|
+
});
|
322
|
+
it('multiple onClick should trigger filtering of according groups', function () {
|
323
|
+
chart.onClick(chart.group().all()[0]);
|
324
|
+
chart.onClick(chart.group().all()[1]);
|
325
|
+
expect(chart.hasFilter('22')).toBeTruthy();
|
326
|
+
expect(chart.hasFilter('33')).toBeTruthy();
|
327
|
+
});
|
328
|
+
});
|
329
|
+
describe('group order', function () {
|
330
|
+
beforeEach(function () {
|
331
|
+
chart.cap(4).ordering(dc.pluck('value'));
|
332
|
+
});
|
333
|
+
it('group should be orderd', function () {
|
334
|
+
expect(['33','55','22','44','Others']).toEqual(chart.data().map(dc.pluck('key')));
|
335
|
+
chart.ordering(dc.pluck('key'));
|
336
|
+
expect(['22','33','44','55','Others']).toEqual(chart.data().map(dc.pluck('key')));
|
337
|
+
});
|
338
|
+
afterEach(function () {
|
339
|
+
chart.cap(Infinity).ordering(dc.pluck('key'));
|
340
|
+
});
|
341
|
+
});
|
342
|
+
});
|
343
|
+
|
344
|
+
describe('redraw after empty selection', function () {
|
345
|
+
var chart;
|
346
|
+
beforeEach(function () {
|
347
|
+
chart = buildChart('pie-chart2');
|
348
|
+
dateDimension.filter([makeDate(2010, 0, 1), makeDate(2010, 0, 3)]);
|
349
|
+
chart.redraw();
|
350
|
+
dateDimension.filter([makeDate(2012, 0, 1), makeDate(2012, 11, 30)]);
|
351
|
+
chart.redraw();
|
352
|
+
});
|
353
|
+
it('pie chart should be restored', function () {
|
354
|
+
chart.selectAll('g.pie-slice path').each(function (p) {
|
355
|
+
expect(d3.select(this).attr('d').indexOf('NaN') < 0).toBeTruthy();
|
356
|
+
});
|
357
|
+
});
|
358
|
+
afterEach(function () {
|
359
|
+
dateDimension.filterAll();
|
360
|
+
});
|
361
|
+
});
|
362
|
+
|
363
|
+
describe('small slices', function () {
|
364
|
+
var chart;
|
365
|
+
beforeEach(function () {
|
366
|
+
chart = buildChart('pie-chart3');
|
367
|
+
chart.minAngleForLabel(1)
|
368
|
+
.renderTitle(true);
|
369
|
+
chart.render();
|
370
|
+
});
|
371
|
+
it('label should not be generated if the slice is too small', function () {
|
372
|
+
// slice '66'
|
373
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][4]).text()).toEqual('');
|
374
|
+
});
|
375
|
+
describe('selected', function () {
|
376
|
+
beforeEach(function () {
|
377
|
+
chart.filter('66').redraw();
|
378
|
+
});
|
379
|
+
it('a small slice should be labelled if it is selected', function () {
|
380
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][4]).text()).toEqual('66');
|
381
|
+
});
|
382
|
+
afterEach(function () {
|
383
|
+
chart.filter(null);
|
384
|
+
});
|
385
|
+
});
|
386
|
+
});
|
387
|
+
|
388
|
+
describe('custom label & title generation', function () {
|
389
|
+
var chart;
|
390
|
+
beforeEach(function () {
|
391
|
+
chart = buildChart('pie-chart3');
|
392
|
+
chart.label(function (d) {
|
393
|
+
return 'custom';
|
394
|
+
})
|
395
|
+
.title(function (d) {
|
396
|
+
return 'custom';
|
397
|
+
})
|
398
|
+
.minAngleForLabel(1)
|
399
|
+
.renderTitle(true);
|
400
|
+
chart.render();
|
401
|
+
});
|
402
|
+
it('should render correct number of text', function () {
|
403
|
+
expect(chart.selectAll('text.pie-slice')[0].length).toEqual(5);
|
404
|
+
});
|
405
|
+
it('custom function should be used to dynamically generate label', function () {
|
406
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][0]).text()).toEqual('custom');
|
407
|
+
});
|
408
|
+
it('label should not be generated if the slice is too small', function () {
|
409
|
+
// slice '66'
|
410
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][4]).text()).toEqual('');
|
411
|
+
});
|
412
|
+
it('should render correct number of title', function () {
|
413
|
+
expect(chart.selectAll('g.pie-slice title')[0].length).toEqual(5);
|
414
|
+
});
|
415
|
+
it('custom function should be used to dynamically generate title', function () {
|
416
|
+
chart.selectAll('g.pie-slice title').each(function (p) {
|
417
|
+
expect(d3.select(this).text()).toEqual('custom');
|
418
|
+
});
|
419
|
+
});
|
420
|
+
});
|
421
|
+
|
422
|
+
describe('pie chart slices cap and group switching', function () {
|
423
|
+
var chart;
|
424
|
+
beforeEach(function () {
|
425
|
+
chart = buildChart('pie-chart4');
|
426
|
+
chart.slicesCap(2)
|
427
|
+
.renderTitle(true)
|
428
|
+
.othersLabel('small');
|
429
|
+
chart.render();
|
430
|
+
});
|
431
|
+
describe('with normal valueAccessor', function () {
|
432
|
+
beforeEach(function () {
|
433
|
+
chart.dimension(valueDimension).group(valueGroup)
|
434
|
+
.valueAccessor(dc.pluck('value'))
|
435
|
+
.render();
|
436
|
+
});
|
437
|
+
it('produce expected number of slices', function () {
|
438
|
+
expect(chart.selectAll('text.pie-slice')[0].length).toEqual(3);
|
439
|
+
});
|
440
|
+
it('others slice should use custom name', function () {
|
441
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][2]).text()).toEqual('small');
|
442
|
+
});
|
443
|
+
it('remaining slices should be in numerical order', function () {
|
444
|
+
expect(chart.selectAll('text.pie-slice').data().map(dc.pluck('value')))
|
445
|
+
.toEqual([2,3,5]);
|
446
|
+
});
|
447
|
+
it('clicking others slice should filter all groups slices', function () {
|
448
|
+
var event = document.createEvent('MouseEvents');
|
449
|
+
event.initEvent('click',true,true);
|
450
|
+
chart.selectAll('.pie-slice path')[0][2].dispatchEvent(event);
|
451
|
+
expect(chart.filters()).toEqual(['22','55','66','small']);
|
452
|
+
chart.selectAll('.pie-slice path')[0][2].dispatchEvent(event);
|
453
|
+
expect(chart.filters()).toEqual([]);
|
454
|
+
});
|
455
|
+
});
|
456
|
+
describe('with custom valueAccessor', function () {
|
457
|
+
beforeEach(function () {
|
458
|
+
chart.dimension(statusDimension).group(statusMultiGroup)
|
459
|
+
.valueAccessor(function (d) {return d.value.value;})
|
460
|
+
.render();
|
461
|
+
return chart;
|
462
|
+
});
|
463
|
+
it('correct values, no others row', function () {
|
464
|
+
expect(chart.selectAll('g.pie-slice').data().map(dc.pluck('value')))
|
465
|
+
.toEqual([220, 198]);
|
466
|
+
});
|
467
|
+
it('correct values, others row', function () {
|
468
|
+
chart.cap(1).render();
|
469
|
+
expect(chart.selectAll('title')[0].map(function (t) {return d3.select(t).text();}))
|
470
|
+
.toEqual(['F: 220', 'small: 198']);
|
471
|
+
chart.cap(3); //teardown
|
472
|
+
});
|
473
|
+
});
|
474
|
+
afterEach(function () {
|
475
|
+
valueDimension.filterAll();
|
476
|
+
});
|
477
|
+
});
|
478
|
+
|
479
|
+
describe('pie chart wo/ label', function () {
|
480
|
+
var chart;
|
481
|
+
beforeEach(function () {
|
482
|
+
chart = buildChart('pie-chart4');
|
483
|
+
chart.innerRadius(innerRadius);
|
484
|
+
chart.renderLabel(false);
|
485
|
+
chart.render();
|
486
|
+
});
|
487
|
+
it('slice label should not be created', function () {
|
488
|
+
expect(chart.selectAll('svg g text.pie-slice').data().length).toEqual(0);
|
489
|
+
});
|
490
|
+
});
|
491
|
+
|
492
|
+
describe('renderlet', function () {
|
493
|
+
var chart;
|
494
|
+
beforeEach(function () {
|
495
|
+
chart = buildChart('chart-renderlet');
|
496
|
+
chart.on('renderlet', function () {
|
497
|
+
chart.selectAll('path').attr('fill', 'red');
|
498
|
+
});
|
499
|
+
});
|
500
|
+
it('custom renderlet should be invoked with render', function () {
|
501
|
+
chart.render();
|
502
|
+
expect(chart.selectAll('path').attr('fill')).toEqual('red');
|
503
|
+
});
|
504
|
+
it('custom renderlet should be invoked with redraw', function () {
|
505
|
+
chart.redraw();
|
506
|
+
expect(chart.selectAll('path').attr('fill')).toEqual('red');
|
507
|
+
});
|
508
|
+
});
|
509
|
+
|
510
|
+
describe('pie chart label and title w/ value accessor', function () {
|
511
|
+
var chart;
|
512
|
+
beforeEach(function () {
|
513
|
+
chart = buildChart('pie-chart-default-label-title');
|
514
|
+
chart.dimension(statusGroup)
|
515
|
+
.group(statusMultiGroup)
|
516
|
+
.valueAccessor(function (d) {
|
517
|
+
return d.value.count;
|
518
|
+
})
|
519
|
+
.renderLabel(true).renderTitle(true);
|
520
|
+
chart.render();
|
521
|
+
return chart;
|
522
|
+
});
|
523
|
+
it('default function should be used to dynamically generate label', function () {
|
524
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][0]).text()).toEqual('F');
|
525
|
+
});
|
526
|
+
it('default function should be used to dynamically generate title', function () {
|
527
|
+
expect(d3.select(chart.selectAll('g.pie-slice title')[0][0]).text()).toEqual('F: 5');
|
528
|
+
});
|
529
|
+
describe('with n/a filter', function () {
|
530
|
+
beforeEach(function () {
|
531
|
+
regionDimension.filter('nowhere');
|
532
|
+
chart.render();
|
533
|
+
return chart;
|
534
|
+
});
|
535
|
+
it('should draw an empty chart', function () {
|
536
|
+
expect(chart.select('g').classed('empty-chart')).toBeTruthy();
|
537
|
+
});
|
538
|
+
it('should have one slice', function () {
|
539
|
+
expect(chart.selectAll('svg g text.pie-slice').length).toBe(1);
|
540
|
+
});
|
541
|
+
it('should have slice labeled empty', function () {
|
542
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][0]).text()).toEqual('empty');
|
543
|
+
});
|
544
|
+
describe('with emptyTitle', function () {
|
545
|
+
beforeEach(function () {
|
546
|
+
chart.emptyTitle('nothing').render();
|
547
|
+
});
|
548
|
+
it('should respect the emptyTitle', function () {
|
549
|
+
expect(d3.select(chart.selectAll('text.pie-slice')[0][0]).text()).toEqual('nothing');
|
550
|
+
});
|
551
|
+
afterEach(function () {
|
552
|
+
chart.emptyTitle('empty');
|
553
|
+
});
|
554
|
+
});
|
555
|
+
afterEach(function () {
|
556
|
+
regionDimension.filterAll();
|
557
|
+
});
|
558
|
+
});
|
559
|
+
});
|
560
|
+
|
561
|
+
describe('custom filter handler', function () {
|
562
|
+
var chart;
|
563
|
+
beforeEach(function () {
|
564
|
+
chart = buildChart('pie-chart-filter-handler');
|
565
|
+
chart.filterHandler(function (dimension, filters) {
|
566
|
+
dimension.filter('66');
|
567
|
+
return ['66'];
|
568
|
+
});
|
569
|
+
return chart;
|
570
|
+
});
|
571
|
+
it('default function should be used to dynamically generate label', function () {
|
572
|
+
chart.filter(6);
|
573
|
+
expect(chart.filter()).toEqual('66');
|
574
|
+
});
|
575
|
+
afterEach(function () {
|
576
|
+
valueDimension.filterAll();
|
577
|
+
});
|
578
|
+
});
|
579
|
+
|
580
|
+
describe('external labeling', function () {
|
581
|
+
var chart;
|
582
|
+
beforeEach(function () {
|
583
|
+
chart = buildChart('pie-chart-external-labeling')
|
584
|
+
.externalLabels(10)
|
585
|
+
.render();
|
586
|
+
});
|
587
|
+
it('should place labels outside of pie offset by given radius', function () {
|
588
|
+
var label = d3.select('#pie-chart-external-labeling svg g text.pie-slice');
|
589
|
+
|
590
|
+
var centroid = d3.svg.arc()
|
591
|
+
.outerRadius(chart.radius() + 10)
|
592
|
+
.innerRadius(chart.radius() + 10)
|
593
|
+
.centroid(label.datum());
|
594
|
+
|
595
|
+
expect(label.attr('transform')).toMatchTranslate(centroid[0], centroid[1], 3);
|
596
|
+
});
|
597
|
+
it('gives labels class "external"', function () {
|
598
|
+
d3.selectAll('#pie-chart-external-labeling svg g text.pie-slice').each(function () {
|
599
|
+
expect(d3.select(this).classed('external')).toBeTruthy();
|
600
|
+
});
|
601
|
+
});
|
602
|
+
it('returns radius when given no arguments', function () {
|
603
|
+
expect(chart.externalLabels()).toEqual(10);
|
604
|
+
});
|
605
|
+
it('resets to default when given falsey argument', function () {
|
606
|
+
chart.externalLabels(false).render();
|
607
|
+
|
608
|
+
d3.selectAll('#pie-chart-external-labeling svg g text.pie-slice').each(function () {
|
609
|
+
var label = d3.select(this);
|
610
|
+
|
611
|
+
var centroid = d3.svg.arc()
|
612
|
+
.outerRadius(chart.radius())
|
613
|
+
.innerRadius(chart.innerRadius())
|
614
|
+
.centroid(label.datum());
|
615
|
+
|
616
|
+
expect(label.attr('transform')).toMatchTranslate(centroid[0], centroid[1], 3);
|
617
|
+
expect(label.classed('external')).toBeFalsy();
|
618
|
+
});
|
619
|
+
});
|
620
|
+
});
|
621
|
+
|
622
|
+
describe('legends', function () {
|
623
|
+
var chart;
|
624
|
+
beforeEach(function () {
|
625
|
+
chart = buildChart('pie-chart-legend')
|
626
|
+
.cap(3)
|
627
|
+
.legend(dc.legend())
|
628
|
+
.render();
|
629
|
+
});
|
630
|
+
it('should generate items for each slice', function () {
|
631
|
+
expect(chart.selectAll('g.dc-legend g.dc-legend-item').size()).toEqual(chart.data().length);
|
632
|
+
});
|
633
|
+
it('should include "others" item', function () {
|
634
|
+
var numOthersGroups = chart.selectAll('g.dc-legend g.dc-legend-item text').filter(function (d, i) {
|
635
|
+
return d.name === 'Others';
|
636
|
+
}).size();
|
637
|
+
|
638
|
+
expect(numOthersGroups).toEqual(1);
|
639
|
+
});
|
640
|
+
it('items should be colored', function () {
|
641
|
+
chart.selectAll('g.dc-legend g.dc-legend-item').each(function () {
|
642
|
+
expect(d3.select(this).select('rect').attr('fill')).not.toEqual(undefined);
|
643
|
+
});
|
644
|
+
});
|
645
|
+
it('hovering on items should highlight corresponding slice', function () {
|
646
|
+
chart.selectAll('g.dc-legend g.dc-legend-item').each(function (d, i) {
|
647
|
+
var legendItem = d3.select(this);
|
648
|
+
legendItem.on('mouseover')(legendItem.datum());
|
649
|
+
|
650
|
+
expect(chart.select('.pie-slice._' + i).classed('highlight')).toBeTruthy();
|
651
|
+
legendItem.on('mouseout')(legendItem.datum());
|
652
|
+
});
|
653
|
+
});
|
654
|
+
it('unhovering removes highlight from corresponding slice', function () {
|
655
|
+
chart.selectAll('g.dc-legend g.dc-legend-item').each(function (d, i) {
|
656
|
+
var legendItem = d3.select(this);
|
657
|
+
legendItem.on('mouseover')(legendItem.datum());
|
658
|
+
legendItem.on('mouseout')(legendItem.datum());
|
659
|
+
|
660
|
+
expect(chart.select('.pie-slice._' + i).classed('highlight')).toBeFalsy();
|
661
|
+
});
|
662
|
+
});
|
663
|
+
it('clicking on items filters them', function () {
|
664
|
+
chart.selectAll('g.dc-legend g.dc-legend-item').each(function (d, i) {
|
665
|
+
var legendItem = d3.select(this);
|
666
|
+
legendItem.on('click')(legendItem.datum());
|
667
|
+
|
668
|
+
expect(chart.hasFilter(d.name)).toBeTruthy();
|
669
|
+
|
670
|
+
});
|
671
|
+
});
|
672
|
+
afterEach(function () {
|
673
|
+
valueDimension.filterAll();
|
674
|
+
});
|
675
|
+
});
|
676
|
+
});
|
677
|
+
|