bum 0.0.4 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README +0 -12
- data/bin/bum +16 -49
- data/bin/bum_master +20 -0
- data/lib/actor.rb +0 -0
- data/lib/app_role.rb +83 -0
- data/lib/client.rb +104 -0
- data/lib/db_crap.rb +85 -0
- data/lib/db_role.rb +107 -0
- data/lib/demo_socket.rb +51 -0
- data/lib/master.rb +109 -0
- data/lib/master_web.rb +81 -0
- data/lib/nice_socket.rb +77 -0
- data/lib/node.rb +96 -0
- data/lib/proxy_role.rb +132 -0
- data/lib/role.rb +99 -0
- data/lib/scenario.rb +186 -0
- data/lib/server.rb +30 -0
- data/lib/stats_role.rb +89 -0
- data/public/app.css +91 -0
- data/public/css/light.css +105 -0
- data/public/d3/LICENSE +26 -0
- data/public/d3/Makefile +247 -0
- data/public/d3/README.md +51 -0
- data/public/d3/d3.chart.js +984 -0
- data/public/d3/d3.chart.min.js +1 -0
- data/public/d3/d3.csv.js +92 -0
- data/public/d3/d3.csv.min.js +1 -0
- data/public/d3/d3.geo.js +692 -0
- data/public/d3/d3.geo.min.js +1 -0
- data/public/d3/d3.geom.js +825 -0
- data/public/d3/d3.geom.min.js +1 -0
- data/public/d3/d3.js +4013 -0
- data/public/d3/d3.layout.js +1865 -0
- data/public/d3/d3.layout.min.js +1 -0
- data/public/d3/d3.min.js +2 -0
- data/public/d3/d3.time.js +663 -0
- data/public/d3/d3.time.min.js +1 -0
- data/public/d3/examples/albers/albers.html +168 -0
- data/public/d3/examples/area/area-radial.html +48 -0
- data/public/d3/examples/area/area.html +113 -0
- data/public/d3/examples/axis/axis-alternating.html +50 -0
- data/public/d3/examples/axis/axis-ggplot2.html +68 -0
- data/public/d3/examples/axis/axis-multiples.html +117 -0
- data/public/d3/examples/axis/axis-orientations.html +63 -0
- data/public/d3/examples/axis/axis-transition.html +153 -0
- data/public/d3/examples/azimuthal/azimuthal.css +21 -0
- data/public/d3/examples/azimuthal/azimuthal.html +84 -0
- data/public/d3/examples/azimuthal/azimuthal.js +27 -0
- data/public/d3/examples/bar/bar.html +93 -0
- data/public/d3/examples/box/box.css +4 -0
- data/public/d3/examples/box/box.html +19 -0
- data/public/d3/examples/box/box.js +68 -0
- data/public/d3/examples/bubble/bubble.css +8 -0
- data/public/d3/examples/bubble/bubble.html +14 -0
- data/public/d3/examples/bubble/bubble.js +46 -0
- data/public/d3/examples/bullet/bullet.css +10 -0
- data/public/d3/examples/bullet/bullet.html +18 -0
- data/public/d3/examples/bullet/bullet.js +53 -0
- data/public/d3/examples/bullet/bullets.json +7 -0
- data/public/d3/examples/bundle/bundle-radial.css +9 -0
- data/public/d3/examples/bundle/bundle-radial.html +15 -0
- data/public/d3/examples/bundle/bundle-radial.js +50 -0
- data/public/d3/examples/bundle/bundle-treemap.css +14 -0
- data/public/d3/examples/bundle/bundle-treemap.html +16 -0
- data/public/d3/examples/bundle/bundle-treemap.js +53 -0
- data/public/d3/examples/bundle/packages.js +49 -0
- data/public/d3/examples/button.css +35 -0
- data/public/d3/examples/calendar/calendar.css +16 -0
- data/public/d3/examples/calendar/calendar.js +50 -0
- data/public/d3/examples/calendar/dji.csv +5233 -0
- data/public/d3/examples/calendar/dji.html +16 -0
- data/public/d3/examples/calendar/dji.js +61 -0
- data/public/d3/examples/calendar/vix.csv +5231 -0
- data/public/d3/examples/calendar/vix.html +16 -0
- data/public/d3/examples/calendar/vix.js +60 -0
- data/public/d3/examples/cartogram/cartogram.css +20 -0
- data/public/d3/examples/cartogram/cartogram.html +15 -0
- data/public/d3/examples/cartogram/cartogram.js +51 -0
- data/public/d3/examples/cartogram/demers.css +9 -0
- data/public/d3/examples/cartogram/demers.html +16 -0
- data/public/d3/examples/cartogram/demers.js +79 -0
- data/public/d3/examples/cartogram/dorling.css +9 -0
- data/public/d3/examples/cartogram/dorling.html +16 -0
- data/public/d3/examples/cartogram/dorling.js +80 -0
- data/public/d3/examples/chord/chord-flare.html +109 -0
- data/public/d3/examples/chord/chord.css +9 -0
- data/public/d3/examples/chord/chord.html +14 -0
- data/public/d3/examples/chord/chord.js +98 -0
- data/public/d3/examples/choropleth/choropleth-area.html +51 -0
- data/public/d3/examples/choropleth/choropleth-bounds.html +46 -0
- data/public/d3/examples/choropleth/choropleth.css +16 -0
- data/public/d3/examples/choropleth/choropleth.html +15 -0
- data/public/d3/examples/choropleth/choropleth.js +38 -0
- data/public/d3/examples/choropleth/unemployment.json +1 -0
- data/public/d3/examples/clock/clock.css +23 -0
- data/public/d3/examples/clock/clock.html +17 -0
- data/public/d3/examples/clock/clock.js +87 -0
- data/public/d3/examples/cluster/cluster-radial.html +14 -0
- data/public/d3/examples/cluster/cluster-radial.js +39 -0
- data/public/d3/examples/cluster/cluster.css +15 -0
- data/public/d3/examples/cluster/cluster.html +14 -0
- data/public/d3/examples/cluster/cluster.js +39 -0
- data/public/d3/examples/contour/contour.html +108 -0
- data/public/d3/examples/crimea/crimea-stacked-area.html +109 -0
- data/public/d3/examples/crimea/crimea-stacked-bar.html +98 -0
- data/public/d3/examples/crimea/crimea.csv +24 -0
- data/public/d3/examples/data/README +5 -0
- data/public/d3/examples/data/faithful.json +8 -0
- data/public/d3/examples/data/flare-imports.json +222 -0
- data/public/d3/examples/data/flare.json +380 -0
- data/public/d3/examples/data/morley.csv +101 -0
- data/public/d3/examples/data/sample.csv +2 -0
- data/public/d3/examples/data/sample.html +5 -0
- data/public/d3/examples/data/sample.json +1 -0
- data/public/d3/examples/data/sample.txt +1 -0
- data/public/d3/examples/data/sample.xml +4 -0
- data/public/d3/examples/data/stocks.csv +807 -0
- data/public/d3/examples/data/unemployment.csv +1709 -0
- data/public/d3/examples/data/us-borders.json +1 -0
- data/public/d3/examples/data/us-counties.json +3216 -0
- data/public/d3/examples/data/us-state-centroids.json +1 -0
- data/public/d3/examples/data/us-states.json +54 -0
- data/public/d3/examples/data/world-countries.json +246 -0
- data/public/d3/examples/delaunay/delaunay.html +44 -0
- data/public/d3/examples/donut/donut.html +124 -0
- data/public/d3/examples/dot/dot.html +103 -0
- data/public/d3/examples/force/README +10 -0
- data/public/d3/examples/force/force-bounds.html +70 -0
- data/public/d3/examples/force/force-cluster.html +251 -0
- data/public/d3/examples/force/force-dynamic.html +118 -0
- data/public/d3/examples/force/force-interactive.html +136 -0
- data/public/d3/examples/force/force-map.html +104 -0
- data/public/d3/examples/force/force-multi-foci.html +68 -0
- data/public/d3/examples/force/force.css +9 -0
- data/public/d3/examples/force/force.html +14 -0
- data/public/d3/examples/force/force.js +56 -0
- data/public/d3/examples/force/miserables.json +1 -0
- data/public/d3/examples/hello-world/hello-data-key.html +60 -0
- data/public/d3/examples/hello-world/hello-data-nested-key.html +75 -0
- data/public/d3/examples/hello-world/hello-data-nested.html +77 -0
- data/public/d3/examples/hello-world/hello-data.html +46 -0
- data/public/d3/examples/hello-world/hello-event.html +53 -0
- data/public/d3/examples/hello-world/hello-node-key.html +25 -0
- data/public/d3/examples/hello-world/hello-sort.html +75 -0
- data/public/d3/examples/hello-world/hello-transform.html +41 -0
- data/public/d3/examples/hello-world/hello-transition-undefined.html +43 -0
- data/public/d3/examples/hello-world/hello-transition.html +47 -0
- data/public/d3/examples/hello-world/hello-webkit-transition.html +64 -0
- data/public/d3/examples/hello-world/select-enter-add.html +29 -0
- data/public/d3/examples/hello-world/selectAll-enter-add.html +20 -0
- data/public/d3/examples/histogram/histogram.html +80 -0
- data/public/d3/examples/horizon/horizon.css +9 -0
- data/public/d3/examples/horizon/horizon.html +25 -0
- data/public/d3/examples/horizon/horizon.js +43 -0
- data/public/d3/examples/horizon/unemployment.json +1 -0
- data/public/d3/examples/hull/hull.html +75 -0
- data/public/d3/examples/kde/kde.css +9 -0
- data/public/d3/examples/kde/kde.html +14 -0
- data/public/d3/examples/kde/kde.js +40 -0
- data/public/d3/examples/line/line.css +22 -0
- data/public/d3/examples/line/line.html +11 -0
- data/public/d3/examples/line/line.js +63 -0
- data/public/d3/examples/marimekko/marimekko.html +116 -0
- data/public/d3/examples/marimekko/marimekko.json +18 -0
- data/public/d3/examples/marker/marker.html +169 -0
- data/public/d3/examples/mercator/mercator.html +133 -0
- data/public/d3/examples/moire/moire.html +53 -0
- data/public/d3/examples/pack/pack.css +15 -0
- data/public/d3/examples/pack/pack.html +14 -0
- data/public/d3/examples/pack/pack.js +33 -0
- data/public/d3/examples/partition/partition-icicle-zoom.html +59 -0
- data/public/d3/examples/partition/partition-icicle.html +45 -0
- data/public/d3/examples/partition/partition-sunburst-zoom.html +72 -0
- data/public/d3/examples/partition/partition-sunburst.html +21 -0
- data/public/d3/examples/partition/partition-sunburst.js +72 -0
- data/public/d3/examples/pie/pie-transition.html +70 -0
- data/public/d3/examples/pie/pie.html +51 -0
- data/public/d3/examples/population/population.css +28 -0
- data/public/d3/examples/population/population.csv +571 -0
- data/public/d3/examples/population/population.html +13 -0
- data/public/d3/examples/population/population.js +126 -0
- data/public/d3/examples/qq/qq.css +18 -0
- data/public/d3/examples/qq/qq.html +21 -0
- data/public/d3/examples/qq/qq.js +66 -0
- data/public/d3/examples/qq/stats.js +28 -0
- data/public/d3/examples/qq/turkers.json +1 -0
- data/public/d3/examples/quadtree/quadtree.html +114 -0
- data/public/d3/examples/sizzle/sizzle.html +27 -0
- data/public/d3/examples/sort/sort.css +4 -0
- data/public/d3/examples/sort/sort.html +12 -0
- data/public/d3/examples/sort/sort.js +112 -0
- data/public/d3/examples/spline/spline.css +30 -0
- data/public/d3/examples/spline/spline.html +14 -0
- data/public/d3/examples/spline/spline.js +113 -0
- data/public/d3/examples/splom/cross.js +7 -0
- data/public/d3/examples/splom/flowers.json +1 -0
- data/public/d3/examples/splom/splom.css +8 -0
- data/public/d3/examples/splom/splom.html +14 -0
- data/public/d3/examples/splom/splom.js +149 -0
- data/public/d3/examples/stream/stack.css +7 -0
- data/public/d3/examples/stream/stack.html +22 -0
- data/public/d3/examples/stream/stack.js +119 -0
- data/public/d3/examples/stream/stream.css +3 -0
- data/public/d3/examples/stream/stream.html +19 -0
- data/public/d3/examples/stream/stream.js +42 -0
- data/public/d3/examples/stream/stream_layers.js +33 -0
- data/public/d3/examples/superformula/dot.html +104 -0
- data/public/d3/examples/superformula/explorer.html +120 -0
- data/public/d3/examples/superformula/superformula.html +70 -0
- data/public/d3/examples/superformula/superformula.js +98 -0
- data/public/d3/examples/symbol-map/symbol-map.html +67 -0
- data/public/d3/examples/touch/touch.html +65 -0
- data/public/d3/examples/tree/tree-dynamic.html +111 -0
- data/public/d3/examples/tree/tree-interactive.html +139 -0
- data/public/d3/examples/tree/tree-radial.html +14 -0
- data/public/d3/examples/tree/tree-radial.js +40 -0
- data/public/d3/examples/tree/tree.css +15 -0
- data/public/d3/examples/tree/tree.html +14 -0
- data/public/d3/examples/tree/tree.js +39 -0
- data/public/d3/examples/treemap/treemap-svg.html +22 -0
- data/public/d3/examples/treemap/treemap-svg.js +34 -0
- data/public/d3/examples/treemap/treemap.css +8 -0
- data/public/d3/examples/treemap/treemap.html +22 -0
- data/public/d3/examples/treemap/treemap.js +53 -0
- data/public/d3/examples/voroboids/boid.js +235 -0
- data/public/d3/examples/voroboids/voroboids.css +15 -0
- data/public/d3/examples/voroboids/voroboids.html +14 -0
- data/public/d3/examples/voroboids/voroboids.js +65 -0
- data/public/d3/examples/voronoi/voronoi.css +16 -0
- data/public/d3/examples/voronoi/voronoi.html +15 -0
- data/public/d3/examples/voronoi/voronoi.js +34 -0
- data/public/d3/examples/zoom-pan/zoom-pan-transform.html +95 -0
- data/public/d3/examples/zoom-pan/zoom-pan.html +119 -0
- data/public/d3/examples/zoom/dji.csv +5233 -0
- data/public/d3/examples/zoom/zoom.html +162 -0
- data/public/d3/lib/colorbrewer/LICENSE +38 -0
- data/public/d3/lib/colorbrewer/colorbrewer.css +1327 -0
- data/public/d3/lib/colorbrewer/colorbrewer.js +32 -0
- data/public/d3/lib/jit/LICENSE +27 -0
- data/public/d3/lib/jquery-ui/LICENSE +25 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/d3/lib/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/d3/lib/jquery-ui/jquery-ui.css +318 -0
- data/public/d3/lib/jquery-ui/jquery-ui.min.js +83 -0
- data/public/d3/lib/jquery/LICENSE +20 -0
- data/public/d3/lib/jquery/jquery.js +6883 -0
- data/public/d3/lib/jquery/jquery.min.js +166 -0
- data/public/d3/lib/polymaps/LICENSE +28 -0
- data/public/d3/lib/protovis/LICENSE +27 -0
- data/public/d3/lib/science/LICENSE +26 -0
- data/public/d3/lib/science/science.js +5 -0
- data/public/d3/lib/science/science.min.js +1 -0
- data/public/d3/lib/science/science.stats.js +166 -0
- data/public/d3/lib/science/science.stats.min.js +1 -0
- data/public/d3/lib/sizzle/LICENSE +24 -0
- data/public/d3/lib/sizzle/sizzle.js +1376 -0
- data/public/d3/lib/sizzle/sizzle.min.js +28 -0
- data/public/d3/package.json +14 -0
- data/public/d3/src/behavior/behavior.js +1 -0
- data/public/d3/src/behavior/drag.js +106 -0
- data/public/d3/src/behavior/zoom.js +212 -0
- data/public/d3/src/chart/box.js +297 -0
- data/public/d3/src/chart/bullet.js +237 -0
- data/public/d3/src/chart/chart.js +1 -0
- data/public/d3/src/chart/horizon.js +203 -0
- data/public/d3/src/chart/qq.js +245 -0
- data/public/d3/src/compat/date.js +3 -0
- data/public/d3/src/compat/style.js +9 -0
- data/public/d3/src/core/array.js +11 -0
- data/public/d3/src/core/ascending.js +3 -0
- data/public/d3/src/core/bisect.js +38 -0
- data/public/d3/src/core/collapse.js +3 -0
- data/public/d3/src/core/core.js +1 -0
- data/public/d3/src/core/descending.js +3 -0
- data/public/d3/src/core/dispatch.js +45 -0
- data/public/d3/src/core/ease.js +128 -0
- data/public/d3/src/core/entries.js +5 -0
- data/public/d3/src/core/event.js +1 -0
- data/public/d3/src/core/first.js +13 -0
- data/public/d3/src/core/format.js +85 -0
- data/public/d3/src/core/functor.js +3 -0
- data/public/d3/src/core/hsl.js +62 -0
- data/public/d3/src/core/html.js +10 -0
- data/public/d3/src/core/interpolate.js +180 -0
- data/public/d3/src/core/json.js +5 -0
- data/public/d3/src/core/keys.js +5 -0
- data/public/d3/src/core/last.js +13 -0
- data/public/d3/src/core/max.js +14 -0
- data/public/d3/src/core/merge.js +3 -0
- data/public/d3/src/core/min.js +14 -0
- data/public/d3/src/core/nest.js +87 -0
- data/public/d3/src/core/noop.js +1 -0
- data/public/d3/src/core/ns.js +19 -0
- data/public/d3/src/core/permute.js +7 -0
- data/public/d3/src/core/quantile.js +8 -0
- data/public/d3/src/core/range.js +21 -0
- data/public/d3/src/core/rebind.js +7 -0
- data/public/d3/src/core/requote.js +5 -0
- data/public/d3/src/core/rgb.js +284 -0
- data/public/d3/src/core/round.js +5 -0
- data/public/d3/src/core/selection-append.js +15 -0
- data/public/d3/src/core/selection-attr.js +44 -0
- data/public/d3/src/core/selection-call.js +13 -0
- data/public/d3/src/core/selection-classed.js +46 -0
- data/public/d3/src/core/selection-data.js +110 -0
- data/public/d3/src/core/selection-each.js +9 -0
- data/public/d3/src/core/selection-empty.js +3 -0
- data/public/d3/src/core/selection-enter-select.js +24 -0
- data/public/d3/src/core/selection-enter.js +10 -0
- data/public/d3/src/core/selection-filter.js +19 -0
- data/public/d3/src/core/selection-html.js +6 -0
- data/public/d3/src/core/selection-insert.js +20 -0
- data/public/d3/src/core/selection-map.js +5 -0
- data/public/d3/src/core/selection-node.js +9 -0
- data/public/d3/src/core/selection-on.js +34 -0
- data/public/d3/src/core/selection-property.js +23 -0
- data/public/d3/src/core/selection-remove.js +9 -0
- data/public/d3/src/core/selection-root.js +16 -0
- data/public/d3/src/core/selection-select.js +30 -0
- data/public/d3/src/core/selection-selectAll.js +24 -0
- data/public/d3/src/core/selection-sort.js +20 -0
- data/public/d3/src/core/selection-style.js +26 -0
- data/public/d3/src/core/selection-text.js +6 -0
- data/public/d3/src/core/selection-transition.js +14 -0
- data/public/d3/src/core/selection.js +21 -0
- data/public/d3/src/core/split.js +21 -0
- data/public/d3/src/core/sum.js +14 -0
- data/public/d3/src/core/text.js +10 -0
- data/public/d3/src/core/this.js +3 -0
- data/public/d3/src/core/timer.js +104 -0
- data/public/d3/src/core/transition-attr.js +23 -0
- data/public/d3/src/core/transition-delay.js +6 -0
- data/public/d3/src/core/transition-duration.js +6 -0
- data/public/d3/src/core/transition-each.js +9 -0
- data/public/d3/src/core/transition-remove.js +6 -0
- data/public/d3/src/core/transition-select.js +22 -0
- data/public/d3/src/core/transition-selectAll.js +20 -0
- data/public/d3/src/core/transition-style.js +14 -0
- data/public/d3/src/core/transition-text.js +7 -0
- data/public/d3/src/core/transition-transition.js +3 -0
- data/public/d3/src/core/transition.js +105 -0
- data/public/d3/src/core/uninterpolate.js +9 -0
- data/public/d3/src/core/values.js +5 -0
- data/public/d3/src/core/xhr.js +10 -0
- data/public/d3/src/core/xml.js +10 -0
- data/public/d3/src/core/zip.js +13 -0
- data/public/d3/src/csv/csv.js +5 -0
- data/public/d3/src/csv/format.js +13 -0
- data/public/d3/src/csv/parse.js +73 -0
- data/public/d3/src/end.js +1 -0
- data/public/d3/src/externs.js +6 -0
- data/public/d3/src/geo/albers.js +128 -0
- data/public/d3/src/geo/azimuthal.js +70 -0
- data/public/d3/src/geo/bounds.js +76 -0
- data/public/d3/src/geo/geo.js +1 -0
- data/public/d3/src/geo/greatCircle.js +91 -0
- data/public/d3/src/geo/mercator.js +36 -0
- data/public/d3/src/geo/path.js +289 -0
- data/public/d3/src/geom/contour.js +78 -0
- data/public/d3/src/geom/delaunay.js +31 -0
- data/public/d3/src/geom/geom.js +1 -0
- data/public/d3/src/geom/hull.js +98 -0
- data/public/d3/src/geom/polygon.js +88 -0
- data/public/d3/src/geom/quadtree.js +129 -0
- data/public/d3/src/geom/voronoi.js +399 -0
- data/public/d3/src/layout/bundle.js +57 -0
- data/public/d3/src/layout/chord.js +148 -0
- data/public/d3/src/layout/cluster.js +77 -0
- data/public/d3/src/layout/force.js +332 -0
- data/public/d3/src/layout/hierarchy.js +120 -0
- data/public/d3/src/layout/histogram.js +102 -0
- data/public/d3/src/layout/layout.js +1 -0
- data/public/d3/src/layout/pack.js +200 -0
- data/public/d3/src/layout/partition.js +48 -0
- data/public/d3/src/layout/pie.js +95 -0
- data/public/d3/src/layout/stack.js +237 -0
- data/public/d3/src/layout/tree.js +234 -0
- data/public/d3/src/layout/treemap.js +213 -0
- data/public/d3/src/scale/bilinear.js +7 -0
- data/public/d3/src/scale/category.js +54 -0
- data/public/d3/src/scale/linear.js +115 -0
- data/public/d3/src/scale/log.js +80 -0
- data/public/d3/src/scale/nice.js +21 -0
- data/public/d3/src/scale/ordinal.js +74 -0
- data/public/d3/src/scale/polylinear.js +16 -0
- data/public/d3/src/scale/pow.js +54 -0
- data/public/d3/src/scale/quantile.js +43 -0
- data/public/d3/src/scale/quantize.js +36 -0
- data/public/d3/src/scale/scale.js +6 -0
- data/public/d3/src/scale/sqrt.js +3 -0
- data/public/d3/src/start.js +1 -0
- data/public/d3/src/svg/arc.js +95 -0
- data/public/d3/src/svg/area-radial.js +10 -0
- data/public/d3/src/svg/area.js +84 -0
- data/public/d3/src/svg/axis.js +182 -0
- data/public/d3/src/svg/chord.js +99 -0
- data/public/d3/src/svg/diagonal-radial.js +22 -0
- data/public/d3/src/svg/diagonal.js +38 -0
- data/public/d3/src/svg/line-radial.js +22 -0
- data/public/d3/src/svg/line.js +419 -0
- data/public/d3/src/svg/mouse.js +29 -0
- data/public/d3/src/svg/svg.js +1 -0
- data/public/d3/src/svg/symbol.js +98 -0
- data/public/d3/src/svg/touches.js +8 -0
- data/public/d3/src/time/day.js +7 -0
- data/public/d3/src/time/days.js +11 -0
- data/public/d3/src/time/format-iso.js +1 -0
- data/public/d3/src/time/format-utc.js +48 -0
- data/public/d3/src/time/format.js +315 -0
- data/public/d3/src/time/hour.js +8 -0
- data/public/d3/src/time/hours.js +11 -0
- data/public/d3/src/time/minute.js +5 -0
- data/public/d3/src/time/minutes.js +11 -0
- data/public/d3/src/time/month.js +7 -0
- data/public/d3/src/time/months.js +11 -0
- data/public/d3/src/time/range.js +16 -0
- data/public/d3/src/time/scale-utc.js +36 -0
- data/public/d3/src/time/scale.js +123 -0
- data/public/d3/src/time/second.js +5 -0
- data/public/d3/src/time/seconds.js +7 -0
- data/public/d3/src/time/time.js +3 -0
- data/public/d3/src/time/week.js +9 -0
- data/public/d3/src/time/weeks.js +11 -0
- data/public/d3/src/time/year.js +7 -0
- data/public/d3/src/time/years.js +11 -0
- data/public/d3/test/core/ascending-test.js +47 -0
- data/public/d3/test/core/bisect-test.js +103 -0
- data/public/d3/test/core/descending-test.js +47 -0
- data/public/d3/test/core/dispatch-test.js +116 -0
- data/public/d3/test/core/ease-test.js +129 -0
- data/public/d3/test/core/entries-test.js +43 -0
- data/public/d3/test/core/first-test.js +42 -0
- data/public/d3/test/core/format-test.js +204 -0
- data/public/d3/test/core/functor-test.js +29 -0
- data/public/d3/test/core/hsl-test.js +87 -0
- data/public/d3/test/core/html-test.js +37 -0
- data/public/d3/test/core/interpolate-test.js +203 -0
- data/public/d3/test/core/json-test.js +37 -0
- data/public/d3/test/core/keys-test.js +31 -0
- data/public/d3/test/core/last-test.js +42 -0
- data/public/d3/test/core/max-test.js +50 -0
- data/public/d3/test/core/merge-test.js +27 -0
- data/public/d3/test/core/min-test.js +50 -0
- data/public/d3/test/core/nest-test.js +236 -0
- data/public/d3/test/core/ns-test.js +53 -0
- data/public/d3/test/core/permute-test.js +53 -0
- data/public/d3/test/core/quantile-test.js +50 -0
- data/public/d3/test/core/range-test.js +93 -0
- data/public/d3/test/core/rebind-test.js +38 -0
- data/public/d3/test/core/requote-test.js +53 -0
- data/public/d3/test/core/rgb-test.js +89 -0
- data/public/d3/test/core/round-test.js +70 -0
- data/public/d3/test/core/select-test.js +42 -0
- data/public/d3/test/core/selectAll-test.js +42 -0
- data/public/d3/test/core/selection-append-test.js +119 -0
- data/public/d3/test/core/selection-attr-test.js +153 -0
- data/public/d3/test/core/selection-call-test.js +71 -0
- data/public/d3/test/core/selection-classed-test.js +200 -0
- data/public/d3/test/core/selection-data-test.js +165 -0
- data/public/d3/test/core/selection-each-test.js +83 -0
- data/public/d3/test/core/selection-empty-test.js +51 -0
- data/public/d3/test/core/selection-filter-test.js +63 -0
- data/public/d3/test/core/selection-html-test.js +121 -0
- data/public/d3/test/core/selection-insert-test.js +132 -0
- data/public/d3/test/core/selection-map-test.js +47 -0
- data/public/d3/test/core/selection-node-test.js +50 -0
- data/public/d3/test/core/selection-on-test.js +95 -0
- data/public/d3/test/core/selection-property-test.js +91 -0
- data/public/d3/test/core/selection-remove-test.js +39 -0
- data/public/d3/test/core/selection-select-test.js +125 -0
- data/public/d3/test/core/selection-selectAll-test.js +127 -0
- data/public/d3/test/core/selection-sort-test.js +59 -0
- data/public/d3/test/core/selection-style-test.js +100 -0
- data/public/d3/test/core/selection-test.js +35 -0
- data/public/d3/test/core/selection-text-test.js +109 -0
- data/public/d3/test/core/split-test.js +34 -0
- data/public/d3/test/core/sum-test.js +47 -0
- data/public/d3/test/core/text-test.js +48 -0
- data/public/d3/test/core/timer-test.js +62 -0
- data/public/d3/test/core/transition-test-attr.js +33 -0
- data/public/d3/test/core/transition-test-attrTween.js +67 -0
- data/public/d3/test/core/transition-test-call.js +33 -0
- data/public/d3/test/core/transition-test-delay.js +41 -0
- data/public/d3/test/core/transition-test-duration.js +41 -0
- data/public/d3/test/core/transition-test-each.js +166 -0
- data/public/d3/test/core/transition-test-id.js +20 -0
- data/public/d3/test/core/transition-test-remove.js +46 -0
- data/public/d3/test/core/transition-test-select.js +63 -0
- data/public/d3/test/core/transition-test-selectAll.js +55 -0
- data/public/d3/test/core/transition-test-style.js +38 -0
- data/public/d3/test/core/transition-test-styleTween.js +73 -0
- data/public/d3/test/core/transition-test-text.js +30 -0
- data/public/d3/test/core/transition-test-transition.js +60 -0
- data/public/d3/test/core/transition-test-tween.js +71 -0
- data/public/d3/test/core/transition-test.js +65 -0
- data/public/d3/test/core/values-test.js +35 -0
- data/public/d3/test/core/version-test.js +18 -0
- data/public/d3/test/core/xhr-test.js +56 -0
- data/public/d3/test/core/xml-test.js +48 -0
- data/public/d3/test/core/zip-test.js +32 -0
- data/public/d3/test/csv/csv-test.js +38 -0
- data/public/d3/test/csv/format-test.js +39 -0
- data/public/d3/test/csv/parse-test.js +101 -0
- data/public/d3/test/env-assert.js +96 -0
- data/public/d3/test/env-fragment.js +8 -0
- data/public/d3/test/env-xhr.js +56 -0
- data/public/d3/test/env.js +13 -0
- data/public/d3/test/geo/albers-test.js +57 -0
- data/public/d3/test/geo/azimuthal-test.js +89 -0
- data/public/d3/test/geo/greatCircle-test.js +42 -0
- data/public/d3/test/geo/mercator-test.js +57 -0
- data/public/d3/test/layout/histogram-test.js +91 -0
- data/public/d3/test/layout/partition-test.js +39 -0
- data/public/d3/test/layout/tree-test.js +21 -0
- data/public/d3/test/layout/treemap-test.js +180 -0
- data/public/d3/test/scale/category-test.js +74 -0
- data/public/d3/test/scale/linear-test.js +239 -0
- data/public/d3/test/scale/log-test.js +220 -0
- data/public/d3/test/scale/ordinal-test.js +193 -0
- data/public/d3/test/scale/pow-test.js +259 -0
- data/public/d3/test/scale/quantile-test.js +64 -0
- data/public/d3/test/scale/quantize-test.js +69 -0
- data/public/d3/test/scale/sqrt-test.js +256 -0
- data/public/d3/test/svg/arc-test.js +147 -0
- data/public/d3/test/svg/area-radial-test.js +200 -0
- data/public/d3/test/svg/area-test.js +191 -0
- data/public/d3/test/svg/axis-test.js +347 -0
- data/public/d3/test/svg/line-radial-test.js +125 -0
- data/public/d3/test/svg/line-test.js +189 -0
- data/public/d3/test/svg/symbol-test.js +96 -0
- data/public/d3/test/time/day-test.js +65 -0
- data/public/d3/test/time/days-test.js +105 -0
- data/public/d3/test/time/format-test.js +430 -0
- data/public/d3/test/time/hour-test.js +103 -0
- data/public/d3/test/time/hours-test.js +135 -0
- data/public/d3/test/time/minute-test.js +43 -0
- data/public/d3/test/time/minutes-test.js +101 -0
- data/public/d3/test/time/month-test.js +53 -0
- data/public/d3/test/time/months-test.js +105 -0
- data/public/d3/test/time/scale-test.js +525 -0
- data/public/d3/test/time/second-test.js +41 -0
- data/public/d3/test/time/seconds-test.js +101 -0
- data/public/d3/test/time/week-test.js +59 -0
- data/public/d3/test/time/weeks-test.js +105 -0
- data/public/d3/test/time/year-test.js +41 -0
- data/public/d3/test/time/years-test.js +73 -0
- data/public/graph.js +42 -0
- data/public/jquery.min.js +4 -0
- data/public/test.html +36 -0
- data/public/testdata/bigfucker.js +212 -0
- data/public/testdata/names_and_enabled.js +232 -0
- data/public/testdata/one.js +79 -0
- data/public/testdata/withnames.js +198 -0
- data/public/viz.js +289 -0
- data/views/graph.erb +15 -0
- data/views/one.erb +34 -0
- data/views/two.erb +44 -0
- data/views/vis.erb +47 -0
- metadata +594 -18
- data/lib/bum.rb +0 -385
- data/lib/client.rb.erb +0 -7
- data/lib/dhcpd.rb +0 -84
- data/lib/hosts.rb +0 -61
- data/lib/vmx.rb +0 -24
@@ -0,0 +1,29 @@
|
|
1
|
+
d3.svg.mouse = function(container) {
|
2
|
+
return d3_svg_mousePoint(container, d3.event);
|
3
|
+
};
|
4
|
+
|
5
|
+
// https://bugs.webkit.org/show_bug.cgi?id=44083
|
6
|
+
var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
|
7
|
+
|
8
|
+
function d3_svg_mousePoint(container, e) {
|
9
|
+
var point = (container.ownerSVGElement || container).createSVGPoint();
|
10
|
+
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
|
11
|
+
var svg = d3.select(document.body)
|
12
|
+
.append("svg:svg")
|
13
|
+
.style("position", "absolute")
|
14
|
+
.style("top", 0)
|
15
|
+
.style("left", 0);
|
16
|
+
var ctm = svg[0][0].getScreenCTM();
|
17
|
+
d3_mouse_bug44083 = !(ctm.f || ctm.e);
|
18
|
+
svg.remove();
|
19
|
+
}
|
20
|
+
if (d3_mouse_bug44083) {
|
21
|
+
point.x = e.pageX;
|
22
|
+
point.y = e.pageY;
|
23
|
+
} else {
|
24
|
+
point.x = e.clientX;
|
25
|
+
point.y = e.clientY;
|
26
|
+
}
|
27
|
+
point = point.matrixTransform(container.getScreenCTM().inverse());
|
28
|
+
return [point.x, point.y];
|
29
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
d3.svg = {};
|
@@ -0,0 +1,98 @@
|
|
1
|
+
d3.svg.symbol = function() {
|
2
|
+
var type = d3_svg_symbolType,
|
3
|
+
size = d3_svg_symbolSize;
|
4
|
+
|
5
|
+
function symbol(d, i) {
|
6
|
+
return (d3_svg_symbols[type.call(this, d, i)]
|
7
|
+
|| d3_svg_symbols.circle)
|
8
|
+
(size.call(this, d, i));
|
9
|
+
}
|
10
|
+
|
11
|
+
symbol.type = function(x) {
|
12
|
+
if (!arguments.length) return type;
|
13
|
+
type = d3.functor(x);
|
14
|
+
return symbol;
|
15
|
+
};
|
16
|
+
|
17
|
+
// size of symbol in square pixels
|
18
|
+
symbol.size = function(x) {
|
19
|
+
if (!arguments.length) return size;
|
20
|
+
size = d3.functor(x);
|
21
|
+
return symbol;
|
22
|
+
};
|
23
|
+
|
24
|
+
return symbol;
|
25
|
+
};
|
26
|
+
|
27
|
+
function d3_svg_symbolSize() {
|
28
|
+
return 64;
|
29
|
+
}
|
30
|
+
|
31
|
+
function d3_svg_symbolType() {
|
32
|
+
return "circle";
|
33
|
+
}
|
34
|
+
|
35
|
+
// TODO cross-diagonal?
|
36
|
+
var d3_svg_symbols = {
|
37
|
+
"circle": function(size) {
|
38
|
+
var r = Math.sqrt(size / Math.PI);
|
39
|
+
return "M0," + r
|
40
|
+
+ "A" + r + "," + r + " 0 1,1 0," + (-r)
|
41
|
+
+ "A" + r + "," + r + " 0 1,1 0," + r
|
42
|
+
+ "Z";
|
43
|
+
},
|
44
|
+
"cross": function(size) {
|
45
|
+
var r = Math.sqrt(size / 5) / 2;
|
46
|
+
return "M" + -3 * r + "," + -r
|
47
|
+
+ "H" + -r
|
48
|
+
+ "V" + -3 * r
|
49
|
+
+ "H" + r
|
50
|
+
+ "V" + -r
|
51
|
+
+ "H" + 3 * r
|
52
|
+
+ "V" + r
|
53
|
+
+ "H" + r
|
54
|
+
+ "V" + 3 * r
|
55
|
+
+ "H" + -r
|
56
|
+
+ "V" + r
|
57
|
+
+ "H" + -3 * r
|
58
|
+
+ "Z";
|
59
|
+
},
|
60
|
+
"diamond": function(size) {
|
61
|
+
var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),
|
62
|
+
rx = ry * d3_svg_symbolTan30;
|
63
|
+
return "M0," + -ry
|
64
|
+
+ "L" + rx + ",0"
|
65
|
+
+ " 0," + ry
|
66
|
+
+ " " + -rx + ",0"
|
67
|
+
+ "Z";
|
68
|
+
},
|
69
|
+
"square": function(size) {
|
70
|
+
var r = Math.sqrt(size) / 2;
|
71
|
+
return "M" + -r + "," + -r
|
72
|
+
+ "L" + r + "," + -r
|
73
|
+
+ " " + r + "," + r
|
74
|
+
+ " " + -r + "," + r
|
75
|
+
+ "Z";
|
76
|
+
},
|
77
|
+
"triangle-down": function(size) {
|
78
|
+
var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
|
79
|
+
ry = rx * d3_svg_symbolSqrt3 / 2;
|
80
|
+
return "M0," + ry
|
81
|
+
+ "L" + rx +"," + -ry
|
82
|
+
+ " " + -rx + "," + -ry
|
83
|
+
+ "Z";
|
84
|
+
},
|
85
|
+
"triangle-up": function(size) {
|
86
|
+
var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
|
87
|
+
ry = rx * d3_svg_symbolSqrt3 / 2;
|
88
|
+
return "M0," + -ry
|
89
|
+
+ "L" + rx +"," + ry
|
90
|
+
+ " " + -rx + "," + ry
|
91
|
+
+ "Z";
|
92
|
+
}
|
93
|
+
};
|
94
|
+
|
95
|
+
d3.svg.symbolTypes = d3.keys(d3_svg_symbols);
|
96
|
+
|
97
|
+
var d3_svg_symbolSqrt3 = Math.sqrt(3),
|
98
|
+
d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
d3.time.days = d3_time_range(d3.time.day, function(date) {
|
2
|
+
date.setDate(date.getDate() + 1);
|
3
|
+
}, function(date) {
|
4
|
+
return date.getDate() - 1;
|
5
|
+
});
|
6
|
+
|
7
|
+
d3.time.days.utc = d3_time_range(d3.time.day.utc, function(date) {
|
8
|
+
date.setUTCDate(date.getUTCDate() + 1);
|
9
|
+
}, function(date) {
|
10
|
+
return date.getUTCDate() - 1;
|
11
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
d3.time.format.iso = d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ");
|
@@ -0,0 +1,48 @@
|
|
1
|
+
d3.time.format.utc = function(template) {
|
2
|
+
var local = d3.time.format(template);
|
3
|
+
|
4
|
+
function format(date) {
|
5
|
+
var utc = new d3_time_format_utc();
|
6
|
+
utc._ = date;
|
7
|
+
return local(utc);
|
8
|
+
}
|
9
|
+
|
10
|
+
format.parse = function(string) {
|
11
|
+
try {
|
12
|
+
d3_time = d3_time_format_utc;
|
13
|
+
var date = local.parse(string);
|
14
|
+
return date && date._;
|
15
|
+
} finally {
|
16
|
+
d3_time = Date;
|
17
|
+
}
|
18
|
+
};
|
19
|
+
|
20
|
+
format.toString = local.toString;
|
21
|
+
|
22
|
+
return format;
|
23
|
+
};
|
24
|
+
|
25
|
+
function d3_time_format_utc() {
|
26
|
+
this._ = new Date(Date.UTC.apply(this, arguments));
|
27
|
+
}
|
28
|
+
|
29
|
+
d3_time_format_utc.prototype = {
|
30
|
+
getDate: function() { return this._.getUTCDate(); },
|
31
|
+
getDay: function() { return this._.getUTCDay(); },
|
32
|
+
getFullYear: function() { return this._.getUTCFullYear(); },
|
33
|
+
getHours: function() { return this._.getUTCHours(); },
|
34
|
+
getMilliseconds: function() { return this._.getUTCMilliseconds(); },
|
35
|
+
getMinutes: function() { return this._.getUTCMinutes(); },
|
36
|
+
getMonth: function() { return this._.getUTCMonth(); },
|
37
|
+
getSeconds: function() { return this._.getUTCSeconds(); },
|
38
|
+
getTimezoneOffset: function() { return 0; },
|
39
|
+
valueOf: function() { return this._.getTime(); },
|
40
|
+
setDate: function(x) { this._.setUTCDate(x); },
|
41
|
+
setDay: function(x) { this._.setUTCDay(x); },
|
42
|
+
setFullYear: function(x) { this._.setUTCFullYear(x); },
|
43
|
+
setHours: function(x) { this._.setUTCHours(x); },
|
44
|
+
setMilliseconds: function(x) { this._.setUTCMilliseconds(x); },
|
45
|
+
setMinutes: function(x) { this._.setUTCMinutes(x); },
|
46
|
+
setMonth: function(x) { this._.setUTCMonth(x); },
|
47
|
+
setSeconds: function(x) { this._.setUTCSeconds(x); }
|
48
|
+
};
|
@@ -0,0 +1,315 @@
|
|
1
|
+
d3.time.format = function(template) {
|
2
|
+
var n = template.length;
|
3
|
+
|
4
|
+
function format(date) {
|
5
|
+
var string = [],
|
6
|
+
i = -1,
|
7
|
+
j = 0,
|
8
|
+
c,
|
9
|
+
f;
|
10
|
+
while (++i < n) {
|
11
|
+
if (template.charCodeAt(i) == 37) {
|
12
|
+
string.push(
|
13
|
+
template.substring(j, i),
|
14
|
+
(f = d3_time_formats[c = template.charAt(++i)])
|
15
|
+
? f(date) : c);
|
16
|
+
j = i + 1;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
string.push(template.substring(j, i));
|
20
|
+
return string.join("");
|
21
|
+
}
|
22
|
+
|
23
|
+
format.parse = function(string) {
|
24
|
+
var date = new d3_time(1900, 0, 1),
|
25
|
+
i = d3_time_parse(date, template, string, 0);
|
26
|
+
if (i != string.length) return null;
|
27
|
+
if (date.hour12) {
|
28
|
+
var hours = date.getHours() % 12;
|
29
|
+
date.setHours(date.hour12pm ? hours + 12 : hours);
|
30
|
+
}
|
31
|
+
delete date.hour12;
|
32
|
+
delete date.hour12pm;
|
33
|
+
return date;
|
34
|
+
};
|
35
|
+
|
36
|
+
format.toString = function() {
|
37
|
+
return template;
|
38
|
+
};
|
39
|
+
|
40
|
+
return format;
|
41
|
+
};
|
42
|
+
|
43
|
+
function d3_time_parse(date, template, string, j) {
|
44
|
+
var c,
|
45
|
+
p,
|
46
|
+
i = 0,
|
47
|
+
n = template.length,
|
48
|
+
m = string.length;
|
49
|
+
while (i < n) {
|
50
|
+
if (j >= m) return -1;
|
51
|
+
c = template.charCodeAt(i++);
|
52
|
+
if (c == 37) {
|
53
|
+
p = d3_time_parsers[template.charAt(i++)];
|
54
|
+
if (!p || ((j = p(date, string, j)) < 0)) return -1;
|
55
|
+
} else if (c != string.charCodeAt(j++)) {
|
56
|
+
return -1;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
return j;
|
60
|
+
}
|
61
|
+
|
62
|
+
var d3_time_zfill2 = d3.format("02d"),
|
63
|
+
d3_time_zfill3 = d3.format("03d"),
|
64
|
+
d3_time_zfill4 = d3.format("04d"),
|
65
|
+
d3_time_sfill2 = d3.format("2d");
|
66
|
+
|
67
|
+
var d3_time_formats = {
|
68
|
+
a: function(d) { return d3_time_weekdays[d.getDay()].substring(0, 3); },
|
69
|
+
A: function(d) { return d3_time_weekdays[d.getDay()]; },
|
70
|
+
b: function(d) { return d3_time_months[d.getMonth()].substring(0, 3); },
|
71
|
+
B: function(d) { return d3_time_months[d.getMonth()]; },
|
72
|
+
c: d3.time.format("%a %b %e %H:%M:%S %Y"),
|
73
|
+
d: function(d) { return d3_time_zfill2(d.getDate()); },
|
74
|
+
e: function(d) { return d3_time_sfill2(d.getDate()); },
|
75
|
+
H: function(d) { return d3_time_zfill2(d.getHours()); },
|
76
|
+
I: function(d) { return d3_time_zfill2(d.getHours() % 12 || 12); },
|
77
|
+
j: d3_time_dayOfYear,
|
78
|
+
m: function(d) { return d3_time_zfill2(d.getMonth() + 1); },
|
79
|
+
M: function(d) { return d3_time_zfill2(d.getMinutes()); },
|
80
|
+
p: function(d) { return d.getHours() >= 12 ? "PM" : "AM"; },
|
81
|
+
S: function(d) { return d3_time_zfill2(d.getSeconds()); },
|
82
|
+
U: d3_time_weekNumberSunday,
|
83
|
+
w: function(d) { return d.getDay(); },
|
84
|
+
W: d3_time_weekNumberMonday,
|
85
|
+
x: d3.time.format("%m/%d/%y"),
|
86
|
+
X: d3.time.format("%H:%M:%S"),
|
87
|
+
y: function(d) { return d3_time_zfill2(d.getFullYear() % 100); },
|
88
|
+
Y: function(d) { return d3_time_zfill4(d.getFullYear() % 10000); },
|
89
|
+
Z: d3_time_zone,
|
90
|
+
"%": function(d) { return "%"; }
|
91
|
+
};
|
92
|
+
|
93
|
+
var d3_time_parsers = {
|
94
|
+
a: d3_time_parseWeekdayAbbrev,
|
95
|
+
A: d3_time_parseWeekday,
|
96
|
+
b: d3_time_parseMonthAbbrev,
|
97
|
+
B: d3_time_parseMonth,
|
98
|
+
c: d3_time_parseLocaleFull,
|
99
|
+
d: d3_time_parseDay,
|
100
|
+
e: d3_time_parseDay,
|
101
|
+
H: d3_time_parseHour24,
|
102
|
+
I: d3_time_parseHour12,
|
103
|
+
// j: function(d, s, i) { /*TODO day of year [001,366] */ return i; },
|
104
|
+
m: d3_time_parseMonthNumber,
|
105
|
+
M: d3_time_parseMinutes,
|
106
|
+
p: d3_time_parseAmPm,
|
107
|
+
S: d3_time_parseSeconds,
|
108
|
+
// U: function(d, s, i) { /*TODO week number (sunday) [00,53] */ return i; },
|
109
|
+
// w: function(d, s, i) { /*TODO weekday [0,6] */ return i; },
|
110
|
+
// W: function(d, s, i) { /*TODO week number (monday) [00,53] */ return i; },
|
111
|
+
x: d3_time_parseLocaleDate,
|
112
|
+
X: d3_time_parseLocaleTime,
|
113
|
+
y: d3_time_parseYear,
|
114
|
+
Y: d3_time_parseFullYear
|
115
|
+
// ,
|
116
|
+
// Z: function(d, s, i) { /*TODO time zone */ return i; },
|
117
|
+
// "%": function(d, s, i) { /*TODO literal % */ return i; }
|
118
|
+
};
|
119
|
+
|
120
|
+
// Note: weekday is validated, but does not set the date.
|
121
|
+
function d3_time_parseWeekdayAbbrev(date, string, i) {
|
122
|
+
return string.substring(i, i += 3).toLowerCase() in d3_time_weekdayAbbrevLookup ? i : -1;
|
123
|
+
}
|
124
|
+
|
125
|
+
var d3_time_weekdayAbbrevLookup = {
|
126
|
+
sun: 3,
|
127
|
+
mon: 3,
|
128
|
+
tue: 3,
|
129
|
+
wed: 3,
|
130
|
+
thu: 3,
|
131
|
+
fri: 3,
|
132
|
+
sat: 3
|
133
|
+
};
|
134
|
+
|
135
|
+
// Note: weekday is validated, but does not set the date.
|
136
|
+
function d3_time_parseWeekday(date, string, i) {
|
137
|
+
d3_time_weekdayRe.lastIndex = 0;
|
138
|
+
var n = d3_time_weekdayRe.exec(string.substring(i, i + 10));
|
139
|
+
return n ? i += n[0].length : -1;
|
140
|
+
}
|
141
|
+
|
142
|
+
var d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/ig;
|
143
|
+
|
144
|
+
var d3_time_weekdays = [
|
145
|
+
"Sunday",
|
146
|
+
"Monday",
|
147
|
+
"Tuesday",
|
148
|
+
"Wednesday",
|
149
|
+
"Thursday",
|
150
|
+
"Friday",
|
151
|
+
"Saturday"
|
152
|
+
];
|
153
|
+
|
154
|
+
function d3_time_parseMonthAbbrev(date, string, i) {
|
155
|
+
var n = d3_time_monthAbbrevLookup[string.substring(i, i += 3).toLowerCase()];
|
156
|
+
return n == null ? -1 : (date.setMonth(n), i);
|
157
|
+
}
|
158
|
+
|
159
|
+
var d3_time_monthAbbrevLookup = {
|
160
|
+
jan: 0,
|
161
|
+
feb: 1,
|
162
|
+
mar: 2,
|
163
|
+
apr: 3,
|
164
|
+
may: 4,
|
165
|
+
jun: 5,
|
166
|
+
jul: 6,
|
167
|
+
aug: 7,
|
168
|
+
sep: 8,
|
169
|
+
oct: 9,
|
170
|
+
nov: 10,
|
171
|
+
dec: 11
|
172
|
+
};
|
173
|
+
|
174
|
+
function d3_time_parseMonth(date, string, i) {
|
175
|
+
d3_time_monthRe.lastIndex = 0;
|
176
|
+
var n = d3_time_monthRe.exec(string.substring(i, i + 12));
|
177
|
+
return n ? (date.setMonth(d3_time_monthLookup[n[0].toLowerCase()]), i += n[0].length) : -1;
|
178
|
+
}
|
179
|
+
|
180
|
+
var d3_time_monthRe = /^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig;
|
181
|
+
|
182
|
+
var d3_time_monthLookup = {
|
183
|
+
january: 0,
|
184
|
+
february: 1,
|
185
|
+
march: 2,
|
186
|
+
april: 3,
|
187
|
+
may: 4,
|
188
|
+
june: 5,
|
189
|
+
july: 6,
|
190
|
+
august: 7,
|
191
|
+
september: 8,
|
192
|
+
october: 9,
|
193
|
+
november: 10,
|
194
|
+
december: 11
|
195
|
+
};
|
196
|
+
|
197
|
+
var d3_time_months = [
|
198
|
+
"January",
|
199
|
+
"February",
|
200
|
+
"March",
|
201
|
+
"April",
|
202
|
+
"May",
|
203
|
+
"June",
|
204
|
+
"July",
|
205
|
+
"August",
|
206
|
+
"September",
|
207
|
+
"October",
|
208
|
+
"November",
|
209
|
+
"December"
|
210
|
+
];
|
211
|
+
|
212
|
+
function d3_time_parseLocaleFull(date, string, i) {
|
213
|
+
return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
|
214
|
+
}
|
215
|
+
|
216
|
+
function d3_time_parseLocaleDate(date, string, i) {
|
217
|
+
return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
|
218
|
+
}
|
219
|
+
|
220
|
+
function d3_time_parseLocaleTime(date, string, i) {
|
221
|
+
return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
|
222
|
+
}
|
223
|
+
|
224
|
+
function d3_time_parseFullYear(date, string, i) {
|
225
|
+
d3_time_numberRe.lastIndex = 0;
|
226
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 4));
|
227
|
+
return n ? (date.setFullYear(n[0]), i += n[0].length) : -1;
|
228
|
+
}
|
229
|
+
|
230
|
+
function d3_time_parseYear(date, string, i) {
|
231
|
+
d3_time_numberRe.lastIndex = 0;
|
232
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
233
|
+
return n ? (date.setFullYear(d3_time_century() + +n[0]), i += n[0].length) : -1;
|
234
|
+
}
|
235
|
+
|
236
|
+
function d3_time_century() {
|
237
|
+
return ~~(new Date().getFullYear() / 1000) * 1000;
|
238
|
+
}
|
239
|
+
|
240
|
+
function d3_time_parseMonthNumber(date, string, i) {
|
241
|
+
d3_time_numberRe.lastIndex = 0;
|
242
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
243
|
+
return n ? (date.setMonth(n[0] - 1), i += n[0].length) : -1;
|
244
|
+
}
|
245
|
+
|
246
|
+
function d3_time_parseDay(date, string, i) {
|
247
|
+
d3_time_numberRe.lastIndex = 0;
|
248
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
249
|
+
return n ? (date.setDate(+n[0]), i += n[0].length) : -1;
|
250
|
+
}
|
251
|
+
|
252
|
+
// Note: we don't validate that the hour is in the range [0,23].
|
253
|
+
function d3_time_parseHour24(date, string, i) {
|
254
|
+
d3_time_numberRe.lastIndex = 0;
|
255
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
256
|
+
return n ? (date.setHours(+n[0]), i += n[0].length) : -1;
|
257
|
+
}
|
258
|
+
|
259
|
+
// Note: we don't validate that the hour is in the range [1,12].
|
260
|
+
function d3_time_parseHour12(date, string, i) {
|
261
|
+
date.hour12 = true;
|
262
|
+
return d3_time_parseHour24(date, string, i);
|
263
|
+
}
|
264
|
+
|
265
|
+
function d3_time_parseMinutes(date, string, i) {
|
266
|
+
d3_time_numberRe.lastIndex = 0;
|
267
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
268
|
+
return n ? (date.setMinutes(+n[0]), i += n[0].length) : -1;
|
269
|
+
}
|
270
|
+
|
271
|
+
function d3_time_parseSeconds(date, string, i) {
|
272
|
+
d3_time_numberRe.lastIndex = 0;
|
273
|
+
var n = d3_time_numberRe.exec(string.substring(i, i + 2));
|
274
|
+
return n ? (date.setSeconds(+n[0]), i += n[0].length) : -1;
|
275
|
+
}
|
276
|
+
|
277
|
+
// Note: we don't look at the next directive.
|
278
|
+
var d3_time_numberRe = /\s*\d+/;
|
279
|
+
|
280
|
+
function d3_time_parseAmPm(date, string, i) {
|
281
|
+
var n = d3_time_amPmLookup[string.substring(i, i += 2).toLowerCase()];
|
282
|
+
return n == null ? -1 : (date.hour12pm = n, i);
|
283
|
+
}
|
284
|
+
|
285
|
+
var d3_time_amPmLookup = {
|
286
|
+
am: 0,
|
287
|
+
pm: 1
|
288
|
+
};
|
289
|
+
|
290
|
+
function d3_time_year(d) {
|
291
|
+
return new d3_time(d.getFullYear(), 0, 1);
|
292
|
+
}
|
293
|
+
|
294
|
+
function d3_time_dayOfYear(d) {
|
295
|
+
return d3_time_zfill3(1 + ~~((d - d3_time_year(d)) / 864e5));
|
296
|
+
}
|
297
|
+
|
298
|
+
function d3_time_weekNumberSunday(d) {
|
299
|
+
var d0 = d3_time_year(d);
|
300
|
+
return d3_time_zfill2(~~(((d - d0) / 864e5 + d0.getDay()) / 7));
|
301
|
+
}
|
302
|
+
|
303
|
+
function d3_time_weekNumberMonday(d) {
|
304
|
+
var d0 = d3_time_year(d);
|
305
|
+
return d3_time_zfill2(~~(((d - d0) / 864e5 + (d0.getDay() + 6) % 7) / 7));
|
306
|
+
}
|
307
|
+
|
308
|
+
// TODO table of time zone offset names?
|
309
|
+
function d3_time_zone(d) {
|
310
|
+
var z = d.getTimezoneOffset(),
|
311
|
+
zs = z > 0 ? "-" : "+",
|
312
|
+
zh = ~~(Math.abs(z) / 60),
|
313
|
+
zm = Math.abs(z) % 60;
|
314
|
+
return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
|
315
|
+
}
|