mdarray-sol 0.1.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,685 @@
|
|
|
1
|
+
//# dc.js Getting Started and How-To Guide
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/* jshint globalstrict: true */
|
|
5
|
+
/* global dc,d3,crossfilter,colorbrewer */
|
|
6
|
+
|
|
7
|
+
// ### Create Chart Objects
|
|
8
|
+
|
|
9
|
+
// Create chart objects associated with the container elements identified by the css selector.
|
|
10
|
+
// Note: It is often a good idea to have these objects accessible at the global scope so that they can be modified or
|
|
11
|
+
// filtered by other page controls.
|
|
12
|
+
var gainOrLossChart = dc.pieChart('#gain-loss-chart');
|
|
13
|
+
var fluctuationChart = dc.barChart('#fluctuation-chart');
|
|
14
|
+
var quarterChart = dc.pieChart('#quarter-chart');
|
|
15
|
+
var dayOfWeekChart = dc.rowChart('#day-of-week-chart');
|
|
16
|
+
var moveChart = dc.lineChart('#monthly-move-chart');
|
|
17
|
+
var volumeChart = dc.barChart('#monthly-volume-chart');
|
|
18
|
+
var yearlyBubbleChart = dc.bubbleChart('#yearly-bubble-chart');
|
|
19
|
+
var nasdaqCount = dc.dataCount('.dc-data-count');
|
|
20
|
+
var nasdaqTable = dc.dataTable('.dc-data-table');
|
|
21
|
+
|
|
22
|
+
// ### Anchor Div for Charts
|
|
23
|
+
/*
|
|
24
|
+
// A div anchor that can be identified by id
|
|
25
|
+
<div id='your-chart'></div>
|
|
26
|
+
// Title or anything you want to add above the chart
|
|
27
|
+
<div id='chart'><span>Days by Gain or Loss</span></div>
|
|
28
|
+
// ##### .turnOnControls()
|
|
29
|
+
|
|
30
|
+
// If a link with css class `reset` is present then the chart
|
|
31
|
+
// will automatically hide/show it based on whether there is a filter
|
|
32
|
+
// set on the chart (e.g. slice selection for pie chart and brush
|
|
33
|
+
// selection for bar chart). Enable this with `chart.turnOnControls(true)`
|
|
34
|
+
|
|
35
|
+
// dc.js >=2.1 uses `visibility: hidden` to hide/show controls without
|
|
36
|
+
// disrupting the layout. To return the old `display: none` behavior,
|
|
37
|
+
// set `chart.controlsUseVisibility(false)` and use that style instead.
|
|
38
|
+
<div id='chart'>
|
|
39
|
+
<a class='reset'
|
|
40
|
+
href='javascript:myChart.filterAll();dc.redrawAll();'
|
|
41
|
+
style='visibility: hidden;'>reset</a>
|
|
42
|
+
</div>
|
|
43
|
+
// dc.js will also automatically inject the current filter value into
|
|
44
|
+
// any html element with its css class set to `filter`
|
|
45
|
+
<div id='chart'>
|
|
46
|
+
<span class='reset' style='visibility: hidden;'>
|
|
47
|
+
Current filter: <span class='filter'></span>
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
//### Load your data
|
|
53
|
+
|
|
54
|
+
//Data can be loaded through regular means with your
|
|
55
|
+
//favorite javascript library
|
|
56
|
+
//
|
|
57
|
+
//```javascript
|
|
58
|
+
//d3.csv('data.csv', function(data) {...});
|
|
59
|
+
//d3.json('data.json', function(data) {...});
|
|
60
|
+
//jQuery.getJson('data.json', function(data){...});
|
|
61
|
+
//```
|
|
62
|
+
d3.csv('ndx.csv', function (data) {
|
|
63
|
+
// Since its a csv file we need to format the data a bit.
|
|
64
|
+
var dateFormat = d3.time.format('%m/%d/%Y');
|
|
65
|
+
var numberFormat = d3.format('.2f');
|
|
66
|
+
|
|
67
|
+
data.forEach(function (d) {
|
|
68
|
+
d.dd = dateFormat.parse(d.date);
|
|
69
|
+
d.month = d3.time.month(d.dd); // pre-calculate month for better performance
|
|
70
|
+
d.close = +d.close; // coerce to number
|
|
71
|
+
d.open = +d.open;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
//### Create Crossfilter Dimensions and Groups
|
|
75
|
+
|
|
76
|
+
//See the [crossfilter API](https://github.com/square/crossfilter/wiki/API-Reference) for reference.
|
|
77
|
+
var ndx = crossfilter(data);
|
|
78
|
+
var all = ndx.groupAll();
|
|
79
|
+
|
|
80
|
+
// Dimension by year
|
|
81
|
+
var yearlyDimension = ndx.dimension(function (d) {
|
|
82
|
+
return d3.time.year(d.dd).getFullYear();
|
|
83
|
+
});
|
|
84
|
+
// Maintain running tallies by year as filters are applied or removed
|
|
85
|
+
var yearlyPerformanceGroup = yearlyDimension.group().reduce(
|
|
86
|
+
/* callback for when data is added to the current filter results */
|
|
87
|
+
function (p, v) {
|
|
88
|
+
++p.count;
|
|
89
|
+
p.absGain += v.close - v.open;
|
|
90
|
+
p.fluctuation += Math.abs(v.close - v.open);
|
|
91
|
+
p.sumIndex += (v.open + v.close) / 2;
|
|
92
|
+
p.avgIndex = p.sumIndex / p.count;
|
|
93
|
+
p.percentageGain = p.avgIndex ? (p.absGain / p.avgIndex) * 100 : 0;
|
|
94
|
+
p.fluctuationPercentage = p.avgIndex ? (p.fluctuation / p.avgIndex) * 100 : 0;
|
|
95
|
+
return p;
|
|
96
|
+
},
|
|
97
|
+
/* callback for when data is removed from the current filter results */
|
|
98
|
+
function (p, v) {
|
|
99
|
+
--p.count;
|
|
100
|
+
p.absGain -= v.close - v.open;
|
|
101
|
+
p.fluctuation -= Math.abs(v.close - v.open);
|
|
102
|
+
p.sumIndex -= (v.open + v.close) / 2;
|
|
103
|
+
p.avgIndex = p.count ? p.sumIndex / p.count : 0;
|
|
104
|
+
p.percentageGain = p.avgIndex ? (p.absGain / p.avgIndex) * 100 : 0;
|
|
105
|
+
p.fluctuationPercentage = p.avgIndex ? (p.fluctuation / p.avgIndex) * 100 : 0;
|
|
106
|
+
return p;
|
|
107
|
+
},
|
|
108
|
+
/* initialize p */
|
|
109
|
+
function () {
|
|
110
|
+
return {
|
|
111
|
+
count: 0,
|
|
112
|
+
absGain: 0,
|
|
113
|
+
fluctuation: 0,
|
|
114
|
+
fluctuationPercentage: 0,
|
|
115
|
+
sumIndex: 0,
|
|
116
|
+
avgIndex: 0,
|
|
117
|
+
percentageGain: 0
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
// Dimension by full date
|
|
123
|
+
var dateDimension = ndx.dimension(function (d) {
|
|
124
|
+
return d.dd;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// Dimension by month
|
|
128
|
+
var moveMonths = ndx.dimension(function (d) {
|
|
129
|
+
return d.month;
|
|
130
|
+
});
|
|
131
|
+
// Group by total movement within month
|
|
132
|
+
var monthlyMoveGroup = moveMonths.group().reduceSum(function (d) {
|
|
133
|
+
return Math.abs(d.close - d.open);
|
|
134
|
+
});
|
|
135
|
+
// Group by total volume within move, and scale down result
|
|
136
|
+
var volumeByMonthGroup = moveMonths.group().reduceSum(function (d) {
|
|
137
|
+
return d.volume / 500000;
|
|
138
|
+
});
|
|
139
|
+
var indexAvgByMonthGroup = moveMonths.group().reduce(
|
|
140
|
+
function (p, v) {
|
|
141
|
+
++p.days;
|
|
142
|
+
p.total += (v.open + v.close) / 2;
|
|
143
|
+
p.avg = Math.round(p.total / p.days);
|
|
144
|
+
return p;
|
|
145
|
+
},
|
|
146
|
+
function (p, v) {
|
|
147
|
+
--p.days;
|
|
148
|
+
p.total -= (v.open + v.close) / 2;
|
|
149
|
+
p.avg = p.days ? Math.round(p.total / p.days) : 0;
|
|
150
|
+
return p;
|
|
151
|
+
},
|
|
152
|
+
function () {
|
|
153
|
+
return {days: 0, total: 0, avg: 0};
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
// Create categorical dimension
|
|
158
|
+
var gainOrLoss = ndx.dimension(function (d) {
|
|
159
|
+
return d.open > d.close ? 'Loss' : 'Gain';
|
|
160
|
+
});
|
|
161
|
+
// Produce counts records in the dimension
|
|
162
|
+
var gainOrLossGroup = gainOrLoss.group();
|
|
163
|
+
|
|
164
|
+
// Determine a histogram of percent changes
|
|
165
|
+
var fluctuation = ndx.dimension(function (d) {
|
|
166
|
+
return Math.round((d.close - d.open) / d.open * 100);
|
|
167
|
+
});
|
|
168
|
+
var fluctuationGroup = fluctuation.group();
|
|
169
|
+
|
|
170
|
+
// Summarize volume by quarter
|
|
171
|
+
var quarter = ndx.dimension(function (d) {
|
|
172
|
+
var month = d.dd.getMonth();
|
|
173
|
+
if (month <= 2) {
|
|
174
|
+
return 'Q1';
|
|
175
|
+
} else if (month > 2 && month <= 5) {
|
|
176
|
+
return 'Q2';
|
|
177
|
+
} else if (month > 5 && month <= 8) {
|
|
178
|
+
return 'Q3';
|
|
179
|
+
} else {
|
|
180
|
+
return 'Q4';
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
var quarterGroup = quarter.group().reduceSum(function (d) {
|
|
184
|
+
return d.volume;
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Counts per weekday
|
|
188
|
+
var dayOfWeek = ndx.dimension(function (d) {
|
|
189
|
+
var day = d.dd.getDay();
|
|
190
|
+
var name = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
191
|
+
return day + '.' + name[day];
|
|
192
|
+
});
|
|
193
|
+
var dayOfWeekGroup = dayOfWeek.group();
|
|
194
|
+
|
|
195
|
+
//### Define Chart Attributes
|
|
196
|
+
// Define chart attributes using fluent methods. See the
|
|
197
|
+
// [dc.js API Reference](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md) for more information
|
|
198
|
+
//
|
|
199
|
+
|
|
200
|
+
//#### Bubble Chart
|
|
201
|
+
|
|
202
|
+
//Create a bubble chart and use the given css selector as anchor. You can also specify
|
|
203
|
+
//an optional chart group for this chart to be scoped within. When a chart belongs
|
|
204
|
+
//to a specific group then any interaction with the chart will only trigger redraws
|
|
205
|
+
//on charts within the same chart group.
|
|
206
|
+
// <br>API: [Bubble Chart](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#bubble-chart)
|
|
207
|
+
|
|
208
|
+
yearlyBubbleChart /* dc.bubbleChart('#yearly-bubble-chart', 'chartGroup') */
|
|
209
|
+
// (_optional_) define chart width, `default = 200`
|
|
210
|
+
.width(990)
|
|
211
|
+
// (_optional_) define chart height, `default = 200`
|
|
212
|
+
.height(250)
|
|
213
|
+
// (_optional_) define chart transition duration, `default = 750`
|
|
214
|
+
.transitionDuration(1500)
|
|
215
|
+
.margins({top: 10, right: 50, bottom: 30, left: 40})
|
|
216
|
+
.dimension(yearlyDimension)
|
|
217
|
+
//The bubble chart expects the groups are reduced to multiple values which are used
|
|
218
|
+
//to generate x, y, and radius for each key (bubble) in the group
|
|
219
|
+
.group(yearlyPerformanceGroup)
|
|
220
|
+
// (_optional_) define color function or array for bubbles: [ColorBrewer](http://colorbrewer2.org/)
|
|
221
|
+
.colors(colorbrewer.RdYlGn[9])
|
|
222
|
+
//(optional) define color domain to match your data domain if you want to bind data or color
|
|
223
|
+
.colorDomain([-500, 500])
|
|
224
|
+
//##### Accessors
|
|
225
|
+
|
|
226
|
+
//Accessor functions are applied to each value returned by the grouping
|
|
227
|
+
|
|
228
|
+
// `.colorAccessor` - the returned value will be passed to the `.colors()` scale to determine a fill color
|
|
229
|
+
.colorAccessor(function (d) {
|
|
230
|
+
return d.value.absGain;
|
|
231
|
+
})
|
|
232
|
+
// `.keyAccessor` - the `X` value will be passed to the `.x()` scale to determine pixel location
|
|
233
|
+
.keyAccessor(function (p) {
|
|
234
|
+
return p.value.absGain;
|
|
235
|
+
})
|
|
236
|
+
// `.valueAccessor` - the `Y` value will be passed to the `.y()` scale to determine pixel location
|
|
237
|
+
.valueAccessor(function (p) {
|
|
238
|
+
return p.value.percentageGain;
|
|
239
|
+
})
|
|
240
|
+
// `.radiusValueAccessor` - the value will be passed to the `.r()` scale to determine radius size;
|
|
241
|
+
// by default this maps linearly to [0,100]
|
|
242
|
+
.radiusValueAccessor(function (p) {
|
|
243
|
+
return p.value.fluctuationPercentage;
|
|
244
|
+
})
|
|
245
|
+
.maxBubbleRelativeSize(0.3)
|
|
246
|
+
.x(d3.scale.linear().domain([-2500, 2500]))
|
|
247
|
+
.y(d3.scale.linear().domain([-100, 100]))
|
|
248
|
+
.r(d3.scale.linear().domain([0, 4000]))
|
|
249
|
+
//##### Elastic Scaling
|
|
250
|
+
|
|
251
|
+
//`.elasticY` and `.elasticX` determine whether the chart should rescale each axis to fit the data.
|
|
252
|
+
.elasticY(true)
|
|
253
|
+
.elasticX(true)
|
|
254
|
+
//`.yAxisPadding` and `.xAxisPadding` add padding to data above and below their max values in the same unit
|
|
255
|
+
//domains as the Accessors.
|
|
256
|
+
.yAxisPadding(100)
|
|
257
|
+
.xAxisPadding(500)
|
|
258
|
+
// (_optional_) render horizontal grid lines, `default=false`
|
|
259
|
+
.renderHorizontalGridLines(true)
|
|
260
|
+
// (_optional_) render vertical grid lines, `default=false`
|
|
261
|
+
.renderVerticalGridLines(true)
|
|
262
|
+
// (_optional_) render an axis label below the x axis
|
|
263
|
+
.xAxisLabel('Index Gain')
|
|
264
|
+
// (_optional_) render a vertical axis lable left of the y axis
|
|
265
|
+
.yAxisLabel('Index Gain %')
|
|
266
|
+
//##### Labels and Titles
|
|
267
|
+
|
|
268
|
+
//Labels are displayed on the chart for each bubble. Titles displayed on mouseover.
|
|
269
|
+
// (_optional_) whether chart should render labels, `default = true`
|
|
270
|
+
.renderLabel(true)
|
|
271
|
+
.label(function (p) {
|
|
272
|
+
return p.key;
|
|
273
|
+
})
|
|
274
|
+
// (_optional_) whether chart should render titles, `default = false`
|
|
275
|
+
.renderTitle(true)
|
|
276
|
+
.title(function (p) {
|
|
277
|
+
return [
|
|
278
|
+
p.key,
|
|
279
|
+
'Index Gain: ' + numberFormat(p.value.absGain),
|
|
280
|
+
'Index Gain in Percentage: ' + numberFormat(p.value.percentageGain) + '%',
|
|
281
|
+
'Fluctuation / Index Ratio: ' + numberFormat(p.value.fluctuationPercentage) + '%'
|
|
282
|
+
].join('\n');
|
|
283
|
+
})
|
|
284
|
+
//#### Customize Axes
|
|
285
|
+
|
|
286
|
+
// Set a custom tick format. Both `.yAxis()` and `.xAxis()` return an axis object,
|
|
287
|
+
// so any additional method chaining applies to the axis, not the chart.
|
|
288
|
+
.yAxis().tickFormat(function (v) {
|
|
289
|
+
return v + '%';
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// #### Pie/Donut Charts
|
|
293
|
+
|
|
294
|
+
// Create a pie chart and use the given css selector as anchor. You can also specify
|
|
295
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
296
|
+
// to a specific group then any interaction with such chart will only trigger redraw
|
|
297
|
+
// on other charts within the same chart group.
|
|
298
|
+
// <br>API: [Pie Chart](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#pie-chart)
|
|
299
|
+
|
|
300
|
+
gainOrLossChart /* dc.pieChart('#gain-loss-chart', 'chartGroup') */
|
|
301
|
+
// (_optional_) define chart width, `default = 200`
|
|
302
|
+
.width(180)
|
|
303
|
+
// (optional) define chart height, `default = 200`
|
|
304
|
+
.height(180)
|
|
305
|
+
// Define pie radius
|
|
306
|
+
.radius(80)
|
|
307
|
+
// Set dimension
|
|
308
|
+
.dimension(gainOrLoss)
|
|
309
|
+
// Set group
|
|
310
|
+
.group(gainOrLossGroup)
|
|
311
|
+
// (_optional_) by default pie chart will use `group.key` as its label but you can overwrite it with a closure.
|
|
312
|
+
.label(function (d) {
|
|
313
|
+
if (gainOrLossChart.hasFilter() && !gainOrLossChart.hasFilter(d.key)) {
|
|
314
|
+
return d.key + '(0%)';
|
|
315
|
+
}
|
|
316
|
+
var label = d.key;
|
|
317
|
+
if (all.value()) {
|
|
318
|
+
label += '(' + Math.floor(d.value / all.value() * 100) + '%)';
|
|
319
|
+
}
|
|
320
|
+
return label;
|
|
321
|
+
})
|
|
322
|
+
/*
|
|
323
|
+
// (_optional_) whether chart should render labels, `default = true`
|
|
324
|
+
.renderLabel(true)
|
|
325
|
+
// (_optional_) if inner radius is used then a donut chart will be generated instead of pie chart
|
|
326
|
+
.innerRadius(40)
|
|
327
|
+
// (_optional_) define chart transition duration, `default = 350`
|
|
328
|
+
.transitionDuration(500)
|
|
329
|
+
// (_optional_) define color array for slices
|
|
330
|
+
.colors(['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#dadaeb'])
|
|
331
|
+
// (_optional_) define color domain to match your data domain if you want to bind data or color
|
|
332
|
+
.colorDomain([-1750, 1644])
|
|
333
|
+
// (_optional_) define color value accessor
|
|
334
|
+
.colorAccessor(function(d, i){return d.value;})
|
|
335
|
+
*/;
|
|
336
|
+
|
|
337
|
+
quarterChart /* dc.pieChart('#quarter-chart', 'chartGroup') */
|
|
338
|
+
.width(180)
|
|
339
|
+
.height(180)
|
|
340
|
+
.radius(80)
|
|
341
|
+
.innerRadius(30)
|
|
342
|
+
.dimension(quarter)
|
|
343
|
+
.group(quarterGroup);
|
|
344
|
+
|
|
345
|
+
//#### Row Chart
|
|
346
|
+
|
|
347
|
+
// Create a row chart and use the given css selector as anchor. You can also specify
|
|
348
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
349
|
+
// to a specific group then any interaction with such chart will only trigger redraw
|
|
350
|
+
// on other charts within the same chart group.
|
|
351
|
+
// <br>API: [Row Chart](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#row-chart)
|
|
352
|
+
dayOfWeekChart /* dc.rowChart('#day-of-week-chart', 'chartGroup') */
|
|
353
|
+
.width(180)
|
|
354
|
+
.height(180)
|
|
355
|
+
.margins({top: 20, left: 10, right: 10, bottom: 20})
|
|
356
|
+
.group(dayOfWeekGroup)
|
|
357
|
+
.dimension(dayOfWeek)
|
|
358
|
+
// Assign colors to each value in the x scale domain
|
|
359
|
+
.ordinalColors(['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#dadaeb'])
|
|
360
|
+
.label(function (d) {
|
|
361
|
+
return d.key.split('.')[1];
|
|
362
|
+
})
|
|
363
|
+
// Title sets the row text
|
|
364
|
+
.title(function (d) {
|
|
365
|
+
return d.value;
|
|
366
|
+
})
|
|
367
|
+
.elasticX(true)
|
|
368
|
+
.xAxis().ticks(4);
|
|
369
|
+
|
|
370
|
+
//#### Bar Chart
|
|
371
|
+
|
|
372
|
+
// Create a bar chart and use the given css selector as anchor. You can also specify
|
|
373
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
374
|
+
// to a specific group then any interaction with such chart will only trigger redraw
|
|
375
|
+
// on other charts within the same chart group.
|
|
376
|
+
// <br>API: [Bar Chart](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#bar-chart)
|
|
377
|
+
fluctuationChart /* dc.barChart('#volume-month-chart', 'chartGroup') */
|
|
378
|
+
.width(420)
|
|
379
|
+
.height(180)
|
|
380
|
+
.margins({top: 10, right: 50, bottom: 30, left: 40})
|
|
381
|
+
.dimension(fluctuation)
|
|
382
|
+
.group(fluctuationGroup)
|
|
383
|
+
.elasticY(true)
|
|
384
|
+
// (_optional_) whether bar should be center to its x value. Not needed for ordinal chart, `default=false`
|
|
385
|
+
.centerBar(true)
|
|
386
|
+
// (_optional_) set gap between bars manually in px, `default=2`
|
|
387
|
+
.gap(1)
|
|
388
|
+
// (_optional_) set filter brush rounding
|
|
389
|
+
.round(dc.round.floor)
|
|
390
|
+
.alwaysUseRounding(true)
|
|
391
|
+
.x(d3.scale.linear().domain([-25, 25]))
|
|
392
|
+
.renderHorizontalGridLines(true)
|
|
393
|
+
// Customize the filter displayed in the control span
|
|
394
|
+
.filterPrinter(function (filters) {
|
|
395
|
+
var filter = filters[0], s = '';
|
|
396
|
+
s += numberFormat(filter[0]) + '% -> ' + numberFormat(filter[1]) + '%';
|
|
397
|
+
return s;
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
// Customize axes
|
|
401
|
+
fluctuationChart.xAxis().tickFormat(
|
|
402
|
+
function (v) { return v + '%'; });
|
|
403
|
+
fluctuationChart.yAxis().ticks(5);
|
|
404
|
+
|
|
405
|
+
//#### Stacked Area Chart
|
|
406
|
+
|
|
407
|
+
//Specify an area chart by using a line chart with `.renderArea(true)`.
|
|
408
|
+
// <br>API: [Stack Mixin](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#stack-mixin),
|
|
409
|
+
// [Line Chart](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#line-chart)
|
|
410
|
+
moveChart /* dc.lineChart('#monthly-move-chart', 'chartGroup') */
|
|
411
|
+
.renderArea(true)
|
|
412
|
+
.width(990)
|
|
413
|
+
.height(200)
|
|
414
|
+
.transitionDuration(1000)
|
|
415
|
+
.margins({top: 30, right: 50, bottom: 25, left: 40})
|
|
416
|
+
.dimension(moveMonths)
|
|
417
|
+
.mouseZoomable(true)
|
|
418
|
+
// Specify a "range chart" to link its brush extent with the zoom of the current "focus chart".
|
|
419
|
+
.rangeChart(volumeChart)
|
|
420
|
+
.x(d3.time.scale().domain([new Date(1985, 0, 1), new Date(2012, 11, 31)]))
|
|
421
|
+
.round(d3.time.month.round)
|
|
422
|
+
.xUnits(d3.time.months)
|
|
423
|
+
.elasticY(true)
|
|
424
|
+
.renderHorizontalGridLines(true)
|
|
425
|
+
//##### Legend
|
|
426
|
+
|
|
427
|
+
// Position the legend relative to the chart origin and specify items' height and separation.
|
|
428
|
+
.legend(dc.legend().x(800).y(10).itemHeight(13).gap(5))
|
|
429
|
+
.brushOn(false)
|
|
430
|
+
// Add the base layer of the stack with group. The second parameter specifies a series name for use in the
|
|
431
|
+
// legend.
|
|
432
|
+
// The `.valueAccessor` will be used for the base layer
|
|
433
|
+
.group(indexAvgByMonthGroup, 'Monthly Index Average')
|
|
434
|
+
.valueAccessor(function (d) {
|
|
435
|
+
return d.value.avg;
|
|
436
|
+
})
|
|
437
|
+
// Stack additional layers with `.stack`. The first paramenter is a new group.
|
|
438
|
+
// The second parameter is the series name. The third is a value accessor.
|
|
439
|
+
.stack(monthlyMoveGroup, 'Monthly Index Move', function (d) {
|
|
440
|
+
return d.value;
|
|
441
|
+
})
|
|
442
|
+
// Title can be called by any stack layer.
|
|
443
|
+
.title(function (d) {
|
|
444
|
+
var value = d.value.avg ? d.value.avg : d.value;
|
|
445
|
+
if (isNaN(value)) {
|
|
446
|
+
value = 0;
|
|
447
|
+
}
|
|
448
|
+
return dateFormat(d.key) + '\n' + numberFormat(value);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
//#### Range Chart
|
|
452
|
+
|
|
453
|
+
// Since this bar chart is specified as "range chart" for the area chart, its brush extent
|
|
454
|
+
// will always match the zoom of the area chart.
|
|
455
|
+
volumeChart.width(990) /* dc.barChart('#monthly-volume-chart', 'chartGroup'); */
|
|
456
|
+
.height(40)
|
|
457
|
+
.margins({top: 0, right: 50, bottom: 20, left: 40})
|
|
458
|
+
.dimension(moveMonths)
|
|
459
|
+
.group(volumeByMonthGroup)
|
|
460
|
+
.centerBar(true)
|
|
461
|
+
.gap(1)
|
|
462
|
+
.x(d3.time.scale().domain([new Date(1985, 0, 1), new Date(2012, 11, 31)]))
|
|
463
|
+
.round(d3.time.month.round)
|
|
464
|
+
.alwaysUseRounding(true)
|
|
465
|
+
.xUnits(d3.time.months);
|
|
466
|
+
|
|
467
|
+
//#### Data Count
|
|
468
|
+
|
|
469
|
+
// Create a data count widget and use the given css selector as anchor. You can also specify
|
|
470
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
471
|
+
// to a specific group then any interaction with such chart will only trigger redraw
|
|
472
|
+
// on other charts within the same chart group.
|
|
473
|
+
// <br>API: [Data Count Widget](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#data-count-widget)
|
|
474
|
+
//
|
|
475
|
+
//```html
|
|
476
|
+
//<div class='dc-data-count'>
|
|
477
|
+
// <span class='filter-count'></span>
|
|
478
|
+
// selected out of <span class='total-count'></span> records.
|
|
479
|
+
//</div>
|
|
480
|
+
//```
|
|
481
|
+
|
|
482
|
+
nasdaqCount /* dc.dataCount('.dc-data-count', 'chartGroup'); */
|
|
483
|
+
.dimension(ndx)
|
|
484
|
+
.group(all)
|
|
485
|
+
// (_optional_) `.html` sets different html when some records or all records are selected.
|
|
486
|
+
// `.html` replaces everything in the anchor with the html given using the following function.
|
|
487
|
+
// `%filter-count` and `%total-count` are replaced with the values obtained.
|
|
488
|
+
.html({
|
|
489
|
+
some: '<strong>%filter-count</strong> selected out of <strong>%total-count</strong> records' +
|
|
490
|
+
' | <a href=\'javascript:dc.filterAll(); dc.renderAll();\'>Reset All</a>',
|
|
491
|
+
all: 'All records selected. Please click on the graph to apply filters.'
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
//#### Data Table
|
|
495
|
+
|
|
496
|
+
// Create a data table widget and use the given css selector as anchor. You can also specify
|
|
497
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
498
|
+
// to a specific group then any interaction with such chart will only trigger redraw
|
|
499
|
+
// on other charts within the same chart group.
|
|
500
|
+
// <br>API: [Data Table Widget](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#data-table-widget)
|
|
501
|
+
//
|
|
502
|
+
// You can statically define the headers like in
|
|
503
|
+
//
|
|
504
|
+
// ```html
|
|
505
|
+
// <!-- anchor div for data table -->
|
|
506
|
+
// <div id='data-table'>
|
|
507
|
+
// <!-- create a custom header -->
|
|
508
|
+
// <div class='header'>
|
|
509
|
+
// <span>Date</span>
|
|
510
|
+
// <span>Open</span>
|
|
511
|
+
// <span>Close</span>
|
|
512
|
+
// <span>Change</span>
|
|
513
|
+
// <span>Volume</span>
|
|
514
|
+
// </div>
|
|
515
|
+
// <!-- data rows will filled in here -->
|
|
516
|
+
// </div>
|
|
517
|
+
// ```
|
|
518
|
+
// or do it programmatically using `.columns()`.
|
|
519
|
+
|
|
520
|
+
nasdaqTable /* dc.dataTable('.dc-data-table', 'chartGroup') */
|
|
521
|
+
.dimension(dateDimension)
|
|
522
|
+
// Data table does not use crossfilter group but rather a closure
|
|
523
|
+
// as a grouping function
|
|
524
|
+
.group(function (d) {
|
|
525
|
+
var format = d3.format('02d');
|
|
526
|
+
return d.dd.getFullYear() + '/' + format((d.dd.getMonth() + 1));
|
|
527
|
+
})
|
|
528
|
+
// (_optional_) max number of records to be shown, `default = 25`
|
|
529
|
+
.size(10)
|
|
530
|
+
// There are several ways to specify the columns; see the data-table documentation.
|
|
531
|
+
// This code demonstrates generating the column header automatically based on the columns.
|
|
532
|
+
.columns([
|
|
533
|
+
// Use the `d.date` field; capitalized automatically
|
|
534
|
+
'date',
|
|
535
|
+
// Use `d.open`, `d.close`
|
|
536
|
+
'open',
|
|
537
|
+
'close',
|
|
538
|
+
{
|
|
539
|
+
// Specify a custom format for column 'Change' by using a label with a function.
|
|
540
|
+
label: 'Change',
|
|
541
|
+
format: function (d) {
|
|
542
|
+
return numberFormat(d.close - d.open);
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
// Use `d.volume`
|
|
546
|
+
'volume'
|
|
547
|
+
])
|
|
548
|
+
|
|
549
|
+
// (_optional_) sort using the given field, `default = function(d){return d;}`
|
|
550
|
+
.sortBy(function (d) {
|
|
551
|
+
return d.dd;
|
|
552
|
+
})
|
|
553
|
+
// (_optional_) sort order, `default = d3.ascending`
|
|
554
|
+
.order(d3.ascending)
|
|
555
|
+
// (_optional_) custom renderlet to post-process chart using [D3](http://d3js.org)
|
|
556
|
+
.on('renderlet', function (table) {
|
|
557
|
+
table.selectAll('.dc-table-group').classed('info', true);
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
/*
|
|
561
|
+
//#### Geo Choropleth Chart
|
|
562
|
+
|
|
563
|
+
//Create a choropleth chart and use the given css selector as anchor. You can also specify
|
|
564
|
+
//an optional chart group for this chart to be scoped within. When a chart belongs
|
|
565
|
+
//to a specific group then any interaction with such chart will only trigger redraw
|
|
566
|
+
//on other charts within the same chart group.
|
|
567
|
+
// <br>API: [Geo Chroropleth Chart][choro]
|
|
568
|
+
// [choro]: https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#geo-choropleth-chart
|
|
569
|
+
dc.geoChoroplethChart('#us-chart')
|
|
570
|
+
// (_optional_) define chart width, default 200
|
|
571
|
+
.width(990)
|
|
572
|
+
// (optional) define chart height, default 200
|
|
573
|
+
.height(500)
|
|
574
|
+
// (optional) define chart transition duration, default 1000
|
|
575
|
+
.transitionDuration(1000)
|
|
576
|
+
// set crossfilter dimension, dimension key should match the name retrieved in geojson layer
|
|
577
|
+
.dimension(states)
|
|
578
|
+
// set crossfilter group
|
|
579
|
+
.group(stateRaisedSum)
|
|
580
|
+
// (_optional_) define color function or array for bubbles
|
|
581
|
+
.colors(['#ccc', '#E2F2FF','#C4E4FF','#9ED2FF','#81C5FF','#6BBAFF','#51AEFF','#36A2FF','#1E96FF','#0089FF',
|
|
582
|
+
'#0061B5'])
|
|
583
|
+
// (_optional_) define color domain to match your data domain if you want to bind data or color
|
|
584
|
+
.colorDomain([-5, 200])
|
|
585
|
+
// (_optional_) define color value accessor
|
|
586
|
+
.colorAccessor(function(d, i){return d.value;})
|
|
587
|
+
// Project the given geojson. You can call this function multiple times with different geojson feed to generate
|
|
588
|
+
// multiple layers of geo paths.
|
|
589
|
+
//
|
|
590
|
+
// * 1st param - geojson data
|
|
591
|
+
// * 2nd param - name of the layer which will be used to generate css class
|
|
592
|
+
// * 3rd param - (_optional_) a function used to generate key for geo path, it should match the dimension key
|
|
593
|
+
// in order for the coloring to work properly
|
|
594
|
+
.overlayGeoJson(statesJson.features, 'state', function(d) {
|
|
595
|
+
return d.properties.name;
|
|
596
|
+
})
|
|
597
|
+
// (_optional_) closure to generate title for path, `default = d.key + ': ' + d.value`
|
|
598
|
+
.title(function(d) {
|
|
599
|
+
return 'State: ' + d.key + '\nTotal Amount Raised: ' + numberFormat(d.value ? d.value : 0) + 'M';
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
//#### Bubble Overlay Chart
|
|
603
|
+
|
|
604
|
+
// Create a overlay bubble chart and use the given css selector as anchor. You can also specify
|
|
605
|
+
// an optional chart group for this chart to be scoped within. When a chart belongs
|
|
606
|
+
// to a specific group then any interaction with the chart will only trigger redraw
|
|
607
|
+
// on charts within the same chart group.
|
|
608
|
+
// <br>API: [Bubble Overlay Chart][bubble]
|
|
609
|
+
// [bubble]: https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#bubble-overlay-chart
|
|
610
|
+
dc.bubbleOverlay('#bubble-overlay', 'chartGroup')
|
|
611
|
+
// The bubble overlay chart does not generate its own svg element but rather reuses an existing
|
|
612
|
+
// svg to generate its overlay layer
|
|
613
|
+
.svg(d3.select('#bubble-overlay svg'))
|
|
614
|
+
// (_optional_) define chart width, `default = 200`
|
|
615
|
+
.width(990)
|
|
616
|
+
// (_optional_) define chart height, `default = 200`
|
|
617
|
+
.height(500)
|
|
618
|
+
// (_optional_) define chart transition duration, `default = 1000`
|
|
619
|
+
.transitionDuration(1000)
|
|
620
|
+
// Set crossfilter dimension, dimension key should match the name retrieved in geo json layer
|
|
621
|
+
.dimension(states)
|
|
622
|
+
// Set crossfilter group
|
|
623
|
+
.group(stateRaisedSum)
|
|
624
|
+
// Closure used to retrieve x value from multi-value group
|
|
625
|
+
.keyAccessor(function(p) {return p.value.absGain;})
|
|
626
|
+
// Closure used to retrieve y value from multi-value group
|
|
627
|
+
.valueAccessor(function(p) {return p.value.percentageGain;})
|
|
628
|
+
// (_optional_) define color function or array for bubbles
|
|
629
|
+
.colors(['#ccc', '#E2F2FF','#C4E4FF','#9ED2FF','#81C5FF','#6BBAFF','#51AEFF','#36A2FF','#1E96FF','#0089FF',
|
|
630
|
+
'#0061B5'])
|
|
631
|
+
// (_optional_) define color domain to match your data domain if you want to bind data or color
|
|
632
|
+
.colorDomain([-5, 200])
|
|
633
|
+
// (_optional_) define color value accessor
|
|
634
|
+
.colorAccessor(function(d, i){return d.value;})
|
|
635
|
+
// Closure used to retrieve radius value from multi-value group
|
|
636
|
+
.radiusValueAccessor(function(p) {return p.value.fluctuationPercentage;})
|
|
637
|
+
// set radius scale
|
|
638
|
+
.r(d3.scale.linear().domain([0, 3]))
|
|
639
|
+
// (_optional_) whether chart should render labels, `default = true`
|
|
640
|
+
.renderLabel(true)
|
|
641
|
+
// (_optional_) closure to generate label per bubble, `default = group.key`
|
|
642
|
+
.label(function(p) {return p.key.getFullYear();})
|
|
643
|
+
// (_optional_) whether chart should render titles, `default = false`
|
|
644
|
+
.renderTitle(true)
|
|
645
|
+
// (_optional_) closure to generate title per bubble, `default = d.key + ': ' + d.value`
|
|
646
|
+
.title(function(d) {
|
|
647
|
+
return 'Title: ' + d.key;
|
|
648
|
+
})
|
|
649
|
+
// add data point to its layer dimension key that matches point name: it will be used to
|
|
650
|
+
// generate a bubble. Multiple data points can be added to the bubble overlay to generate
|
|
651
|
+
// multiple bubbles.
|
|
652
|
+
.point('California', 100, 120)
|
|
653
|
+
.point('Colorado', 300, 120)
|
|
654
|
+
// (_optional_) setting debug flag to true will generate a transparent layer on top of
|
|
655
|
+
// bubble overlay which can be used to obtain relative `x`,`y` coordinate for specific
|
|
656
|
+
// data point, `default = false`
|
|
657
|
+
.debug(true);
|
|
658
|
+
*/
|
|
659
|
+
|
|
660
|
+
//#### Rendering
|
|
661
|
+
|
|
662
|
+
//simply call `.renderAll()` to render all charts on the page
|
|
663
|
+
dc.renderAll();
|
|
664
|
+
/*
|
|
665
|
+
// Or you can render charts belonging to a specific chart group
|
|
666
|
+
dc.renderAll('group');
|
|
667
|
+
// Once rendered you can call `.redrawAll()` to update charts incrementally when the data
|
|
668
|
+
// changes, without re-rendering everything
|
|
669
|
+
dc.redrawAll();
|
|
670
|
+
// Or you can choose to redraw only those charts associated with a specific chart group
|
|
671
|
+
dc.redrawAll('group');
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
//#### Versions
|
|
677
|
+
|
|
678
|
+
//Determine the current version of dc with `dc.version`
|
|
679
|
+
d3.selectAll('#version').text(dc.version);
|
|
680
|
+
|
|
681
|
+
// Determine latest stable version in the repo via Github API
|
|
682
|
+
d3.json('https://api.github.com/repos/dc-js/dc.js/releases/latest', function (error, latestRelease) {
|
|
683
|
+
/*jshint camelcase: false */
|
|
684
|
+
d3.selectAll('#latest').text(latestRelease.tag_name); /* jscs:disable */
|
|
685
|
+
});
|