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,266 @@
|
|
1
|
+
/* global appendChartID, coordsFromTranslate, loadDateFixture */
|
2
|
+
describe('dc.legend', function () {
|
3
|
+
var id, chart, dateDimension, dateValueSumGroup, dateIdSumGroup;
|
4
|
+
|
5
|
+
beforeEach(function () {
|
6
|
+
var data = crossfilter(loadDateFixture());
|
7
|
+
dateDimension = data.dimension(function (d) { return d3.time.day.utc(d.dd); });
|
8
|
+
dateValueSumGroup = dateDimension.group().reduceSum(function (d) { return d.value; });
|
9
|
+
dateIdSumGroup = dateDimension.group().reduceSum(function (d) { return d.id; });
|
10
|
+
|
11
|
+
id = 'legend-chart';
|
12
|
+
appendChartID(id);
|
13
|
+
chart = dc.lineChart('#' + id);
|
14
|
+
|
15
|
+
chart
|
16
|
+
.dimension(dateDimension)
|
17
|
+
.group(dateIdSumGroup, 'Id Sum')
|
18
|
+
.stack(dateValueSumGroup, 'Value Sum')
|
19
|
+
.stack(dateValueSumGroup, 'Fixed', function () {})
|
20
|
+
.x(d3.time.scale.utc().domain([new Date(2012, 4, 20), new Date(2012, 7, 15)]))
|
21
|
+
.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5));
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('rendering the legend', function () {
|
25
|
+
beforeEach(function () {
|
26
|
+
chart.render();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('should generate a legend', function () {
|
30
|
+
expect(chart.select('g.dc-legend').empty()).toBeFalsy();
|
31
|
+
});
|
32
|
+
|
33
|
+
it('should place the legend using the provided x and y values', function () {
|
34
|
+
expect(chart.select('g.dc-legend').attr('transform')).toMatchTranslate(400,10);
|
35
|
+
});
|
36
|
+
|
37
|
+
it('should generate a legend item for each stacked line', function () {
|
38
|
+
expect(chart.select('g.dc-legend').selectAll('g.dc-legend-item').size()).toBe(3);
|
39
|
+
});
|
40
|
+
|
41
|
+
describe('without .horizontal(true)', function () {
|
42
|
+
it('should place legend items vertically', function () {
|
43
|
+
expect(coordsFromTranslate(legendItem(0).attr('transform')).y).toBeWithinDelta(0, 1);
|
44
|
+
expect(coordsFromTranslate(legendItem(1).attr('transform')).y).toBeWithinDelta(18, 2);
|
45
|
+
expect(coordsFromTranslate(legendItem(2).attr('transform')).y).toBeWithinDelta(36, 4);
|
46
|
+
});
|
47
|
+
});
|
48
|
+
|
49
|
+
describe('with .horizontal(true)', function () {
|
50
|
+
beforeEach(function () {
|
51
|
+
chart.legend(dc.legend().horizontal(true));
|
52
|
+
chart.render();
|
53
|
+
});
|
54
|
+
|
55
|
+
it('should place legend items horizontally', function () {
|
56
|
+
expect(coordsFromTranslate(legendItem(0).attr('transform')).x).toBeWithinDelta(0, 1);
|
57
|
+
expect(coordsFromTranslate(legendItem(1).attr('transform')).x).toBeWithinDelta(65, 5);
|
58
|
+
expect(coordsFromTranslate(legendItem(2).attr('transform')).x).toBeWithinDelta(155, 15);
|
59
|
+
});
|
60
|
+
});
|
61
|
+
|
62
|
+
describe('with .horizontal(true) and defined legendWidth and itemWidth', function () {
|
63
|
+
beforeEach(function () {
|
64
|
+
chart.legend(dc.legend().horizontal(true).legendWidth(60).itemWidth(30));
|
65
|
+
chart.render();
|
66
|
+
});
|
67
|
+
|
68
|
+
it('should place legend items in two columns. third item is new row', function () {
|
69
|
+
expect(coordsFromTranslate(legendItem(0).attr('transform')).x).toBeWithinDelta(0, 1);
|
70
|
+
expect(coordsFromTranslate(legendItem(1).attr('transform')).x).toBeWithinDelta(30, 5);
|
71
|
+
expect(coordsFromTranslate(legendItem(2).attr('transform')).x).toBeWithinDelta(0, 1);
|
72
|
+
expect(coordsFromTranslate(legendItem(0).attr('transform')).y).toBeWithinDelta(0, 1);
|
73
|
+
expect(coordsFromTranslate(legendItem(1).attr('transform')).y).toBeWithinDelta(0, 1);
|
74
|
+
expect(coordsFromTranslate(legendItem(2).attr('transform')).y).toBeWithinDelta(13, 5);
|
75
|
+
});
|
76
|
+
});
|
77
|
+
|
78
|
+
describe('with .autoItemWidth not called', function () {
|
79
|
+
beforeEach(function () {
|
80
|
+
chart.legend(dc.legend());
|
81
|
+
});
|
82
|
+
|
83
|
+
it('_autoItemWidth should be false', function () {
|
84
|
+
expect(chart.legend().autoItemWidth()).toBe(false);
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
describe('with .autoItemWidth(false)', function () {
|
89
|
+
beforeEach(function () {
|
90
|
+
chart.legend(dc.legend().autoItemWidth(false));
|
91
|
+
});
|
92
|
+
|
93
|
+
it('_autoItemWidth should be false', function () {
|
94
|
+
expect(chart.legend().autoItemWidth()).toBe(false);
|
95
|
+
});
|
96
|
+
});
|
97
|
+
|
98
|
+
describe('with .autoItemWidth(true)', function () {
|
99
|
+
beforeEach(function () {
|
100
|
+
chart.legend(dc.legend().autoItemWidth(true));
|
101
|
+
});
|
102
|
+
it('_autoItemWidth should be true', function () {
|
103
|
+
expect(chart.legend().autoItemWidth()).toBe(true);
|
104
|
+
});
|
105
|
+
});
|
106
|
+
|
107
|
+
describe('with .horizontal(true) and .autoItemWidth(true)', function () {
|
108
|
+
|
109
|
+
var
|
110
|
+
autoWidthOffset1, fixedWidthOffset1,
|
111
|
+
autoWidthOffset2, fixedWidthOffset2;
|
112
|
+
|
113
|
+
beforeEach(function () {
|
114
|
+
chart.legend(dc.legend().horizontal(true).itemWidth(30).autoItemWidth(false));
|
115
|
+
chart.render();
|
116
|
+
fixedWidthOffset1 = coordsFromTranslate(legendItem(1).attr('transform')).x;
|
117
|
+
fixedWidthOffset2 = coordsFromTranslate(legendItem(2).attr('transform')).x;
|
118
|
+
chart.legend(dc.legend().horizontal(true).itemWidth(30).autoItemWidth(true));
|
119
|
+
chart.render();
|
120
|
+
autoWidthOffset1 = coordsFromTranslate(legendItem(1).attr('transform')).x;
|
121
|
+
autoWidthOffset2 = coordsFromTranslate(legendItem(2).attr('transform')).x;
|
122
|
+
});
|
123
|
+
|
124
|
+
it('autoWidth x offset should be greater than fixedWidth x offset for some legend items', function () {
|
125
|
+
expect(autoWidthOffset1).toBeGreaterThan(fixedWidthOffset1);
|
126
|
+
expect(autoWidthOffset2).toBeGreaterThan(fixedWidthOffset2);
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
it('should generate legend item boxes', function () {
|
131
|
+
expect(legendIcon(0).attr('width')).toBeWithinDelta(13,2);
|
132
|
+
expect(legendIcon(0).attr('height')).toBeWithinDelta(13, 2);
|
133
|
+
});
|
134
|
+
|
135
|
+
it('should color the legend item boxes using the chart line colors', function () {
|
136
|
+
expect(legendIcon(0).attr('fill')).toBe('#1f77b4');
|
137
|
+
expect(legendIcon(1).attr('fill')).toBe('#ff7f0e');
|
138
|
+
expect(legendIcon(2).attr('fill')).toBe('#2ca02c');
|
139
|
+
});
|
140
|
+
|
141
|
+
it('should generate a legend label for each chart line', function () {
|
142
|
+
expect(chart.selectAll('g.dc-legend g.dc-legend-item text').size()).toBe(3);
|
143
|
+
});
|
144
|
+
|
145
|
+
it('should position the legend labels', function () {
|
146
|
+
expect(legendLabel(0).attr('x')).toBeWithinDelta(15, 2);
|
147
|
+
expect(legendLabel(0).attr('y')).toBeWithinDelta(13, 2);
|
148
|
+
expect(legendLabel(1).attr('x')).toBeWithinDelta(15, 2);
|
149
|
+
expect(legendLabel(1).attr('y')).toBeWithinDelta(13, 2);
|
150
|
+
expect(legendLabel(2).attr('x')).toBeWithinDelta(15, 2);
|
151
|
+
expect(legendLabel(2).attr('y')).toBeWithinDelta(13, 2);
|
152
|
+
});
|
153
|
+
|
154
|
+
it('should label the legend items with the names of their associated stacks', function () {
|
155
|
+
expect(legendLabel(0).text()).toBe('Id Sum');
|
156
|
+
expect(legendLabel(1).text()).toBe('Value Sum');
|
157
|
+
expect(legendLabel(2).text()).toBe('Fixed');
|
158
|
+
});
|
159
|
+
|
160
|
+
it('not allow hiding stacks be default', function () {
|
161
|
+
legendItem(0).on('click').call(legendItem(0)[0][0], legendItem(0).datum());
|
162
|
+
expect(chart.selectAll('path.line').size()).toBe(3);
|
163
|
+
});
|
164
|
+
|
165
|
+
describe('with .legendText()', function () {
|
166
|
+
beforeEach(function () {
|
167
|
+
chart.legend(dc.legend().legendText(function (d, i) {
|
168
|
+
var _i = i + 1;
|
169
|
+
|
170
|
+
return _i + '. ' + d.name;
|
171
|
+
}));
|
172
|
+
chart.render();
|
173
|
+
});
|
174
|
+
|
175
|
+
it('should label the legend items with the names of their associated stacks', function () {
|
176
|
+
expect(legendLabel(0).text()).toBe('1. Id Sum');
|
177
|
+
expect(legendLabel(1).text()).toBe('2. Value Sum');
|
178
|
+
expect(legendLabel(2).text()).toBe('3. Fixed');
|
179
|
+
});
|
180
|
+
});
|
181
|
+
});
|
182
|
+
|
183
|
+
describe('legends with dashed lines', function () {
|
184
|
+
beforeEach(function () {
|
185
|
+
id = 'legend-chart-dashed';
|
186
|
+
appendChartID(id);
|
187
|
+
chart = dc.compositeChart('#' + id);
|
188
|
+
|
189
|
+
var subChart1 = dc.lineChart(chart);
|
190
|
+
subChart1
|
191
|
+
.dimension(dateDimension)
|
192
|
+
.group(dateIdSumGroup, 'Id Sum')
|
193
|
+
.dashStyle([10,1]);
|
194
|
+
|
195
|
+
var subChart2 = dc.lineChart(chart);
|
196
|
+
subChart2
|
197
|
+
.dimension(dateDimension)
|
198
|
+
.group(dateValueSumGroup, 'Value Sum')
|
199
|
+
.dashStyle([2,1]);
|
200
|
+
|
201
|
+
chart
|
202
|
+
.x(d3.scale.linear().domain([0,20]))
|
203
|
+
.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))
|
204
|
+
.compose([subChart1, subChart2])
|
205
|
+
.render();
|
206
|
+
});
|
207
|
+
|
208
|
+
it('should style legend line correctly', function () {
|
209
|
+
expect(legendLine(0).attr('stroke-dasharray')).toEqualIntList('10,1');
|
210
|
+
expect(legendLine(1).attr('stroke-dasharray')).toEqualIntList('2,1');
|
211
|
+
});
|
212
|
+
});
|
213
|
+
|
214
|
+
describe('legends with hidable stacks', function () {
|
215
|
+
beforeEach(function () {
|
216
|
+
chart.hidableStacks(true).render();
|
217
|
+
});
|
218
|
+
|
219
|
+
describe('clicking on a legend item', function () {
|
220
|
+
beforeEach(function () {
|
221
|
+
legendItem(0).on('click').call(legendItem(0)[0][0], legendItem(0).datum());
|
222
|
+
});
|
223
|
+
|
224
|
+
it('should fade out the legend item', function () {
|
225
|
+
expect(legendItem(0).classed('fadeout')).toBeTruthy();
|
226
|
+
});
|
227
|
+
|
228
|
+
it('should hide its associated stack', function () {
|
229
|
+
expect(chart.selectAll('path.line').size()).toEqual(2);
|
230
|
+
});
|
231
|
+
|
232
|
+
it('disable hover highlighting for that legend item', function () {
|
233
|
+
legendItem(0).on('mouseover')(legendItem(0).datum());
|
234
|
+
expect(d3.select(chart.selectAll('path.line')[0][1]).classed('fadeout')).toBeFalsy();
|
235
|
+
});
|
236
|
+
|
237
|
+
describe('clicking on a faded out legend item', function () {
|
238
|
+
beforeEach(function () {
|
239
|
+
legendItem(0).on('click').call(legendItem(0)[0][0], legendItem(0).datum());
|
240
|
+
});
|
241
|
+
|
242
|
+
it('should unfade the legend item', function () {
|
243
|
+
expect(legendItem(0).classed('fadeout')).toBeFalsy();
|
244
|
+
});
|
245
|
+
|
246
|
+
it('should unfade its associated stack', function () {
|
247
|
+
expect(chart.selectAll('path.line').size()).toEqual(3);
|
248
|
+
});
|
249
|
+
});
|
250
|
+
});
|
251
|
+
});
|
252
|
+
|
253
|
+
function legendItem (n) {
|
254
|
+
return d3.select(chart.selectAll('g.dc-legend g.dc-legend-item')[0][n]);
|
255
|
+
}
|
256
|
+
function legendLabel (n) {
|
257
|
+
return d3.select(chart.selectAll('g.dc-legend g.dc-legend-item text')[0][n]);
|
258
|
+
}
|
259
|
+
function legendIcon (n) {
|
260
|
+
return d3.select(chart.selectAll('g.dc-legend g.dc-legend-item rect')[0][n]);
|
261
|
+
}
|
262
|
+
function legendLine (n) {
|
263
|
+
return d3.select(chart.selectAll('g.dc-legend g.dc-legend-item line')[0][n]);
|
264
|
+
}
|
265
|
+
});
|
266
|
+
|
@@ -0,0 +1,709 @@
|
|
1
|
+
/* global appendChartID, loadDateFixture, makeDate */
|
2
|
+
describe('dc.lineChart', function () {
|
3
|
+
var id, chart, data;
|
4
|
+
var dimension, group;
|
5
|
+
|
6
|
+
beforeEach(function () {
|
7
|
+
data = crossfilter(loadDateFixture());
|
8
|
+
dimension = data.dimension(function (d) { return d3.time.day.utc(d.dd); });
|
9
|
+
group = dimension.group();
|
10
|
+
|
11
|
+
id = 'line-chart';
|
12
|
+
appendChartID(id);
|
13
|
+
|
14
|
+
chart = dc.lineChart('#' + id);
|
15
|
+
chart.dimension(dimension).group(group)
|
16
|
+
.width(1100).height(200)
|
17
|
+
.x(d3.time.scale.utc().domain([makeDate(2012, 1, 1), makeDate(2012, 11, 31)]))
|
18
|
+
.transitionDuration(0);
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('rendering', function () {
|
22
|
+
beforeEach(function () {
|
23
|
+
chart.render();
|
24
|
+
});
|
25
|
+
|
26
|
+
describe('with a specified dash style', function () {
|
27
|
+
beforeEach(function () {
|
28
|
+
chart.dashStyle([3, 1, 1, 1]).render();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('should be dash-dot-dot-dot to match the specified style', function () {
|
32
|
+
expect(chart.selectAll('path.line').attr('stroke-dasharray')).toEqualIntList('3,1,1,1');
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('render data markers', function () {
|
37
|
+
beforeEach(function () {
|
38
|
+
chart.dotRadius(5)
|
39
|
+
.brushOn(false)
|
40
|
+
.renderDataPoints({}).render();
|
41
|
+
|
42
|
+
});
|
43
|
+
|
44
|
+
it('should use default options', function () {
|
45
|
+
chart.selectAll('circle.dot').each(function () {
|
46
|
+
var dot = d3.select(this);
|
47
|
+
expect(dot.style('fill-opacity')).toBeWithinDelta(0.8);
|
48
|
+
expect(dot.style('stroke-opacity')).toBeWithinDelta(0.8);
|
49
|
+
expect(dot.attr('r')).toBe('2');
|
50
|
+
});
|
51
|
+
});
|
52
|
+
|
53
|
+
it('should use supplied options', function () {
|
54
|
+
chart.renderDataPoints({radius: 3, fillOpacity: 1, strokeOpacity: 1})
|
55
|
+
.render();
|
56
|
+
chart.selectAll('circle.dot').each(function () {
|
57
|
+
var dot = d3.select(this);
|
58
|
+
expect(dot.style('fill-opacity')).toBe('1');
|
59
|
+
expect(dot.style('stroke-opacity')).toBe('1');
|
60
|
+
expect(dot.attr('r')).toBe('3');
|
61
|
+
});
|
62
|
+
});
|
63
|
+
|
64
|
+
it('should change the radius on mousemove', function () {
|
65
|
+
chart.selectAll('circle.dot').each(function () {
|
66
|
+
var dot = d3.select(this);
|
67
|
+
dot.on('mousemove').call(this);
|
68
|
+
expect(dot.attr('r')).toBe('5');
|
69
|
+
});
|
70
|
+
});
|
71
|
+
|
72
|
+
it('should revert to original radius on mouseout', function () {
|
73
|
+
chart.selectAll('circle.dot').each(function () {
|
74
|
+
var dot = d3.select(this);
|
75
|
+
dot.on('mousemove').call(this);
|
76
|
+
dot.on('mouseout').call(this);
|
77
|
+
expect(dot.attr('r')).toBe('2');
|
78
|
+
});
|
79
|
+
});
|
80
|
+
|
81
|
+
describe('hiding all data markers', function () {
|
82
|
+
beforeEach(function () {
|
83
|
+
chart.renderDataPoints(false).render();
|
84
|
+
});
|
85
|
+
|
86
|
+
it('should not change the default opacity and radius', function () {
|
87
|
+
chart.selectAll('circle.dot').each(function () {
|
88
|
+
expect(d3.select(this).style('fill-opacity')).toBeWithinDelta(1e-6);
|
89
|
+
expect(d3.select(this).style('stroke-opacity')).toBeWithinDelta(1e-6);
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
it('should not change showing the data point on mousemove', function () {
|
94
|
+
chart.selectAll('circle.dot').each(function () {
|
95
|
+
var dot = d3.select(this);
|
96
|
+
dot.on('mousemove').call(this);
|
97
|
+
expect(dot.style('fill-opacity')).toBeWithinDelta(0.8);
|
98
|
+
expect(dot.style('stroke-opacity')).toBeWithinDelta(0.8);
|
99
|
+
});
|
100
|
+
});
|
101
|
+
|
102
|
+
it('should not change returning to extremely low opacity on hover out', function () {
|
103
|
+
chart.selectAll('circle.dot').each(function () {
|
104
|
+
var dot = d3.select(this);
|
105
|
+
dot.on('mousemove').call(this);
|
106
|
+
dot.on('mouseout').call(this);
|
107
|
+
expect(dot.style('fill-opacity')).toBeWithinDelta(1e-6);
|
108
|
+
expect(dot.style('stroke-opacity')).toBeWithinDelta(1e-6);
|
109
|
+
});
|
110
|
+
});
|
111
|
+
});
|
112
|
+
});
|
113
|
+
|
114
|
+
describe('title rendering', function () {
|
115
|
+
beforeEach(function () {
|
116
|
+
chart.renderTitle(false);
|
117
|
+
chart.render();
|
118
|
+
});
|
119
|
+
|
120
|
+
it('should not render tooltips when boolean flag is false', function () {
|
121
|
+
expect(chart.select('.sub._0 .dc-tooltip._0 .dot').empty()).toBeTruthy();
|
122
|
+
expect(chart.select('.sub._1 .dc-tooltip._0 .dot').empty()).toBeTruthy();
|
123
|
+
});
|
124
|
+
});
|
125
|
+
|
126
|
+
describe('label rendering off', function () {
|
127
|
+
beforeEach(function () {
|
128
|
+
chart.renderLabel(false);
|
129
|
+
chart.render();
|
130
|
+
});
|
131
|
+
|
132
|
+
it('should produce no labels', function () {
|
133
|
+
expect(chart.selectAll('.lineLabel').empty()).toBeTruthy();
|
134
|
+
});
|
135
|
+
});
|
136
|
+
|
137
|
+
describe('label rendering', function () {
|
138
|
+
beforeEach(function () {
|
139
|
+
chart.renderLabel(true);
|
140
|
+
chart.render();
|
141
|
+
});
|
142
|
+
|
143
|
+
it('should generate a label for each datum', lineLabelCount);
|
144
|
+
it('should generate labels with positions corresponding to their data', lineLabelPositions);
|
145
|
+
});
|
146
|
+
|
147
|
+
describe('data point highlights and refs off', function () {
|
148
|
+
beforeEach(function () {
|
149
|
+
chart.title(function (d) { return d.value; });
|
150
|
+
chart.brushOn(false).xyTipsOn(false).render();
|
151
|
+
});
|
152
|
+
it('should not generate per data points', function () {
|
153
|
+
expect(chart.selectAll('circle.dot').size()).toBe(0);
|
154
|
+
});
|
155
|
+
it('should not generate x and y refs', function () {
|
156
|
+
expect(chart.selectAll('path.xRef').size()).toBe(0);
|
157
|
+
expect(chart.selectAll('path.yRef').size()).toBe(0);
|
158
|
+
});
|
159
|
+
});
|
160
|
+
|
161
|
+
describe('data point highlights', function () {
|
162
|
+
beforeEach(function () {
|
163
|
+
chart.title(function (d) { return d.value; });
|
164
|
+
chart.brushOn(false).dotRadius(10).render();
|
165
|
+
});
|
166
|
+
it('should not generate a chart brush', function () {
|
167
|
+
expect(chart.selectAll('g.brush').empty()).toBeTruthy();
|
168
|
+
});
|
169
|
+
|
170
|
+
it('should be generated per data point', function () {
|
171
|
+
expect(chart.selectAll('circle.dot').size()).toBe(6);
|
172
|
+
});
|
173
|
+
|
174
|
+
it('should have configurable radius', function () {
|
175
|
+
chart.selectAll('circle.dot').each(function () {
|
176
|
+
expect(d3.select(this).attr('r')).toBe('10');
|
177
|
+
});
|
178
|
+
});
|
179
|
+
|
180
|
+
it('should be have extremely low opacity by default', function () {
|
181
|
+
chart.selectAll('circle.dot').each(function () {
|
182
|
+
expect(d3.select(this).style('fill-opacity')).toBeWithinDelta(1e-6);
|
183
|
+
expect(d3.select(this).style('stroke-opacity')).toBeWithinDelta(1e-6);
|
184
|
+
});
|
185
|
+
});
|
186
|
+
|
187
|
+
it('should become visible when hovered over', function () {
|
188
|
+
chart.selectAll('circle.dot').each(function () {
|
189
|
+
var dot = d3.select(this);
|
190
|
+
dot.on('mousemove').call(this);
|
191
|
+
expect(dot.style('fill-opacity')).toBeWithinDelta(0.8);
|
192
|
+
expect(dot.style('stroke-opacity')).toBeWithinDelta(0.8);
|
193
|
+
});
|
194
|
+
});
|
195
|
+
|
196
|
+
it('should return to extremely low opacity on hover out', function () {
|
197
|
+
chart.selectAll('circle.dot').each(function () {
|
198
|
+
var dot = d3.select(this);
|
199
|
+
dot.on('mousemove').call(this);
|
200
|
+
dot.on('mouseout').call(this);
|
201
|
+
expect(dot.style('fill-opacity')).toBeWithinDelta(1e-6);
|
202
|
+
expect(dot.style('stroke-opacity')).toBeWithinDelta(1e-6);
|
203
|
+
});
|
204
|
+
});
|
205
|
+
|
206
|
+
it('should render titles on to each circle', function () {
|
207
|
+
chart.selectAll('g._0 circle.dot').each(function (d) {
|
208
|
+
expect(+d3.select(this).select('title').text()).toBe(d.data.value);
|
209
|
+
});
|
210
|
+
});
|
211
|
+
|
212
|
+
describe('ref lines', function () {
|
213
|
+
it('should generate lines that are hidden by default', function () {
|
214
|
+
expect(chart.select('path.xRef').style('display')).toBe('none');
|
215
|
+
expect(chart.select('path.yRef').style('display')).toBe('none');
|
216
|
+
});
|
217
|
+
|
218
|
+
it('should have a stroke dash', function () {
|
219
|
+
expect(chart.selectAll('path.xRef').attr('stroke-dasharray')).toEqualIntList('5,5');
|
220
|
+
expect(chart.selectAll('path.yRef').attr('stroke-dasharray')).toEqualIntList('5,5');
|
221
|
+
});
|
222
|
+
|
223
|
+
describe('when dot is hovered over', function () {
|
224
|
+
describe('for vertical ref lines', function () {
|
225
|
+
var x;
|
226
|
+
beforeEach(function () {
|
227
|
+
var dot = chart.select('circle.dot');
|
228
|
+
dot.on('mousemove').call(dot[0][0]);
|
229
|
+
x = dot.attr('cx');
|
230
|
+
});
|
231
|
+
|
232
|
+
it('shows the ref line from the bottom of the graph', function () {
|
233
|
+
var path = 'M' + x + ' 160 L ' + x + ' 107';
|
234
|
+
expect(chart.select('path.xRef').attr('d')).toMatchPath(path);
|
235
|
+
expect(chart.select('path.xRef').attr('display')).not.toBe('none');
|
236
|
+
});
|
237
|
+
});
|
238
|
+
|
239
|
+
describe('for horizontal ref lines', function () {
|
240
|
+
describe('for a left y-axis chart', function () {
|
241
|
+
var x;
|
242
|
+
beforeEach(function () {
|
243
|
+
var dot = chart.select('circle.dot');
|
244
|
+
dot.on('mousemove').call(dot[0][0]);
|
245
|
+
x = dot.attr('cx');
|
246
|
+
});
|
247
|
+
|
248
|
+
it('shows the ref line on the left', function () {
|
249
|
+
var path = 'M0 107 L ' + x + ' 107';
|
250
|
+
expect(chart.select('path.yRef').attr('d')).toMatchPath(path);
|
251
|
+
expect(chart.select('path.yRef').attr('display')).not.toBe('none');
|
252
|
+
});
|
253
|
+
});
|
254
|
+
|
255
|
+
describe('for a right y-axis chart', function () {
|
256
|
+
var x;
|
257
|
+
beforeEach(function () {
|
258
|
+
chart.useRightYAxis(true).render();
|
259
|
+
var dot = chart.select('circle.dot');
|
260
|
+
dot.on('mousemove').call(dot[0][0]);
|
261
|
+
x = dot.attr('cx');
|
262
|
+
});
|
263
|
+
|
264
|
+
it('shows the ref line on the right', function () {
|
265
|
+
var path = 'M1020 107L' + x + ' 107';
|
266
|
+
expect(chart.select('path.yRef').attr('d')).toMatchPath(path); //"M1020 107L405 107");
|
267
|
+
expect(chart.select('path.yRef').attr('display')).not.toBe('none');
|
268
|
+
});
|
269
|
+
});
|
270
|
+
});
|
271
|
+
});
|
272
|
+
});
|
273
|
+
});
|
274
|
+
|
275
|
+
describe('undefined points', function () {
|
276
|
+
beforeEach(function () {
|
277
|
+
chart.defined(function (d) { return d.x.valueOf() !== makeDate(2012, 5, 10).getTime(); });
|
278
|
+
chart.brushOn(false).render();
|
279
|
+
});
|
280
|
+
|
281
|
+
it('should not show line where not defined', function () {
|
282
|
+
expect(chart.select('path.line').attr('d').indexOf('M', 1)).not.toBe(-1);
|
283
|
+
});
|
284
|
+
|
285
|
+
it('should not draw dots on undefined points', function () {
|
286
|
+
expect(chart.selectAll('.dot').size()).toBe(5);
|
287
|
+
});
|
288
|
+
});
|
289
|
+
|
290
|
+
describe('with chart area enabled', function () {
|
291
|
+
beforeEach(function () {
|
292
|
+
chart.renderArea(true).render();
|
293
|
+
});
|
294
|
+
|
295
|
+
it('should draw the chart line', function () {
|
296
|
+
expect(chart.select('path.line').attr('d')).toMatchPath('M348,107 L390,107 L397,0 L461,107 L488,53 L583,53');
|
297
|
+
});
|
298
|
+
|
299
|
+
it('should draw the chart area', function () {
|
300
|
+
expect(chart.select('path.area').attr('d')).toMatchPath('M348,107 L390,107 L397,0 L461,107 L488,53 L583,' +
|
301
|
+
'53 L583,160 L488,160 L461,160 L397,160 L390,160 L348,160Z');
|
302
|
+
});
|
303
|
+
});
|
304
|
+
|
305
|
+
describe('with an ordinal x domain', function () {
|
306
|
+
beforeEach(function () {
|
307
|
+
var stateDimension = data.dimension(function (d) { return d.state; });
|
308
|
+
var stateGroup = stateDimension.group();
|
309
|
+
|
310
|
+
chart.dimension(stateDimension)
|
311
|
+
.group(stateGroup)
|
312
|
+
.xUnits(dc.units.ordinal)
|
313
|
+
.x(d3.scale.ordinal().domain(['California', 'Colorado', 'Delaware', 'Mississippi', 'Oklahoma', 'Ontario']))
|
314
|
+
.render();
|
315
|
+
});
|
316
|
+
|
317
|
+
it('should automatically disable the brush', function () {
|
318
|
+
expect(chart.brushOn()).toBeFalsy();
|
319
|
+
});
|
320
|
+
|
321
|
+
it('should generate an ordinal path', function () {
|
322
|
+
expect(chart.select('path.line').attr('d')).toMatchPath('M85,0L255,107L425,107L595,53L765,107L935,53');
|
323
|
+
});
|
324
|
+
});
|
325
|
+
|
326
|
+
describe('with stacked data', function () {
|
327
|
+
describe('with positive data', function () {
|
328
|
+
beforeEach(function () {
|
329
|
+
var idGroup = dimension.group().reduceSum(function (d) { return d.id; });
|
330
|
+
var valueGroup = dimension.group().reduceSum(function (d) { return d.value; });
|
331
|
+
|
332
|
+
chart.dimension(dimension)
|
333
|
+
.brushOn(false)
|
334
|
+
.x(d3.time.scale.utc().domain([makeDate(2012, 4, 20), makeDate(2012, 7, 15)]))
|
335
|
+
.group(idGroup, 'stack 0')
|
336
|
+
.title('stack 0', function (d) { return 'stack 0: ' + d.value; })
|
337
|
+
.stack(valueGroup, 'stack 1')
|
338
|
+
.title('stack 1', function (d) { return 'stack 1: ' + d.value; })
|
339
|
+
.stack(valueGroup, 'stack 2')
|
340
|
+
.elasticY(true)
|
341
|
+
.render();
|
342
|
+
});
|
343
|
+
|
344
|
+
it('should render the correct number of lines', function () {
|
345
|
+
expect(chart.selectAll('path.line').size()).toBe(3);
|
346
|
+
});
|
347
|
+
|
348
|
+
it('should set the path for stack 0 line', function () {
|
349
|
+
expect(chart.select('g._0 path.line').attr('d')).toMatchPath('M58 159L222 157L246 150L492 158L597 151L961 153');
|
350
|
+
});
|
351
|
+
|
352
|
+
it('should set the path for stack 1 line', function () {
|
353
|
+
expect(chart.select('g._1 path.line').attr('d')).toMatchPath('M58 134L222 119L246 75L492 133L597 120L961 109');
|
354
|
+
});
|
355
|
+
|
356
|
+
it('should set the path for stack 2 line', function () {
|
357
|
+
expect(chart.select('g._2 path.line').attr('d')).toMatchPath('M58 109L222 81L246 0L492 108L597 89L961 65');
|
358
|
+
});
|
359
|
+
|
360
|
+
it('should have its own title accessor', function () {
|
361
|
+
expect(chart.title()({value: 1})).toBe('stack 0: 1');
|
362
|
+
expect(chart.title('stack 0')({value: 2})).toBe('stack 0: 2');
|
363
|
+
expect(chart.title('stack 1')({value: 3})).toBe('stack 1: 3');
|
364
|
+
});
|
365
|
+
|
366
|
+
it('should have titles rendered for extra stacks', function () {
|
367
|
+
chart.selectAll('g._1 circle.dot').each(function (d) {
|
368
|
+
expect(d3.select(this).select('title').text()).toBe('stack 1: ' + d.data.value);
|
369
|
+
});
|
370
|
+
});
|
371
|
+
|
372
|
+
it('should default to first stack title for untitled stacks', function () {
|
373
|
+
chart.selectAll('g._2 circle.dot').each(function (d) {
|
374
|
+
expect(d3.select(this).select('title').text()).toBe('stack 0: ' + d.data.value);
|
375
|
+
});
|
376
|
+
});
|
377
|
+
|
378
|
+
describe('with chart area enabled', function () {
|
379
|
+
beforeEach(function () {
|
380
|
+
chart.renderArea(true).render();
|
381
|
+
});
|
382
|
+
|
383
|
+
it('should render the correct number of areas', function () {
|
384
|
+
expect(chart.selectAll('path.area').size()).toBe(3);
|
385
|
+
});
|
386
|
+
|
387
|
+
it('should set the area for stack 0', function () {
|
388
|
+
expect(chart.select('g._0 path.area').attr('d')).toMatchPath('M58 159L222 157L246 150L492 158L597 ' +
|
389
|
+
'151L961 153L961 160L597 160L492 160L246 160L222 160L58 160Z');
|
390
|
+
});
|
391
|
+
|
392
|
+
it('should set the area for stack 1', function () {
|
393
|
+
expect(chart.select('g._1 path.area').attr('d')).toMatchPath('M58 134L222 119L246 75L492 133L597 ' +
|
394
|
+
'120L961 109L961 153L597 151L492 158L246 150L222 157L58 159Z');
|
395
|
+
});
|
396
|
+
|
397
|
+
it('should set the area for stack 2', function () {
|
398
|
+
expect(chart.select('g._2 path.area').attr('d')).toMatchPath('M58 109L222 81L246 0L492 108L597 89L961 ' +
|
399
|
+
'65L961 109L597 120L492 133L246 75L222 119L58 134Z');
|
400
|
+
});
|
401
|
+
|
402
|
+
it('should draw tooltip dots on top of paths and areas', function () {
|
403
|
+
var list = chart.selectAll('circle.dot, path.line, path.area');
|
404
|
+
|
405
|
+
var indexOfLastLine = list[0].indexOf(list.filter('path.line')[0][2]);
|
406
|
+
var indexOfLastArea = list[0].indexOf(list.filter('path.area')[0][2]);
|
407
|
+
var indexOfDot = list[0].indexOf(list.filter('circle.dot')[0][0]);
|
408
|
+
|
409
|
+
expect(indexOfDot).toBeGreaterThan(indexOfLastArea);
|
410
|
+
expect(indexOfDot).toBeGreaterThan(indexOfLastLine);
|
411
|
+
});
|
412
|
+
|
413
|
+
it('should draw tooltip ref lines on top of paths', function () {
|
414
|
+
var list = chart.selectAll('path.yRef, path.xRef, path.line, path.area');
|
415
|
+
|
416
|
+
var indexOfLastLine = list[0].indexOf(list.filter('path.line')[0][2]);
|
417
|
+
var indexOfLastArea = list[0].indexOf(list.filter('path.area')[0][2]);
|
418
|
+
|
419
|
+
var indexOfFirstYRef = list[0].indexOf(list.filter('path.yRef')[0][0]);
|
420
|
+
var indexOfFirstXRef = list[0].indexOf(list.filter('path.xRef')[0][0]);
|
421
|
+
|
422
|
+
expect(indexOfLastLine).toBeLessThan(indexOfFirstXRef);
|
423
|
+
expect(indexOfLastLine).toBeLessThan(indexOfFirstYRef);
|
424
|
+
|
425
|
+
expect(indexOfLastArea).toBeLessThan(indexOfFirstXRef);
|
426
|
+
expect(indexOfLastArea).toBeLessThan(indexOfFirstYRef);
|
427
|
+
});
|
428
|
+
|
429
|
+
});
|
430
|
+
|
431
|
+
describe('stack hiding', function () {
|
432
|
+
describe('first stack', function () {
|
433
|
+
beforeEach(function () {
|
434
|
+
chart.hideStack('stack 0').render();
|
435
|
+
});
|
436
|
+
|
437
|
+
it('should hide the stack', function () {
|
438
|
+
expect(chart.select('g._0 path.line').attr('d')).toMatchPath('M58 133L222 120L246 80L492 133L597 127L961 113');
|
439
|
+
});
|
440
|
+
|
441
|
+
it('should show the stack', function () {
|
442
|
+
chart.showStack('stack 0').render();
|
443
|
+
expect(chart.select('g._0 path.line').attr('d')).toMatchPath('M58 159L222 157L246 150L492 158L597 151L961 153');
|
444
|
+
});
|
445
|
+
});
|
446
|
+
|
447
|
+
describe('any other stack', function () {
|
448
|
+
beforeEach(function () {
|
449
|
+
chart.title('stack 2', function (d) { return 'stack 2: ' + d.value; });
|
450
|
+
chart.hideStack('stack 1').render();
|
451
|
+
});
|
452
|
+
|
453
|
+
it('should hide the stack', function () {
|
454
|
+
expect(chart.select('g._1 path.line').attr('d')).toMatchPath('M58 112L222 83L246 0L492 108L597 85L961 64');
|
455
|
+
});
|
456
|
+
|
457
|
+
it('should show the stack', function () {
|
458
|
+
chart.showStack('stack 1').render();
|
459
|
+
expect(chart.select('g._1 path.line').attr('d')).toMatchPath('M58 134L222 119L246 75L492 133L597 120L961 109');
|
460
|
+
});
|
461
|
+
|
462
|
+
it('should color chart dots the same as line paths', function () {
|
463
|
+
var lineColor = chart.select('g._1 path.line').attr('stroke');
|
464
|
+
var circleColor = chart.select('g._1 circle.dot').attr('fill');
|
465
|
+
expect(lineColor).toEqual(circleColor);
|
466
|
+
});
|
467
|
+
|
468
|
+
it('should still show the title for a visible stack', function () {
|
469
|
+
chart.selectAll('g._1 circle.dot').each(function (d) {
|
470
|
+
expect(d3.select(this).select('title').text()).toBe('stack 2: ' + d.data.value);
|
471
|
+
});
|
472
|
+
});
|
473
|
+
});
|
474
|
+
|
475
|
+
describe('hiding all the stacks', function () {
|
476
|
+
beforeEach(function () {
|
477
|
+
chart.hideStack('stack 0')
|
478
|
+
.hideStack('stack 1')
|
479
|
+
.hideStack('stack 2')
|
480
|
+
.render();
|
481
|
+
});
|
482
|
+
|
483
|
+
it('should show a blank graph', function () {
|
484
|
+
expect(chart.selectAll('path.line').size()).toBe(0);
|
485
|
+
});
|
486
|
+
});
|
487
|
+
});
|
488
|
+
|
489
|
+
describe('label rendering', function () {
|
490
|
+
beforeEach(function () {
|
491
|
+
chart.renderLabel(true);
|
492
|
+
chart.render();
|
493
|
+
});
|
494
|
+
|
495
|
+
it('should generate a label for each datum', lineLabelCount);
|
496
|
+
it('should generate labels with positions corresponding to their data', lineLabelPositions);
|
497
|
+
});
|
498
|
+
});
|
499
|
+
|
500
|
+
describe('with negative data', function () {
|
501
|
+
beforeEach(function () {
|
502
|
+
var negativeGroup = dimension.group().reduceSum(function (d) { return d.nvalue; });
|
503
|
+
|
504
|
+
chart.group(negativeGroup).stack(negativeGroup).stack(negativeGroup);
|
505
|
+
chart.x(d3.time.scale.utc().domain([makeDate(2012, 4, 20), makeDate(2012, 7, 15)]));
|
506
|
+
|
507
|
+
chart.margins({top: 30, right: 50, bottom: 30, left: 30})
|
508
|
+
.renderArea(true)
|
509
|
+
.yAxisPadding(5)
|
510
|
+
.elasticY(true)
|
511
|
+
.yAxis().ticks(5);
|
512
|
+
|
513
|
+
chart.render();
|
514
|
+
});
|
515
|
+
|
516
|
+
it('should generate a line and area for each stack', function () {
|
517
|
+
expect(chart.selectAll('path.line').size()).toBe(3);
|
518
|
+
expect(chart.selectAll('path.area').size()).toBe(3);
|
519
|
+
});
|
520
|
+
|
521
|
+
it('should generate negative lines and area for stack 0', function () {
|
522
|
+
expect(chart.select('g._0 path.line').attr('d')).toMatchPath('M58 81L222 81L246 92L492 79L597 52L961 67');
|
523
|
+
expect(chart.select('g._0 path.area').attr('d')).toMatchPath('M58 81L222 81L246 92L492 79L597 52L961 ' +
|
524
|
+
'67L961 73L597 73L492 73L246 73L222 73L58 73Z');
|
525
|
+
});
|
526
|
+
|
527
|
+
it('should generate negative lines and area for stack 1', function () {
|
528
|
+
expect(chart.select('g._1 path.line').attr('d')).toMatchPath('M58 88L222 88L246 111L492 84L597 31L961 61');
|
529
|
+
expect(chart.select('g._1 path.area').attr('d')).toMatchPath('M58 88L222 88L246 111L492 84L597 31L961 ' +
|
530
|
+
'61L961 67L597 52L492 79L246 92L222 81L58 81Z');
|
531
|
+
});
|
532
|
+
|
533
|
+
it('should generate y axis domain dynamically', function () {
|
534
|
+
var nthText = function (n) { return d3.select(chart.selectAll('g.y text')[0][n]); };
|
535
|
+
|
536
|
+
expect(nthText(0).text()).toBe('-20');
|
537
|
+
expect(nthText(1).text()).toBe('0');
|
538
|
+
expect(nthText(2).text()).toBe('20');
|
539
|
+
});
|
540
|
+
|
541
|
+
describe('label rendering', function () {
|
542
|
+
beforeEach(function () {
|
543
|
+
chart.renderLabel(true);
|
544
|
+
chart.render();
|
545
|
+
});
|
546
|
+
|
547
|
+
it('should generate a label for each datum', lineLabelCount);
|
548
|
+
it('should generate labels with positions corresponding to their data', lineLabelPositions);
|
549
|
+
});
|
550
|
+
});
|
551
|
+
});
|
552
|
+
|
553
|
+
describe('legend hovering', function () {
|
554
|
+
var firstItem;
|
555
|
+
|
556
|
+
beforeEach(function () {
|
557
|
+
chart.stack(group)
|
558
|
+
.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))
|
559
|
+
.renderArea(true)
|
560
|
+
.render();
|
561
|
+
|
562
|
+
firstItem = chart.select('g.dc-legend g.dc-legend-item');
|
563
|
+
firstItem.on('mouseover')(firstItem.datum());
|
564
|
+
});
|
565
|
+
|
566
|
+
describe('when a legend item is hovered over', function () {
|
567
|
+
it('should highlight corresponding lines and areas', function () {
|
568
|
+
expect(nthLine(0).classed('highlight')).toBeTruthy();
|
569
|
+
expect(nthArea(0).classed('highlight')).toBeTruthy();
|
570
|
+
});
|
571
|
+
|
572
|
+
it('should fade out non-corresponding lines and areas', function () {
|
573
|
+
expect(nthLine(1).classed('fadeout')).toBeTruthy();
|
574
|
+
expect(nthArea(1).classed('fadeout')).toBeTruthy();
|
575
|
+
});
|
576
|
+
});
|
577
|
+
|
578
|
+
describe('when a legend item is hovered out', function () {
|
579
|
+
it('should remove highlighting from corresponding lines and areas', function () {
|
580
|
+
firstItem.on('mouseout')(firstItem.datum());
|
581
|
+
expect(nthLine(0).classed('highlight')).toBeFalsy();
|
582
|
+
expect(nthArea(0).classed('highlight')).toBeFalsy();
|
583
|
+
});
|
584
|
+
|
585
|
+
it('should fade in non-corresponding lines and areas', function () {
|
586
|
+
firstItem.on('mouseout')(firstItem.datum());
|
587
|
+
expect(nthLine(1).classed('fadeout')).toBeFalsy();
|
588
|
+
expect(nthArea(1).classed('fadeout')).toBeFalsy();
|
589
|
+
});
|
590
|
+
});
|
591
|
+
|
592
|
+
function nthLine (n) {
|
593
|
+
return d3.select(chart.selectAll('path.line')[0][n]);
|
594
|
+
}
|
595
|
+
|
596
|
+
function nthArea (n) {
|
597
|
+
return d3.select(chart.selectAll('path.area')[0][n]);
|
598
|
+
}
|
599
|
+
});
|
600
|
+
|
601
|
+
describe('filtering', function () {
|
602
|
+
beforeEach(function () {
|
603
|
+
chart.filter([makeDate(2012, 5, 1), makeDate(2012, 5, 30)]).redraw();
|
604
|
+
});
|
605
|
+
|
606
|
+
it('should set the chart filter', function () {
|
607
|
+
expect(chart.filter()).toEqual([makeDate(2012, 5, 1), makeDate(2012, 5, 30)]);
|
608
|
+
});
|
609
|
+
|
610
|
+
it('should set the filter printer', function () {
|
611
|
+
expect(chart.filterPrinter()).not.toBeNull();
|
612
|
+
});
|
613
|
+
|
614
|
+
it('should not generate tooltip circles with the default brush', function () {
|
615
|
+
expect(chart.selectAll('circle.dot').empty()).toBeTruthy();
|
616
|
+
});
|
617
|
+
|
618
|
+
describe('when a brush is defined', function () {
|
619
|
+
it('should position the brush with an offset', function () {
|
620
|
+
expect(chart.select('g.brush').attr('transform')).toMatchTranslate(chart.margins().left, 10);
|
621
|
+
});
|
622
|
+
|
623
|
+
it('should create a fancy brush resize handle', function () {
|
624
|
+
chart.select('g.brush').selectAll('.resize path').each(function (d, i) {
|
625
|
+
if (i === 0) {
|
626
|
+
expect(d3.select(this).attr('d'))
|
627
|
+
.toMatchPath('M0.5,53 A6,6 0 0 1 6.5,59 V100 A6,6 0 0 1 0.5,106 ZM2.5,61 V98 M4.5,61 V98');
|
628
|
+
} else {
|
629
|
+
expect(d3.select(this).attr('d'))
|
630
|
+
.toMatchPath('M-0.5,53 A6,6 0 0 0 -6.5,59 V100 A6,6 0 0 0 -0.5,106 ZM-2.5,61 V98 M-4.5,61 V98');
|
631
|
+
}
|
632
|
+
});
|
633
|
+
});
|
634
|
+
|
635
|
+
it('should stretch the background', function () {
|
636
|
+
expect(chart.select('g.brush rect.background').attr('width')).toBe('1020');
|
637
|
+
});
|
638
|
+
|
639
|
+
it('should set the background height to the chart height', function () {
|
640
|
+
expect(chart.select('g.brush rect.background').attr('height')).toBe('160');
|
641
|
+
});
|
642
|
+
|
643
|
+
it('should set extent height to the chart height', function () {
|
644
|
+
expect(chart.select('g.brush rect.extent').attr('height')).toBe('160');
|
645
|
+
});
|
646
|
+
|
647
|
+
it('should set extent width based on filter set', function () {
|
648
|
+
expect(chart.select('g.brush rect.extent').attr('width')).toBeWithinDelta(88, 1);
|
649
|
+
});
|
650
|
+
|
651
|
+
it('should not have an area path', function () {
|
652
|
+
expect(chart.selectAll('path.area').empty()).toBeTruthy();
|
653
|
+
});
|
654
|
+
|
655
|
+
it('should set the dash style to solid', function () {
|
656
|
+
expect(chart.selectAll('path.line').attr('stroke-dasharray')).toBeNull();
|
657
|
+
});
|
658
|
+
});
|
659
|
+
});
|
660
|
+
describe('changing data', function () {
|
661
|
+
var stateDimension;
|
662
|
+
beforeEach(function () {
|
663
|
+
chart.brushOn(false)
|
664
|
+
.title(function (d) { return d.value; })
|
665
|
+
.render();
|
666
|
+
stateDimension = data.dimension(function (d) { return d.state; });
|
667
|
+
stateDimension.filter('CA');
|
668
|
+
chart.redraw();
|
669
|
+
});
|
670
|
+
|
671
|
+
it('should update dot titles', function () {
|
672
|
+
chart.selectAll('g._0 circle.dot').each(function (d) {
|
673
|
+
expect(d3.select(this).select('title').size()).toBe(1);
|
674
|
+
expect(+d3.select(this).select('title').text()).toBe(d.data.value);
|
675
|
+
});
|
676
|
+
});
|
677
|
+
|
678
|
+
afterEach(function () {
|
679
|
+
stateDimension.filter(null);
|
680
|
+
});
|
681
|
+
});
|
682
|
+
});
|
683
|
+
describe('change color', function () {
|
684
|
+
beforeEach(function () {
|
685
|
+
chart.brushOn(false)
|
686
|
+
.ordinalColors(['#FF0000'])
|
687
|
+
.colorAccessor(function () { return 0; })
|
688
|
+
.render();
|
689
|
+
});
|
690
|
+
it('updates dot colors', function () {
|
691
|
+
expect(chart.select('circle.dot')[0][0].attributes.fill.value).toMatch(/#FF0000/i);
|
692
|
+
});
|
693
|
+
});
|
694
|
+
|
695
|
+
function lineLabelCount () {
|
696
|
+
expect(chart.selectAll('text.lineLabel').size()).toBe(chart.stack().length * chart.group().all().length);
|
697
|
+
}
|
698
|
+
|
699
|
+
function lineLabelPositions () {
|
700
|
+
var LABEL_PADDING = 3;
|
701
|
+
chart.selectAll('.stack')[0].forEach(function (stack, i) {
|
702
|
+
d3.select(stack).selectAll('text.lineLabel')[0].forEach(function (lineLabel, j) {
|
703
|
+
expect(+d3.select(lineLabel).attr('x')).toBeCloseTo(chart.x()(chart.data()[i].values[j].x));
|
704
|
+
expect(+d3.select(lineLabel).attr('y') + LABEL_PADDING).toBeCloseTo(chart.y()(chart.data()[i].values[j].y +
|
705
|
+
chart.data()[i].values[j].y0));
|
706
|
+
});
|
707
|
+
});
|
708
|
+
}
|
709
|
+
});
|