Browse Source

HUE-23. Integrate IE Compatible Protovis

Marcus McLaughlin 15 years ago
parent
commit
4943335840
100 changed files with 4511 additions and 5302 deletions
  1. 3 3
      desktop/libs/protovis/static/js/Source/scripts.json
  2. 135 67
      ext/thirdparty/js/protovis/Makefile
  3. 0 104
      ext/thirdparty/js/protovis/README
  4. 0 20
      ext/thirdparty/js/protovis/README_HUE
  5. 113 0
      ext/thirdparty/js/protovis/examples/antibiotics/antibiotics-scatter.html
  6. 140 0
      ext/thirdparty/js/protovis/examples/antibiotics/antibiotics.html
  7. 20 0
      ext/thirdparty/js/protovis/examples/antibiotics/antibiotics.js
  8. 0 55
      ext/thirdparty/js/protovis/examples/area-stacked.html
  9. BIN
      ext/thirdparty/js/protovis/examples/area-stacked.png
  10. 0 56
      ext/thirdparty/js/protovis/examples/area.html
  11. BIN
      ext/thirdparty/js/protovis/examples/area.png
  12. 0 63
      ext/thirdparty/js/protovis/examples/bar-grouped.html
  13. BIN
      ext/thirdparty/js/protovis/examples/bar-grouped.png
  14. 0 58
      ext/thirdparty/js/protovis/examples/bar-stacked.html
  15. BIN
      ext/thirdparty/js/protovis/examples/bar-stacked.png
  16. 0 54
      ext/thirdparty/js/protovis/examples/bar.html
  17. BIN
      ext/thirdparty/js/protovis/examples/bar.png
  18. 102 0
      ext/thirdparty/js/protovis/examples/barley/barley.html
  19. 122 0
      ext/thirdparty/js/protovis/examples/barley/barley.js
  20. 90 0
      ext/thirdparty/js/protovis/examples/cars/cars.html
  21. 408 0
      ext/thirdparty/js/protovis/examples/cars/cars.js
  22. 91 0
      ext/thirdparty/js/protovis/examples/clock/clock.html
  23. 0 63
      ext/thirdparty/js/protovis/examples/column-grouped.html
  24. BIN
      ext/thirdparty/js/protovis/examples/column-grouped.png
  25. 0 58
      ext/thirdparty/js/protovis/examples/column-stacked.html
  26. BIN
      ext/thirdparty/js/protovis/examples/column-stacked.png
  27. 0 54
      ext/thirdparty/js/protovis/examples/column.html
  28. BIN
      ext/thirdparty/js/protovis/examples/column.png
  29. 65 0
      ext/thirdparty/js/protovis/examples/crimea/crimea-grouped-bar.html
  30. 61 0
      ext/thirdparty/js/protovis/examples/crimea/crimea-line.html
  31. 61 0
      ext/thirdparty/js/protovis/examples/crimea/crimea-stacked-area.html
  32. 60 0
      ext/thirdparty/js/protovis/examples/crimea/crimea-stacked-bar.html
  33. 100 0
      ext/thirdparty/js/protovis/examples/crimea/crimea.html
  34. 33 0
      ext/thirdparty/js/protovis/examples/crimea/crimea.js
  35. 0 37
      ext/thirdparty/js/protovis/examples/donut.html
  36. BIN
      ext/thirdparty/js/protovis/examples/donut.png
  37. 0 51
      ext/thirdparty/js/protovis/examples/dot.html
  38. BIN
      ext/thirdparty/js/protovis/examples/dot.png
  39. 22 0
      ext/thirdparty/js/protovis/examples/downloadify/LICENSE.txt
  40. BIN
      ext/thirdparty/js/protovis/examples/downloadify/download.png
  41. 57 0
      ext/thirdparty/js/protovis/examples/downloadify/downloadify.html
  42. 2 0
      ext/thirdparty/js/protovis/examples/downloadify/downloadify.min.js
  43. BIN
      ext/thirdparty/js/protovis/examples/downloadify/downloadify.swf
  44. 3 0
      ext/thirdparty/js/protovis/examples/downloadify/swfobject.js
  45. 17 0
      ext/thirdparty/js/protovis/examples/ex.css
  46. 53 0
      ext/thirdparty/js/protovis/examples/eyes/eyes.html
  47. 44 0
      ext/thirdparty/js/protovis/examples/eyes/matrix.html
  48. 109 0
      ext/thirdparty/js/protovis/examples/flowers/flowers.html
  49. 154 0
      ext/thirdparty/js/protovis/examples/flowers/flowers.js
  50. 79 0
      ext/thirdparty/js/protovis/examples/group-stack/group-stack.html
  51. 23 0
      ext/thirdparty/js/protovis/examples/group-stack/headcount.js
  52. 76 0
      ext/thirdparty/js/protovis/examples/hotel/hotel.html
  53. 245 0
      ext/thirdparty/js/protovis/examples/hotel/hotel.js
  54. 71 0
      ext/thirdparty/js/protovis/examples/jobs/jobs.html
  55. 1024 0
      ext/thirdparty/js/protovis/examples/jobs/jobs.js
  56. 154 0
      ext/thirdparty/js/protovis/examples/jquery-1.4.2.min.js
  57. 0 51
      ext/thirdparty/js/protovis/examples/line.html
  58. BIN
      ext/thirdparty/js/protovis/examples/line.png
  59. 83 0
      ext/thirdparty/js/protovis/examples/nba/nba.html
  60. 53 0
      ext/thirdparty/js/protovis/examples/nba/nba.js
  61. 82 0
      ext/thirdparty/js/protovis/examples/nba/nba2.html
  62. 0 39
      ext/thirdparty/js/protovis/examples/pie.html
  63. BIN
      ext/thirdparty/js/protovis/examples/pie.png
  64. 184 0
      ext/thirdparty/js/protovis/examples/sankey/gdp2009.js
  65. 77 0
      ext/thirdparty/js/protovis/examples/sankey/sankey.html
  66. 112 0
      ext/thirdparty/js/protovis/examples/slider/cell.html
  67. 31 0
      ext/thirdparty/js/protovis/examples/slider/cell.js
  68. 85 0
      ext/thirdparty/js/protovis/examples/slider/horizon.html
  69. 17 0
      ext/thirdparty/js/protovis/examples/slider/jquery-ui-1.8rc3.custom.min.js
  70. 50 0
      ext/thirdparty/js/protovis/examples/slider/slider.html
  71. BIN
      ext/thirdparty/js/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  72. BIN
      ext/thirdparty/js/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  73. 0 52
      ext/thirdparty/js/protovis/examples/step.html
  74. BIN
      ext/thirdparty/js/protovis/examples/step.png
  75. 0 594
      ext/thirdparty/js/protovis/js/color/Color.js
  76. 0 135
      ext/thirdparty/js/protovis/js/color/Colors.js
  77. 0 15
      ext/thirdparty/js/protovis/js/color/Ramp.js
  78. 0 112
      ext/thirdparty/js/protovis/js/data/Flatten.js
  79. 0 295
      ext/thirdparty/js/protovis/js/data/LinearScale.js
  80. 0 316
      ext/thirdparty/js/protovis/js/data/LogScale.js
  81. 0 257
      ext/thirdparty/js/protovis/js/data/Nest.js
  82. 0 267
      ext/thirdparty/js/protovis/js/data/OrdinalScale.js
  83. 0 36
      ext/thirdparty/js/protovis/js/data/Scale.js
  84. 0 124
      ext/thirdparty/js/protovis/js/data/Tree.js
  85. 0 115
      ext/thirdparty/js/protovis/js/data/Vector.js
  86. 0 112
      ext/thirdparty/js/protovis/js/lang/Array.js
  87. 0 277
      ext/thirdparty/js/protovis/js/lang/Date.js
  88. 0 21
      ext/thirdparty/js/protovis/js/lang/init.js
  89. 0 49
      ext/thirdparty/js/protovis/js/layout/Grid.js
  90. 0 200
      ext/thirdparty/js/protovis/js/layout/Icicle.js
  91. 0 5
      ext/thirdparty/js/protovis/js/layout/Layout.js
  92. 0 80
      ext/thirdparty/js/protovis/js/layout/Stack.js
  93. 0 213
      ext/thirdparty/js/protovis/js/layout/Sunburst.js
  94. 0 319
      ext/thirdparty/js/protovis/js/layout/Treemap.js
  95. 0 45
      ext/thirdparty/js/protovis/js/mark/Anchor.js
  96. 0 253
      ext/thirdparty/js/protovis/js/mark/Area.js
  97. 0 182
      ext/thirdparty/js/protovis/js/mark/Bar.js
  98. 0 203
      ext/thirdparty/js/protovis/js/mark/Dot.js
  99. 0 48
      ext/thirdparty/js/protovis/js/mark/Image.js
  100. 0 144
      ext/thirdparty/js/protovis/js/mark/Label.js

+ 3 - 3
desktop/libs/protovis/static/js/Source/scripts.json

@@ -1,6 +1,6 @@
 {
 	"protovis": {
-		"protovis-d3.1": {
+		"protovis-d3.2": {
 			"deps": []
 		}
 	},
@@ -9,7 +9,7 @@
 			"deps" : ["Protovis","Protovis.Line","Protovis.Bar","Protovis.Pie"]
 		},
 		"Protovis" : {
-			"deps" : ["protovis-d3.1"]
+			"deps" : ["protovis-d3.2"]
 		},
 		"Protovis.Line" : {
 			"deps" : ["Protovis"]
@@ -21,4 +21,4 @@
 			"deps" : ["Protovis"]
 		}
 	}
-}
+}

+ 135 - 67
ext/thirdparty/js/protovis/Makefile

@@ -1,78 +1,146 @@
-# Protovis Makefile
-#
-# Note: This Makefile depends on the YUI Compressor for JavaScript
-# minification. The JAR file should be installed in the lib directory.
-# The YUI Compressor is available at http://yuilibrary.com/downloads/
-
 JS_LANG_FILES = \
-	js/lang/Array.js \
-	js/lang/Date.js
+	src/lang/Array.js
+
+JS_CORE_FILES = \
+	src/pv.js \
+	src/pv-internals.js \
+	src/lang/init.js \
+	src/text/Format.js \
+	src/text/DateFormat.js \
+	src/text/TimeFormat.js \
+	src/text/NumberFormat.js \
+	src/data/Arrays.js \
+	src/data/Numbers.js \
+	src/data/Objects.js \
+	src/data/Dom.js \
+	src/data/Tree.js \
+	src/data/Nest.js \
+	src/data/Flatten.js \
+	src/data/Vector.js \
+	src/data/Transform.js \
+	src/data/Scale.js \
+	src/data/QuantitativeScale.js \
+	src/data/LinearScale.js \
+	src/data/LogScale.js \
+	src/data/RootScale.js \
+	src/data/OrdinalScale.js \
+	src/data/QuantileScale.js \
+	src/data/Histogram.js \
+	src/color/Color.js \
+	src/color/Colors.js \
+	src/color/Ramp.js \
+	src/scene/svg/SvgScene.js \
+	src/scene/svg/SvgCurve.js \
+	src/scene/svg/SvgArea.js \
+	src/scene/svg/SvgBar.js \
+	src/scene/svg/SvgDot.js \
+	src/scene/svg/SvgImage.js \
+	src/scene/svg/SvgLabel.js \
+	src/scene/svg/SvgLine.js \
+	src/scene/svg/SvgPanel.js \
+	src/scene/svg/SvgRule.js \
+	src/scene/svg/SvgWedge.js \
+	src/scene/vml/VmlScene.js \
+	src/scene/vml/VmlArea.js \
+	src/scene/vml/VmlBar.js \
+	src/scene/vml/VmlDot.js \
+	src/scene/vml/VmlImage.js \
+	src/scene/vml/VmlLabel.js \
+	src/scene/vml/VmlLine.js \
+	src/scene/vml/VmlPanel.js \
+	src/scene/vml/VmlRule.js \
+	src/scene/vml/VmlWedge.js \
+	src/scene/Scene.js \
+	src/mark/Mark.js \
+	src/mark/Anchor.js \
+	src/mark/Area.js \
+	src/mark/Bar.js \
+	src/mark/Dot.js \
+	src/mark/Label.js \
+	src/mark/Line.js \
+	src/mark/Rule.js \
+	src/mark/Panel.js \
+	src/mark/Image.js \
+	src/mark/Wedge.js
 
-JS_PV_FILES = \
-	js/pv.js \
-	js/data/Tree.js \
-	js/data/Nest.js \
-	js/data/Flatten.js \
-	js/data/Vector.js \
-	js/data/Scale.js \
-	js/data/LinearScale.js \
-	js/data/LogScale.js \
-	js/data/OrdinalScale.js \
-	js/color/Color.js \
-	js/color/Colors.js \
-	js/color/Ramp.js \
-	js/scene/SvgScene.js \
-	js/scene/SvgArea.js \
-	js/scene/SvgBar.js \
-	js/scene/SvgDot.js \
-	js/scene/SvgImage.js \
-	js/scene/SvgLabel.js \
-	js/scene/SvgLine.js \
-	js/scene/SvgPanel.js \
-	js/scene/SvgRule.js \
-	js/scene/SvgWedge.js \
-	js/mark/Mark.js \
-	js/mark/Anchor.js \
-	js/mark/Area.js \
-	js/mark/Bar.js \
-	js/mark/Dot.js \
-	js/mark/Label.js \
-	js/mark/Line.js \
-	js/mark/Rule.js \
-	js/mark/Panel.js \
-	js/mark/Image.js \
-	js/mark/Wedge.js \
-	js/layout/Layout.js \
-	js/layout/Grid.js \
-	js/layout/Stack.js \
-	js/layout/Icicle.js \
-	js/layout/Sunburst.js \
-	js/layout/Treemap.js
+JS_LAYOUT_FILES = \
+	src/physics/Particle.js \
+	src/physics/Simulation.js \
+	src/physics/Quadtree.js \
+	src/physics/Force.js \
+	src/physics/ChargeForce.js \
+	src/physics/DragForce.js \
+	src/physics/SpringForce.js \
+	src/physics/Constraint.js \
+	src/physics/CollisionConstraint.js \
+	src/physics/PositionConstraint.js \
+	src/physics/BoundConstraint.js \
+	src/layout/Layout.js \
+	src/layout/Network.js \
+	src/layout/Hierarchy.js \
+	src/layout/Grid.js \
+	src/layout/Stack.js \
+	src/layout/Treemap.js \
+	src/layout/Tree.js \
+	src/layout/Indent.js \
+	src/layout/Pack.js \
+	src/layout/Force.js \
+	src/layout/Cluster.js \
+	src/layout/Partition.js \
+	src/layout/Arc.js \
+	src/layout/Horizon.js \
+	src/layout/Rollup.js \
+	src/layout/Matrix.js \
+	src/layout/Bullet.js \
+	src/behavior/Behavior.js \
+	src/behavior/Drag.js \
+	src/behavior/Point.js \
+	src/behavior/Select.js \
+	src/behavior/Resize.js \
+	src/behavior/Pan.js \
+	src/behavior/Zoom.js
+
+JS_GEO_FILES = \
+	src/geo/Geo.js \
+	src/geo/LatLng.js \
+	src/geo/Projection.js \
+	src/geo/Projections.js \
+	src/geo/GeoScale.js
 
 JS_FILES = \
 	$(JS_LANG_FILES) \
-	js/pv-start.js \
-	$(JS_PV_FILES) \
-	js/pv-end.js 
-# not needed because this is used for function expressions support (ugly eval).	HUE CHANGE
-#	js/lang/init.js     
+	$(JS_CORE_FILES) \
+	$(JS_LAYOUT_FILES) \
+	$(JS_GEO_FILES)
+
+JS_COMPILER = \
+	java -jar lib/google-compiler/compiler-20100201.jar \
+	--charset UTF-8 \
+	--warning_level=QUIET
 
-all: protovis-d3.1.js protovis-r3.1.js
+JSDOC_HOME = /Library/jsdoc-toolkit
+JSDOC = java -jar $(JSDOC_HOME)/jsrun.jar $(JSDOC_HOME)/app/run.js
 
-protovis-d3.1.js: $(JS_FILES) Makefile
-	grep '	' -Hn $(JS_FILES) && echo "ERROR: tab" && exit 1 || true
-	grep '
' -Hn $(JS_FILES) && echo "ERROR: dos newline" && exit 1 || true
-	grep ' $$' -Hn $(JS_FILES) && echo "ERROR: trailing space" && exit 1 || true
-	cat $(JS_FILES) > $@
+all: protovis-d3.2.js protovis-r3.2.js
+protovis-d3.2.js: $(JS_FILES)
+protovis-r3.2.js: $(JS_FILES)
 
-protovis-r3.1.js: protovis-d3.1.js
+%-d3.2.js: Makefile
+	grep '	' -Hn $(filter %.js,$^) && echo "ERROR: tab" && exit 1 || true
+	grep -P '\r\n' -Hn $(filter %.js,$^) && echo "ERROR: dos newline" && exit 1 || true
+	grep ' $$' -Hn $(filter %.js,$^) && echo "ERROR: trailing space" && exit 1 || true
 	rm -f $@
-	cat $(JS_LANG_FILES) | java -jar lib/yuicompressor-2.4.2.jar --charset UTF-8 --type js >> $@
-	cat js/pv-start.js >> $@
-	cat $(JS_PV_FILES) | java -jar lib/yuicompressor-2.4.2.jar --charset UTF-8 --type js >> $@
-	cat js/pv-end.js >> $@
-	cat js/lang/init.js | java -jar lib/yuicompressor-2.4.2.jar --charset UTF-8 --type js >> $@
+	echo "// $(shell git rev-parse HEAD)" >> $@
+	cat $(filter %.js,$^) >> $@
 
-clean:
-	rm -rf protovis-d3.1.js protovis-r3.1.js
+%-r3.2.js:: Makefile
+	rm -f $@
+	echo "// $(shell git rev-parse --short HEAD)" >> $@
+	cat $(filter %.js,$^) | $(JS_COMPILER) >> $@
 
+jsdoc: $(JS_FILES) Makefile
+	rm -rf jsdoc
+	$(JSDOC) -a -t=$(JSDOC_HOME)/templates/jsdoc -d=$@ -E="^pv-" $(JS_FILES)
+
+clean:
+	rm -rf protovis-d3.2.js protovis-r3.2.js jsdoc

+ 0 - 104
ext/thirdparty/js/protovis/README

@@ -1,104 +0,0 @@
-New in version 3.1:
-
-This is a minor release including a few bug fixes and minor new features. For
-more details on the new release, see:
-
-  http://code.google.com/p/protovis-js/wiki/ReleaseNotes
-
-  - panels now support an "overflow" property; set to "hidden" for clipping
-  - linear and log scales support tick formatting
-  - ordinal scale supports pv.index accessor
-  - log scale invert supports negative values
-  - avoid removing children on render to avoid spurious events
-
-New in version 3.0:
-
-We've moved all the documentation to the wiki so that it's easier to maintain.
-Feel free to add your comments. (And, if you're so inclined, join the group so
-you can contribute!)
-
-interaction
-  - properties now behave consistently in event handlers
-  - use local variables or properties to modify display
-  - can redraw at any level of the scene graph
-  - event handlers on parent panels are inherited by children
-  - can set window location to simulate links
-  - mark.mouse to get mouse location
-
-local variables (defs)
-  - use "def" to define local state per mark (e.g., def("foo"))
-  - event handlers can override def values (e.g., this.foo(42))
-  - properties can query def values (e.g., this.foo() == 42)
-  - can also be used to define efficient property functions (e.g., scales)
-
-scales
-  - pv.Scales is dead; long live pv.Scale
-  - scales each have a domain (input data) and range (output pixels/color/angle)
-  - scales are stateful, not magical
-  - ordinal scales are categorical (discrete domain and range)
-  - linear and log scales are quantiative (continuous domain and range)
-  - `by` functionality, useful as a "view"
-  - support for ticks, interaction, and more!
-
-colors
-  - default coloring now uses parent rather than (magical) mark index
-  - brighter and darker operators
-  - named colors (e.g., pv.ramp("brown", "orange"))
-  - `by` functionality standardized
-  - HSL to RGB conversion bug fixed
-  - per channel override methods (e.g. color.red(0))
-  - pv.Colors now uses pv.Scale.Ordinal under the hood
-
-layouts
-  - treemaps!
-  - sunbursts!
-  - icicles!
-  - tree size function for determining node size / children
-  - stack: allows stacking of bars and areas (etc.) with customizable baseline
-  - grid: two-dimensional table of bars or panels (heatmap, e.g.)
-
-properties
-  - evaluated in the order they are defined, allowing dependencies
-  - defs are evaluated before properties; constants before functions
-  - default data property is [d] rather than [null], simplifying nesting
-  - significant performance improvements!
-  - width and height now supported on rules
-
-data utilities
-  - pv.repeat for array repetition
-  - pv.random for random integers (or intervals)
-  - pv.log{,Adjusted,Symmetric,Floor,Ceil}
-  - pv.transpose for transposing two-dimensional arrays
-  - pv.Vector for 2D geometry
-  - pv.tree and pv.flatten for converting between tabular and hierarchical data
-
-lines and areas
-  - can be "segmented" for variable lineWidth, color, visibility
-  - segmentation can change dynamically (e.g., on mouseover tooltip refinement)
-  - see Napoleon's March and animated examples
-  - step functions!
-
-anchors
-  - now use a single class, pv.Anchor
-  - define properties like normal marks
-  - support for anchors on root panel / anchors on panels
-
-performance improvements
-  - separated rendering from building to allow pluggable renderers
-  - optimized evaluation of properties
-    - don't wrap constants in functions
-    - "bind" phase caches inherited property definitions
-  - minimize SVG output
-  - job voyager is about 2x faster
-
-bug fixes
-  - much more robust rebuild + re-render
-  - panel stroke now goes over children (consistent with images)
-  - circle dots with large lineWidths now render correctly
-  - reverse property now more robut
-  - type attribute now inherited; controls rendering behavior
-  - better JavaScript minification
-  - use typeof == "function" rather than instanceof Function
-  - internal scene graph structure changed to facilitate traversal
-  - panel left/top/right/bottom now consistent with other marks
-  - better support for Date.parse and Date.format

+ 0 - 20
ext/thirdparty/js/protovis/README_HUE

@@ -1,20 +0,0 @@
-
-Changes have been made to the Protovis code base by Hue.
-
-To find changes search directory for 'HUE CHANGE'
-
-Files:
-
-Makefile
---------
-	* removed js/lang/init.js from concat. 
-	* This is done for efficency. We don't use function expressions that require the eval within init.js
-
-js/mark/Panel.js
-----------------
-	* modified the pv.Panel.prototype.buildImplied function.
-	* The following isn't the best solution, however it has the least impact on the library. 
-	* There is some discussion going on how protovis is going to expose its interface for easier dynamic scripting. 
-	* Waiting for resolution before dramatic impact is made on code base. 
-	* In short I wanted the ability to have the graph injected into an element instead of before it in the DOM tree. 
-	* This does not break any demos or existing API.

+ 113 - 0
ext/thirdparty/js/protovis/examples/antibiotics/antibiotics-scatter.html

@@ -0,0 +1,113 @@
+<html>
+  <head>
+    <title>Antibiotic Effectiveness</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="antibiotics.js"></script>
+    <style type="text/css">
+
+#fig {
+  height: 638px;
+  width: 608px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var s = 180,
+    p = 20,
+    z = pv.Scale.log(0.001, 1000).range(0, s),
+    color = pv.colors("darkred", "darkblue").by(function(d) d.gram),
+    ticks = pv.range(-2, 3).map(function(e) Math.pow(10, e));
+
+/* Root panel. */
+var vis = new pv.Panel()
+    .height(s * antibiotics.length + p * (antibiotics.length - 1))
+    .width(function() this.height())
+    .top(14.5)
+    .left(14.5)
+    .bottom(44)
+    .right(14);
+
+/* Cell for each antibiotic pair. */
+var cell = vis.add(pv.Panel)
+    .data(antibiotics)
+    .width(s)
+    .left(function() (s + p) * this.index)
+  .add(pv.Panel)
+    .data(antibiotics)
+    .height(s)
+    .top(function() (s + p) * this.index);
+
+/* Label. */
+cell.anchor("center").add(pv.Label)
+    .visible(function(d, y, x) x == y)
+    .font("bold 14px sans-serif")
+    .text(function(d, y, x) x);
+
+/* Dot plot and frame. */
+var plot = cell.add(pv.Panel)
+    .data(function(y, x) [x])
+    .visible(function(x, y) x != y)
+    .strokeStyle("#aaa");
+
+/* Ticks. */
+var tick = new pv.Rule()
+    .visible(function(d, x, y) x != y)
+    .data(ticks)
+    .strokeStyle("#ddd");
+
+/* X-axis ticks. */
+var xtick = plot.add(pv.Rule)
+    .extend(tick)
+    .left(z);
+
+/* Bottom and top labels. */
+xtick.anchor("bottom").add(pv.Label)
+    .visible(function() cell.index == antibiotics.length - 1);
+xtick.anchor("top").add(pv.Label)
+    .visible(function() cell.index == 0);
+
+/* Y-axis ticks. */
+var ytick = plot.add(pv.Rule)
+    .extend(tick)
+    .bottom(z);
+
+/* Bottom and top labels. */
+ytick.anchor("right").add(pv.Label)
+    .visible(function() cell.parent.index == antibiotics.length - 1)
+    .textAngle(Math.PI / 2)
+    .textBaseline("bottom")
+    .textAlign("center");
+ytick.anchor("left").add(pv.Label)
+    .visible(function() cell.parent.index == 0)
+    .textAngle(-Math.PI / 2)
+    .textBaseline("bottom")
+    .textAlign("center");
+
+/* Dot plot. */
+var dot = plot.add(pv.Dot)
+    .data(bacteria)
+    .strokeStyle(color)
+    .fillStyle(function() this.strokeStyle().alpha(.2))
+    .left(function(d, x, y) z(d[x]))
+    .bottom(function(d, x, y) z(d[y]))
+    .title(function(d) d.name);
+
+/* Legend. */
+vis.add(pv.Dot)
+    .extend(dot)
+    .data([{gram:"positive"}, {gram:"negative"}])
+    .bottom(-30)
+    .left(function() this.index * 100)
+    .title(null)
+  .anchor("right").add(pv.Label)
+    .text(function(d) "Gram-" + d.gram);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 140 - 0
ext/thirdparty/js/protovis/examples/antibiotics/antibiotics.html

@@ -0,0 +1,140 @@
+<html>
+  <head>
+    <title>Antibiotic Effectiveness</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="antibiotics.js"></script>
+    <style type="text/css">
+
+body {
+  background: rgb(240, 225, 210);
+}
+
+#fig {
+  height: 800px;
+  width: 700px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* Basic dimensions. */
+var width = 700,
+    height = 700,
+    innerRadius = 90,
+    outerRadius = 300 - 10;
+
+/* Colors. */
+var drugColor = {
+    Penicillin: "rgb(10, 50, 100)",
+    Streptomycin: "rgb(200, 70, 50)",
+    Neomycin: "black"
+  }, gramColor = {
+    positive: "rgba(174, 174, 184, .8)",
+    negative: "rgba(230, 130, 110, .8)"
+  };
+
+/* Burtin's radius encoding is, as far as I can tell, sqrt(log(mic)). */
+var min = Math.sqrt(Math.log(.001 * 1E4)),
+    max = Math.sqrt(Math.log(1000 * 1E4)),
+    a = (outerRadius - innerRadius) / (min - max),
+    b = innerRadius - a * max,
+    radius = function(mic) a * Math.sqrt(Math.log(mic * 1E4)) + b;
+
+/*
+ * The pie is split into equal sections for each bacteria, with a blank
+ * section at the top for the grid labels. Each wedge is further
+ * subdivided to make room for the three antibiotics, equispaced.
+ */
+var bigAngle = 2.0 * Math.PI / (bacteria.length + 1),
+    smallAngle = bigAngle / 7;
+
+/* The root panel. */
+var vis = new pv.Panel()
+    .width(width)
+    .height(height)
+    .bottom(100);
+
+/* Background wedges to indicate gram staining color. */
+var bg = vis.add(pv.Wedge)
+    .data(bacteria) // assumes Burtin's order
+    .left(width / 2)
+    .top(height / 2)
+    .innerRadius(innerRadius)
+    .outerRadius(outerRadius)
+    .angle(bigAngle)
+    .startAngle(function(d) this.index * bigAngle + bigAngle / 2 - Math.PI / 2)
+    .fillStyle(function(d) gramColor[d.gram]);
+
+/* Antibiotics. */
+bg.add(pv.Wedge)
+    .angle(smallAngle)
+    .startAngle(function(d) bg.startAngle() + smallAngle)
+    .outerRadius(function(d) radius(d.penicillin))
+    .fillStyle(drugColor.Penicillin)
+  .add(pv.Wedge)
+    .startAngle(function(d) this.proto.startAngle() + 2 * smallAngle)
+    .outerRadius(function(d) radius(d.streptomycin))
+    .fillStyle(drugColor.Streptomycin)
+  .add(pv.Wedge)
+    .outerRadius(function(d) radius(d.neomycin))
+    .fillStyle(drugColor.Neomycin);
+
+/* Circular grid lines. */
+bg.add(pv.Dot)
+    .data(pv.range(-3, 4))
+    .fillStyle(null)
+    .strokeStyle("#eee")
+    .lineWidth(1)
+    .size(function(i) Math.pow(radius(Math.pow(10, i)), 2))
+  .anchor("top").add(pv.Label)
+    .visible(function(i) i < 3)
+    .textBaseline("middle")
+    .text(function(i) Math.pow(10, i).toFixed((i > 0) ? 0 : -i));
+
+/* Radial grid lines. */
+bg.add(pv.Wedge)
+    .data(pv.range(bacteria.length + 1))
+    .innerRadius(innerRadius - 10)
+    .outerRadius(outerRadius + 10)
+    .fillStyle(null)
+    .strokeStyle("black")
+    .angle(0);
+
+/* Labels. */
+bg.anchor("outer").add(pv.Label)
+    .textAlign("center")
+    .text(function(d) d.bacteria);
+
+/* Antibiotic legend. */
+vis.add(pv.Bar)
+    .data(pv.keys(drugColor))
+    .right(width / 2 + 3)
+    .top(function() height / 2 - 28 + this.index * 18)
+    .fillStyle(function(d) drugColor[d])
+    .width(36)
+    .height(12)
+  .anchor("right").add(pv.Label)
+    .textMargin(6)
+    .textAlign("left");
+
+/* Gram-stain legend. */
+vis.add(pv.Dot)
+    .data(pv.keys(gramColor))
+    .left(width / 2 - 20)
+    .bottom(function() -60 + this.index * 18)
+    .fillStyle(function(d) gramColor[d])
+    .strokeStyle(null)
+    .size(30)
+  .anchor("right").add(pv.Label)
+    .textMargin(6)
+    .textAlign("left")
+    .text(function(d) "Gram-" + d);
+
+vis.render();
+
+    </script>
+  </center></body>
+</html>

+ 20 - 0
ext/thirdparty/js/protovis/examples/antibiotics/antibiotics.js

@@ -0,0 +1,20 @@
+var antibiotics = ["penicillin", "streptomycin", "neomycin"];
+
+var bacteria = [
+  {name: "Mycobacterium tuberculosis", penicillin: 800, streptomycin: 5, neomycin: 2, gram: "negative"},
+  {name: "Salmonella schottmuelleri", penicillin: 10, streptomycin: 0.8, neomycin: 0.09, gram: "negative"},
+  {name: "Proteus vulgaris", penicillin: 3, streptomycin: 0.1, neomycin: 0.1, gram: "negative"},
+  {name: "Klebsiella pneumoniae", penicillin: 850, streptomycin: 1.2, neomycin: 1, gram: "negative"},
+  {name: "Brucella abortus", penicillin: 1, streptomycin: 2, neomycin: 0.02, gram: "negative"},
+  {name: "Pseudomonas aeruginosa", penicillin: 850, streptomycin: 2, neomycin: 0.4, gram: "negative"},
+  {name: "Escherichia coli", penicillin: 100, streptomycin: 0.4, neomycin: 0.1, gram: "negative"},
+  {name: "Salmonella (Eberthella) typhosa", penicillin: 1, streptomycin: 0.4, neomycin: 0.008, gram: "negative"},
+  {name: "Aerobacter aerogenes", penicillin: 870, streptomycin: 1, neomycin: 1.6, gram: "negative"},
+  {name: "Brucella antracis", penicillin: 0.001, streptomycin: 0.01, neomycin: 0.007, gram: "positive"},
+  {name: "Streptococcus fecalis", penicillin: 1, streptomycin: 1, neomycin: 0.1, gram: "positive"},
+  {name: "Staphylococcus aureus", penicillin: 0.03, streptomycin: 0.03, neomycin: 0.001, gram: "positive"},
+  {name: "Staphylococcus albus", penicillin: 0.007, streptomycin: 0.1, neomycin: 0.001, gram: "positive"},
+  {name: "Streptococcus hemolyticus", penicillin: 0.001, streptomycin: 14, neomycin: 10, gram: "positive"},
+  {name: "Streptococcus viridans", penicillin: 0.005, streptomycin: 10, neomycin: 40, gram: "positive"},
+  {name: "Diplococcus pneumoniae", penicillin: 0.005, streptomycin: 11, neomycin: 10, gram: "positive"}
+];

+ 0 - 55
ext/thirdparty/js/protovis/examples/area-stacked.html

@@ -1,55 +0,0 @@
-<html>
-  <head>
-    <title>Stacked Area Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(4).map(function()
-        pv.range(0, 10, .1).map(function(x) {
-            return {x: x, y: Math.sin(x) + Math.random() * .5 + 2};
-          })),
-    w = 400,
-    h = 200,
-    x = pv.Scale.linear(0, 9.9).range(0, w),
-    y = pv.Scale.linear(0, 14).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5)
-    .strokeStyle("#ccc");
-
-vis.add(pv.Panel)
-    .data(data)
-  .add(pv.Area)
-    .data(function(a) a)
-    .left(function(d) x(d.x))
-    .bottom(pv.Layout.stack())
-    .height(function(d) y(d.y));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .visible(function(d) d > 0)
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle("rgba(128,128,128,.1)")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .visible(function() !(this.index % 2))
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle("rgba(128,128,128,.2)")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/area-stacked.png


+ 0 - 56
ext/thirdparty/js/protovis/examples/area.html

@@ -1,56 +0,0 @@
-<html>
-  <head>
-    <title>Area Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(0, 10, .1).map(function(x) {
-        return {x: x, y: Math.sin(x) + Math.random() * .5 + 2};
-      }),
-    w = 400,
-    h = 200,
-    x = pv.Scale.linear(data, function(d) d.x).range(0, w),
-    y = pv.Scale.linear(0, 4).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5)
-    .strokeStyle("#ccc");
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .visible(function() !(this.index % 2))
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .visible(function(d) d > 0)
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.add(pv.Area)
-    .data(data)
-    .left(function(d) x(d.x))
-    .bottom(0)
-    .height(function(d) y(d.y))
-    .fillStyle("rgba(31,119,180,.6)")
-  .anchor("top").add(pv.Line)
-    .lineWidth(3)
-    .fillStyle(null);
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/area.png


+ 0 - 63
ext/thirdparty/js/protovis/examples/bar-grouped.html

@@ -1,63 +0,0 @@
-<html>
-  <head>
-    <title>Grouped Bar Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var n = 3,
-    m = 4,
-    data = pv.range(n).map(function() pv.range(m).map(Math.random)),
-    w = 400,
-    h = 250,
-    x = pv.Scale.linear(0, 1).range(0, w),
-    y = pv.Scale.ordinal(pv.range(n)).splitBanded(0, h, 4/5);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5);
-
-var bar = vis.add(pv.Panel)
-    .data(data)
-    .top(function() y(this.index))
-  .add(pv.Bar)
-    .data(function(a) a)
-    .top(function() this.index * y.range().band / m)
-    .height(y.range().band / m)
-    .left(0)
-    .width(x)
-    .fillStyle(pv.Colors.category20().by(pv.index));
-
-bar.anchor("right").add(pv.Label)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Label)
-    .data(pv.range(n))
-    .left(0)
-    .top(function() y(this.index) + y.range().band / 2)
-    .textMargin(5)
-    .textAlign("right")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .bottom(0)
-    .height(5)
-    .strokeStyle("#000")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/bar-grouped.png


+ 0 - 58
ext/thirdparty/js/protovis/examples/bar-stacked.html

@@ -1,58 +0,0 @@
-<html>
-  <head>
-    <title>Stacked Bar Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(3).map(function() pv.range(10).map(Math.random)),
-    w = 400,
-    h = 250,
-    x = pv.Scale.linear(0, 3).range(0, w),
-    y = pv.Scale.ordinal(pv.range(10)).splitBanded(0, h, 4/5);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5);
-
-var bar = vis.add(pv.Panel)
-    .data(data)
-  .add(pv.Bar)
-    .data(function(a) a)
-    .top(function() y(this.index))
-    .height(y.range().band)
-    .left(pv.Layout.stack())
-    .width(x);
-
-bar.anchor("right").add(pv.Label)
-    .visible(function(d) d > .2)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-bar.anchor("left").add(pv.Label)
-    .visible(function() !this.parent.index)
-    .textMargin(5)
-    .textAlign("right")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .bottom(0)
-    .height(5)
-    .strokeStyle("#000")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/bar-stacked.png


+ 0 - 54
ext/thirdparty/js/protovis/examples/bar.html

@@ -1,54 +0,0 @@
-<html>
-  <head>
-    <title>Bar Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(10).map(Math.random),
-    w = 400,
-    h = 250,
-    x = pv.Scale.linear(0, 1).range(0, w),
-    y = pv.Scale.ordinal(pv.range(10)).splitBanded(0, h, 4/5);
-
-var vis =new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5);
-
-var bar = vis.add(pv.Bar)
-    .data(data)
-    .top(function() y(this.index))
-    .height(y.range().band)
-    .left(0)
-    .width(x);
-
-bar.anchor("right").add(pv.Label)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-bar.anchor("left").add(pv.Label)
-    .textMargin(5)
-    .textAlign("right")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .bottom(0)
-    .height(5)
-    .strokeStyle("#000")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/bar.png


+ 102 - 0
ext/thirdparty/js/protovis/examples/barley/barley.html

@@ -0,0 +1,102 @@
+<html>
+  <head>
+    <title>Barley Yields</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="barley.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 334px;
+  height: 833px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* Compute yield medians by site and by variety. */
+function median(data) pv.median(data, function(d) d.yield);
+var site = pv.nest(barley).key(function(d) d.site).rollup(median);
+var variety = pv.nest(barley).key(function(d) d.variety).rollup(median);
+
+/* Nest yields data by site then year. */
+barley = pv.nest(barley)
+    .key(function(d) d.site)
+    .sortKeys(function(a, b) site[b] - site[a])
+    .key(function(d) d.year)
+    .sortValues(function(a, b) variety[b.variety] - variety[a.variety])
+    .entries();
+
+/* Sizing and scales. */
+var w = 332,
+    h = 132,
+    x = pv.Scale.linear(10, 90).range(0, w),
+    c = pv.Colors.category10();
+
+/* The root panel. */
+var vis = new pv.Panel()
+    .width(w)
+    .height(h * pv.keys(site).length)
+    .top(15.5)
+    .left(.5)
+    .right(.5)
+    .bottom(25);
+
+/* A panel per site-year. */
+var cell = vis.add(pv.Panel)
+    .data(barley)
+    .height(h)
+    .left(90)
+    .top(function() this.index * h)
+    .strokeStyle("#999");
+
+/* Title bar. */
+cell.add(pv.Bar)
+    .height(14)
+    .fillStyle("bisque")
+  .anchor("center").add(pv.Label)
+    .text(function(site) site.key);
+
+/* A dot showing the yield. */
+var dot = cell.add(pv.Panel)
+    .data(function(site) site.values)
+    .top(23)
+  .add(pv.Dot)
+    .data(function(year) year.values)
+    .left(function(d) x(d.yield))
+    .top(function() this.index * 11)
+    .size(10)
+    .lineWidth(2)
+    .strokeStyle(function(d) c(d.year));
+
+/* A label showing the variety. */
+dot.anchor("left").add(pv.Label)
+    .visible(function() !this.parent.index)
+    .left(-2)
+    .text(function(d) d.variety);
+
+/* X-ticks. */
+vis.add(pv.Rule)
+    .data(x.ticks())
+    .left(function(d) 90 + x(d))
+    .bottom(-5)
+    .height(5)
+    .strokeStyle("#999")
+  .anchor("bottom").add(pv.Label);
+
+/* A legend showing the year. */
+vis.add(pv.Dot)
+    .extend(dot)
+    .data([{year:1931}, {year:1932}])
+    .left(function(d) 260 + this.index * 40)
+    .top(-8)
+  .anchor("right").add(pv.Label)
+    .text(function(d) d.year);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 122 - 0
ext/thirdparty/js/protovis/examples/barley/barley.js

@@ -0,0 +1,122 @@
+var barley = [
+  { yield: 27.00000, variety: "Manchuria", year: 1931, site: "University Farm" },
+  { yield: 48.86667, variety: "Manchuria", year: 1931, site: "Waseca" },
+  { yield: 27.43334, variety: "Manchuria", year: 1931, site: "Morris" },
+  { yield: 39.93333, variety: "Manchuria", year: 1931, site: "Crookston" },
+  { yield: 32.96667, variety: "Manchuria", year: 1931, site: "Grand Rapids" },
+  { yield: 28.96667, variety: "Manchuria", year: 1931, site: "Duluth" },
+  { yield: 43.06666, variety: "Glabron", year: 1931, site: "University Farm" },
+  { yield: 55.20000, variety: "Glabron", year: 1931, site: "Waseca" },
+  { yield: 28.76667, variety: "Glabron", year: 1931, site: "Morris" },
+  { yield: 38.13333, variety: "Glabron", year: 1931, site: "Crookston" },
+  { yield: 29.13333, variety: "Glabron", year: 1931, site: "Grand Rapids" },
+  { yield: 29.66667, variety: "Glabron", year: 1931, site: "Duluth" },
+  { yield: 35.13333, variety: "Svansota", year: 1931, site: "University Farm" },
+  { yield: 47.33333, variety: "Svansota", year: 1931, site: "Waseca" },
+  { yield: 25.76667, variety: "Svansota", year: 1931, site: "Morris" },
+  { yield: 40.46667, variety: "Svansota", year: 1931, site: "Crookston" },
+  { yield: 29.66667, variety: "Svansota", year: 1931, site: "Grand Rapids" },
+  { yield: 25.70000, variety: "Svansota", year: 1931, site: "Duluth" },
+  { yield: 39.90000, variety: "Velvet", year: 1931, site: "University Farm" },
+  { yield: 50.23333, variety: "Velvet", year: 1931, site: "Waseca" },
+  { yield: 26.13333, variety: "Velvet", year: 1931, site: "Morris" },
+  { yield: 41.33333, variety: "Velvet", year: 1931, site: "Crookston" },
+  { yield: 23.03333, variety: "Velvet", year: 1931, site: "Grand Rapids" },
+  { yield: 26.30000, variety: "Velvet", year: 1931, site: "Duluth" },
+  { yield: 36.56666, variety: "Trebi", year: 1931, site: "University Farm" },
+  { yield: 63.83330, variety: "Trebi", year: 1931, site: "Waseca" },
+  { yield: 43.76667, variety: "Trebi", year: 1931, site: "Morris" },
+  { yield: 46.93333, variety: "Trebi", year: 1931, site: "Crookston" },
+  { yield: 29.76667, variety: "Trebi", year: 1931, site: "Grand Rapids" },
+  { yield: 33.93333, variety: "Trebi", year: 1931, site: "Duluth" },
+  { yield: 43.26667, variety: "No. 457", year: 1931, site: "University Farm" },
+  { yield: 58.10000, variety: "No. 457", year: 1931, site: "Waseca" },
+  { yield: 28.70000, variety: "No. 457", year: 1931, site: "Morris" },
+  { yield: 45.66667, variety: "No. 457", year: 1931, site: "Crookston" },
+  { yield: 32.16667, variety: "No. 457", year: 1931, site: "Grand Rapids" },
+  { yield: 33.60000, variety: "No. 457", year: 1931, site: "Duluth" },
+  { yield: 36.60000, variety: "No. 462", year: 1931, site: "University Farm" },
+  { yield: 65.76670, variety: "No. 462", year: 1931, site: "Waseca" },
+  { yield: 30.36667, variety: "No. 462", year: 1931, site: "Morris" },
+  { yield: 48.56666, variety: "No. 462", year: 1931, site: "Crookston" },
+  { yield: 24.93334, variety: "No. 462", year: 1931, site: "Grand Rapids" },
+  { yield: 28.10000, variety: "No. 462", year: 1931, site: "Duluth" },
+  { yield: 32.76667, variety: "Peatland", year: 1931, site: "University Farm" },
+  { yield: 48.56666, variety: "Peatland", year: 1931, site: "Waseca" },
+  { yield: 29.86667, variety: "Peatland", year: 1931, site: "Morris" },
+  { yield: 41.60000, variety: "Peatland", year: 1931, site: "Crookston" },
+  { yield: 34.70000, variety: "Peatland", year: 1931, site: "Grand Rapids" },
+  { yield: 32.00000, variety: "Peatland", year: 1931, site: "Duluth" },
+  { yield: 24.66667, variety: "No. 475", year: 1931, site: "University Farm" },
+  { yield: 46.76667, variety: "No. 475", year: 1931, site: "Waseca" },
+  { yield: 22.60000, variety: "No. 475", year: 1931, site: "Morris" },
+  { yield: 44.10000, variety: "No. 475", year: 1931, site: "Crookston" },
+  { yield: 19.70000, variety: "No. 475", year: 1931, site: "Grand Rapids" },
+  { yield: 33.06666, variety: "No. 475", year: 1931, site: "Duluth" },
+  { yield: 39.30000, variety: "Wisconsin No. 38", year: 1931, site: "University Farm" },
+  { yield: 58.80000, variety: "Wisconsin No. 38", year: 1931, site: "Waseca" },
+  { yield: 29.46667, variety: "Wisconsin No. 38", year: 1931, site: "Morris" },
+  { yield: 49.86667, variety: "Wisconsin No. 38", year: 1931, site: "Crookston" },
+  { yield: 34.46667, variety: "Wisconsin No. 38", year: 1931, site: "Grand Rapids" },
+  { yield: 31.60000, variety: "Wisconsin No. 38", year: 1931, site: "Duluth" },
+  { yield: 26.90000, variety: "Manchuria", year: 1932, site: "University Farm" },
+  { yield: 33.46667, variety: "Manchuria", year: 1932, site: "Waseca" },
+  { yield: 34.36666, variety: "Manchuria", year: 1932, site: "Morris" },
+  { yield: 32.96667, variety: "Manchuria", year: 1932, site: "Crookston" },
+  { yield: 22.13333, variety: "Manchuria", year: 1932, site: "Grand Rapids" },
+  { yield: 22.56667, variety: "Manchuria", year: 1932, site: "Duluth" },
+  { yield: 36.80000, variety: "Glabron", year: 1932, site: "University Farm" },
+  { yield: 37.73333, variety: "Glabron", year: 1932, site: "Waseca" },
+  { yield: 35.13333, variety: "Glabron", year: 1932, site: "Morris" },
+  { yield: 26.16667, variety: "Glabron", year: 1932, site: "Crookston" },
+  { yield: 14.43333, variety: "Glabron", year: 1932, site: "Grand Rapids" },
+  { yield: 25.86667, variety: "Glabron", year: 1932, site: "Duluth" },
+  { yield: 27.43334, variety: "Svansota", year: 1932, site: "University Farm" },
+  { yield: 38.50000, variety: "Svansota", year: 1932, site: "Waseca" },
+  { yield: 35.03333, variety: "Svansota", year: 1932, site: "Morris" },
+  { yield: 20.63333, variety: "Svansota", year: 1932, site: "Crookston" },
+  { yield: 16.63333, variety: "Svansota", year: 1932, site: "Grand Rapids" },
+  { yield: 22.23333, variety: "Svansota", year: 1932, site: "Duluth" },
+  { yield: 26.80000, variety: "Velvet", year: 1932, site: "University Farm" },
+  { yield: 37.40000, variety: "Velvet", year: 1932, site: "Waseca" },
+  { yield: 38.83333, variety: "Velvet", year: 1932, site: "Morris" },
+  { yield: 32.06666, variety: "Velvet", year: 1932, site: "Crookston" },
+  { yield: 32.23333, variety: "Velvet", year: 1932, site: "Grand Rapids" },
+  { yield: 22.46667, variety: "Velvet", year: 1932, site: "Duluth" },
+  { yield: 29.06667, variety: "Trebi", year: 1932, site: "University Farm" },
+  { yield: 49.23330, variety: "Trebi", year: 1932, site: "Waseca" },
+  { yield: 46.63333, variety: "Trebi", year: 1932, site: "Morris" },
+  { yield: 41.83333, variety: "Trebi", year: 1932, site: "Crookston" },
+  { yield: 20.63333, variety: "Trebi", year: 1932, site: "Grand Rapids" },
+  { yield: 30.60000, variety: "Trebi", year: 1932, site: "Duluth" },
+  { yield: 26.43334, variety: "No. 457", year: 1932, site: "University Farm" },
+  { yield: 42.20000, variety: "No. 457", year: 1932, site: "Waseca" },
+  { yield: 43.53334, variety: "No. 457", year: 1932, site: "Morris" },
+  { yield: 34.33333, variety: "No. 457", year: 1932, site: "Crookston" },
+  { yield: 19.46667, variety: "No. 457", year: 1932, site: "Grand Rapids" },
+  { yield: 22.70000, variety: "No. 457", year: 1932, site: "Duluth" },
+  { yield: 25.56667, variety: "No. 462", year: 1932, site: "University Farm" },
+  { yield: 44.70000, variety: "No. 462", year: 1932, site: "Waseca" },
+  { yield: 47.00000, variety: "No. 462", year: 1932, site: "Morris" },
+  { yield: 30.53333, variety: "No. 462", year: 1932, site: "Crookston" },
+  { yield: 19.90000, variety: "No. 462", year: 1932, site: "Grand Rapids" },
+  { yield: 22.50000, variety: "No. 462", year: 1932, site: "Duluth" },
+  { yield: 28.06667, variety: "Peatland", year: 1932, site: "University Farm" },
+  { yield: 36.03333, variety: "Peatland", year: 1932, site: "Waseca" },
+  { yield: 43.20000, variety: "Peatland", year: 1932, site: "Morris" },
+  { yield: 25.23333, variety: "Peatland", year: 1932, site: "Crookston" },
+  { yield: 26.76667, variety: "Peatland", year: 1932, site: "Grand Rapids" },
+  { yield: 31.36667, variety: "Peatland", year: 1932, site: "Duluth" },
+  { yield: 30.00000, variety: "No. 475", year: 1932, site: "University Farm" },
+  { yield: 41.26667, variety: "No. 475", year: 1932, site: "Waseca" },
+  { yield: 44.23333, variety: "No. 475", year: 1932, site: "Morris" },
+  { yield: 32.13333, variety: "No. 475", year: 1932, site: "Crookston" },
+  { yield: 15.23333, variety: "No. 475", year: 1932, site: "Grand Rapids" },
+  { yield: 27.36667, variety: "No. 475", year: 1932, site: "Duluth" },
+  { yield: 38.00000, variety: "Wisconsin No. 38", year: 1932, site: "University Farm" },
+  { yield: 58.16667, variety: "Wisconsin No. 38", year: 1932, site: "Waseca" },
+  { yield: 47.16667, variety: "Wisconsin No. 38", year: 1932, site: "Morris" },
+  { yield: 35.90000, variety: "Wisconsin No. 38", year: 1932, site: "Crookston" },
+  { yield: 20.66667, variety: "Wisconsin No. 38", year: 1932, site: "Grand Rapids" },
+  { yield: 29.33333, variety: "Wisconsin No. 38", year: 1932, site: "Duluth" }
+];

+ 90 - 0
ext/thirdparty/js/protovis/examples/cars/cars.html

@@ -0,0 +1,90 @@
+<html>
+  <head>
+    <title>Cars</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="cars.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 880px;
+  height: 460px;
+}
+
+#title {
+  position: absolute;
+  top: 70px;
+  left: 200px;
+  padding: 10px;
+  background: white;
+}
+
+large {
+  font-size: medium;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* The dimensions to visualize, in order. */
+var dims = [
+  "cylinders",
+  "displacement",
+  "weight",
+  "horsepower",
+  "acceleration",
+  "mpg",
+  "year",
+  "origin"
+];
+
+/* Sizing and scales. */
+var w = 840,
+    h = 420,
+    color = pv.Colors.category10(),
+    x = pv.Scale.ordinal(dims).splitFlush(0, w),
+    y = pv.dict(dims, function(t) pv.Scale.linear()
+            .domain(cars.filter(function(d) !isNaN(d[t])), function(d) d[t])
+            .range(0, h));
+
+/* The root panel. */
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(20)
+    .bottom(40);
+
+/* Rule and labels per dimension. */
+var rule = vis.add(pv.Rule)
+    .data(dims)
+    .left(x)
+    .strokeStyle(color.by(pv.index))
+    .lineWidth(2);
+
+rule.anchor("top").add(pv.Label)
+    .text(function(t) y[t].domain()[0]);
+
+rule.anchor("bottom").add(pv.Label)
+    .text(function(t) y[t].domain()[1]);
+
+rule.anchor("bottom").add(pv.Label)
+    .textStyle(function() color(this.index).darker())
+    .textMargin(14);
+
+/* Parallel coordinates. */
+vis.add(pv.Panel)
+    .data(cars)
+  .add(pv.Line)
+    .data(dims)
+    .left(function(t, d) x(t))
+    .bottom(function(t, d) y[t](d[t]))
+    .strokeStyle("rgba(0, 0, 0, .2)")
+    .lineWidth(1);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 408 - 0
ext/thirdparty/js/protovis/examples/cars/cars.js

@@ -0,0 +1,408 @@
+var cars = [
+{name:"chevrolet chevelle malibu", mpg:18, cylinders:8, displacement:307, horsepower:130, weight:3504, acceleration:12, year:70, origin:1},
+{name:"buick skylark 320", mpg:15, cylinders:8, displacement:350, horsepower:165, weight:3693, acceleration:11.5, year:70, origin:1},
+{name:"plymouth satellite", mpg:18, cylinders:8, displacement:318, horsepower:150, weight:3436, acceleration:11, year:70, origin:1},
+{name:"amc rebel sst", mpg:16, cylinders:8, displacement:304, horsepower:150, weight:3433, acceleration:12, year:70, origin:1},
+{name:"ford torino", mpg:17, cylinders:8, displacement:302, horsepower:140, weight:3449, acceleration:10.5, year:70, origin:1},
+{name:"ford galaxie 500", mpg:15, cylinders:8, displacement:429, horsepower:198, weight:4341, acceleration:10, year:70, origin:1},
+{name:"chevrolet impala", mpg:14, cylinders:8, displacement:454, horsepower:220, weight:4354, acceleration:9, year:70, origin:1},
+{name:"plymouth fury iii", mpg:14, cylinders:8, displacement:440, horsepower:215, weight:4312, acceleration:8.5, year:70, origin:1},
+{name:"pontiac catalina", mpg:14, cylinders:8, displacement:455, horsepower:225, weight:4425, acceleration:10, year:70, origin:1},
+{name:"amc ambassador dpl", mpg:15, cylinders:8, displacement:390, horsepower:190, weight:3850, acceleration:8.5, year:70, origin:1},
+{name:"citroen ds-21 pallas", mpg:undefined, cylinders:4, displacement:133, horsepower:115, weight:3090, acceleration:17.5, year:70, origin:2},
+{name:"chevrolet chevelle concours (sw)", mpg:undefined, cylinders:8, displacement:350, horsepower:165, weight:4142, acceleration:11.5, year:70, origin:1},
+{name:"ford torino (sw)", mpg:undefined, cylinders:8, displacement:351, horsepower:153, weight:4034, acceleration:11, year:70, origin:1},
+{name:"plymouth satellite (sw)", mpg:undefined, cylinders:8, displacement:383, horsepower:175, weight:4166, acceleration:10.5, year:70, origin:1},
+{name:"amc rebel sst (sw)", mpg:undefined, cylinders:8, displacement:360, horsepower:175, weight:3850, acceleration:11, year:70, origin:1},
+{name:"dodge challenger se", mpg:15, cylinders:8, displacement:383, horsepower:170, weight:3563, acceleration:10, year:70, origin:1},
+{name:"plymouth 'cuda 340", mpg:14, cylinders:8, displacement:340, horsepower:160, weight:3609, acceleration:8, year:70, origin:1},
+{name:"ford mustang boss 302", mpg:undefined, cylinders:8, displacement:302, horsepower:140, weight:3353, acceleration:8, year:70, origin:1},
+{name:"chevrolet monte carlo", mpg:15, cylinders:8, displacement:400, horsepower:150, weight:3761, acceleration:9.5, year:70, origin:1},
+{name:"buick estate wagon (sw)", mpg:14, cylinders:8, displacement:455, horsepower:225, weight:3086, acceleration:10, year:70, origin:1},
+{name:"toyota corona mark ii", mpg:24, cylinders:4, displacement:113, horsepower:95, weight:2372, acceleration:15, year:70, origin:3},
+{name:"plymouth duster", mpg:22, cylinders:6, displacement:198, horsepower:95, weight:2833, acceleration:15.5, year:70, origin:1},
+{name:"amc hornet", mpg:18, cylinders:6, displacement:199, horsepower:97, weight:2774, acceleration:15.5, year:70, origin:1},
+{name:"ford maverick", mpg:21, cylinders:6, displacement:200, horsepower:85, weight:2587, acceleration:16, year:70, origin:1},
+{name:"datsun pl510", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2130, acceleration:14.5, year:70, origin:3},
+{name:"volkswagen 1131 deluxe sedan", mpg:26, cylinders:4, displacement:97, horsepower:46, weight:1835, acceleration:20.5, year:70, origin:2},
+{name:"peugeot 504", mpg:25, cylinders:4, displacement:110, horsepower:87, weight:2672, acceleration:17.5, year:70, origin:2},
+{name:"audi 100 ls", mpg:24, cylinders:4, displacement:107, horsepower:90, weight:2430, acceleration:14.5, year:70, origin:2},
+{name:"saab 99e", mpg:25, cylinders:4, displacement:104, horsepower:95, weight:2375, acceleration:17.5, year:70, origin:2},
+{name:"bmw 2002", mpg:26, cylinders:4, displacement:121, horsepower:113, weight:2234, acceleration:12.5, year:70, origin:2},
+{name:"amc gremlin", mpg:21, cylinders:6, displacement:199, horsepower:90, weight:2648, acceleration:15, year:70, origin:1},
+{name:"ford f250", mpg:10, cylinders:8, displacement:360, horsepower:215, weight:4615, acceleration:14, year:70, origin:1},
+{name:"chevy c20", mpg:10, cylinders:8, displacement:307, horsepower:200, weight:4376, acceleration:15, year:70, origin:1},
+{name:"dodge d200", mpg:11, cylinders:8, displacement:318, horsepower:210, weight:4382, acceleration:13.5, year:70, origin:1},
+{name:"hi 1200d", mpg:9, cylinders:8, displacement:304, horsepower:193, weight:4732, acceleration:18.5, year:70, origin:1},
+{name:"datsun pl510", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2130, acceleration:14.5, year:71, origin:3},
+{name:"chevrolet vega 2300", mpg:28, cylinders:4, displacement:140, horsepower:90, weight:2264, acceleration:15.5, year:71, origin:1},
+{name:"toyota corona", mpg:25, cylinders:4, displacement:113, horsepower:95, weight:2228, acceleration:14, year:71, origin:3},
+{name:"ford pinto", mpg:25, cylinders:4, displacement:98, horsepower:undefined, weight:2046, acceleration:19, year:71, origin:1},
+{name:"volkswagen super beetle 117", mpg:undefined, cylinders:4, displacement:97, horsepower:48, weight:1978, acceleration:20, year:71, origin:2},
+{name:"amc gremlin", mpg:19, cylinders:6, displacement:232, horsepower:100, weight:2634, acceleration:13, year:71, origin:1},
+{name:"plymouth satellite custom", mpg:16, cylinders:6, displacement:225, horsepower:105, weight:3439, acceleration:15.5, year:71, origin:1},
+{name:"chevrolet chevelle malibu", mpg:17, cylinders:6, displacement:250, horsepower:100, weight:3329, acceleration:15.5, year:71, origin:1},
+{name:"ford torino 500", mpg:19, cylinders:6, displacement:250, horsepower:88, weight:3302, acceleration:15.5, year:71, origin:1},
+{name:"amc matador", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:3288, acceleration:15.5, year:71, origin:1},
+{name:"chevrolet impala", mpg:14, cylinders:8, displacement:350, horsepower:165, weight:4209, acceleration:12, year:71, origin:1},
+{name:"pontiac catalina brougham", mpg:14, cylinders:8, displacement:400, horsepower:175, weight:4464, acceleration:11.5, year:71, origin:1},
+{name:"ford galaxie 500", mpg:14, cylinders:8, displacement:351, horsepower:153, weight:4154, acceleration:13.5, year:71, origin:1},
+{name:"plymouth fury iii", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4096, acceleration:13, year:71, origin:1},
+{name:"dodge monaco (sw)", mpg:12, cylinders:8, displacement:383, horsepower:180, weight:4955, acceleration:11.5, year:71, origin:1},
+{name:"ford country squire (sw)", mpg:13, cylinders:8, displacement:400, horsepower:170, weight:4746, acceleration:12, year:71, origin:1},
+{name:"pontiac safari (sw)", mpg:13, cylinders:8, displacement:400, horsepower:175, weight:5140, acceleration:12, year:71, origin:1},
+{name:"amc hornet sportabout (sw)", mpg:18, cylinders:6, displacement:258, horsepower:110, weight:2962, acceleration:13.5, year:71, origin:1},
+{name:"chevrolet vega (sw)", mpg:22, cylinders:4, displacement:140, horsepower:72, weight:2408, acceleration:19, year:71, origin:1},
+{name:"pontiac firebird", mpg:19, cylinders:6, displacement:250, horsepower:100, weight:3282, acceleration:15, year:71, origin:1},
+{name:"ford mustang", mpg:18, cylinders:6, displacement:250, horsepower:88, weight:3139, acceleration:14.5, year:71, origin:1},
+{name:"mercury capri 2000", mpg:23, cylinders:4, displacement:122, horsepower:86, weight:2220, acceleration:14, year:71, origin:1},
+{name:"opel 1900", mpg:28, cylinders:4, displacement:116, horsepower:90, weight:2123, acceleration:14, year:71, origin:2},
+{name:"peugeot 304", mpg:30, cylinders:4, displacement:79, horsepower:70, weight:2074, acceleration:19.5, year:71, origin:2},
+{name:"fiat 124b", mpg:30, cylinders:4, displacement:88, horsepower:76, weight:2065, acceleration:14.5, year:71, origin:2},
+{name:"toyota corolla 1200", mpg:31, cylinders:4, displacement:71, horsepower:65, weight:1773, acceleration:19, year:71, origin:3},
+{name:"datsun 1200", mpg:35, cylinders:4, displacement:72, horsepower:69, weight:1613, acceleration:18, year:71, origin:3},
+{name:"volkswagen model 111", mpg:27, cylinders:4, displacement:97, horsepower:60, weight:1834, acceleration:19, year:71, origin:2},
+{name:"plymouth cricket", mpg:26, cylinders:4, displacement:91, horsepower:70, weight:1955, acceleration:20.5, year:71, origin:1},
+{name:"toyota corona hardtop", mpg:24, cylinders:4, displacement:113, horsepower:95, weight:2278, acceleration:15.5, year:72, origin:3},
+{name:"dodge colt hardtop", mpg:25, cylinders:4, displacement:97.5, horsepower:80, weight:2126, acceleration:17, year:72, origin:1},
+{name:"volkswagen type 3", mpg:23, cylinders:4, displacement:97, horsepower:54, weight:2254, acceleration:23.5, year:72, origin:2},
+{name:"chevrolet vega", mpg:20, cylinders:4, displacement:140, horsepower:90, weight:2408, acceleration:19.5, year:72, origin:1},
+{name:"ford pinto runabout", mpg:21, cylinders:4, displacement:122, horsepower:86, weight:2226, acceleration:16.5, year:72, origin:1},
+{name:"chevrolet impala", mpg:13, cylinders:8, displacement:350, horsepower:165, weight:4274, acceleration:12, year:72, origin:1},
+{name:"pontiac catalina", mpg:14, cylinders:8, displacement:400, horsepower:175, weight:4385, acceleration:12, year:72, origin:1},
+{name:"plymouth fury iii", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:4135, acceleration:13.5, year:72, origin:1},
+{name:"ford galaxie 500", mpg:14, cylinders:8, displacement:351, horsepower:153, weight:4129, acceleration:13, year:72, origin:1},
+{name:"amc ambassador sst", mpg:17, cylinders:8, displacement:304, horsepower:150, weight:3672, acceleration:11.5, year:72, origin:1},
+{name:"mercury marquis", mpg:11, cylinders:8, displacement:429, horsepower:208, weight:4633, acceleration:11, year:72, origin:1},
+{name:"buick lesabre custom", mpg:13, cylinders:8, displacement:350, horsepower:155, weight:4502, acceleration:13.5, year:72, origin:1},
+{name:"oldsmobile delta 88 royale", mpg:12, cylinders:8, displacement:350, horsepower:160, weight:4456, acceleration:13.5, year:72, origin:1},
+{name:"chrysler newport royal", mpg:13, cylinders:8, displacement:400, horsepower:190, weight:4422, acceleration:12.5, year:72, origin:1},
+{name:"mazda rx2 coupe", mpg:19, cylinders:3, displacement:70, horsepower:97, weight:2330, acceleration:13.5, year:72, origin:3},
+{name:"amc matador (sw)", mpg:15, cylinders:8, displacement:304, horsepower:150, weight:3892, acceleration:12.5, year:72, origin:1},
+{name:"chevrolet chevelle concours (sw)", mpg:13, cylinders:8, displacement:307, horsepower:130, weight:4098, acceleration:14, year:72, origin:1},
+{name:"ford gran torino (sw)", mpg:13, cylinders:8, displacement:302, horsepower:140, weight:4294, acceleration:16, year:72, origin:1},
+{name:"plymouth satellite custom (sw)", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4077, acceleration:14, year:72, origin:1},
+{name:"volvo 145e (sw)", mpg:18, cylinders:4, displacement:121, horsepower:112, weight:2933, acceleration:14.5, year:72, origin:2},
+{name:"volkswagen 411 (sw)", mpg:22, cylinders:4, displacement:121, horsepower:76, weight:2511, acceleration:18, year:72, origin:2},
+{name:"peugeot 504 (sw)", mpg:21, cylinders:4, displacement:120, horsepower:87, weight:2979, acceleration:19.5, year:72, origin:2},
+{name:"renault 12 (sw)", mpg:26, cylinders:4, displacement:96, horsepower:69, weight:2189, acceleration:18, year:72, origin:2},
+{name:"ford pinto (sw)", mpg:22, cylinders:4, displacement:122, horsepower:86, weight:2395, acceleration:16, year:72, origin:1},
+{name:"datsun 510 (sw)", mpg:28, cylinders:4, displacement:97, horsepower:92, weight:2288, acceleration:17, year:72, origin:3},
+{name:"toyouta corona mark ii (sw)", mpg:23, cylinders:4, displacement:120, horsepower:97, weight:2506, acceleration:14.5, year:72, origin:3},
+{name:"dodge colt (sw)", mpg:28, cylinders:4, displacement:98, horsepower:80, weight:2164, acceleration:15, year:72, origin:1},
+{name:"toyota corolla 1600 (sw)", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2100, acceleration:16.5, year:72, origin:3},
+{name:"buick century 350", mpg:13, cylinders:8, displacement:350, horsepower:175, weight:4100, acceleration:13, year:73, origin:1},
+{name:"amc matador", mpg:14, cylinders:8, displacement:304, horsepower:150, weight:3672, acceleration:11.5, year:73, origin:1},
+{name:"chevrolet malibu", mpg:13, cylinders:8, displacement:350, horsepower:145, weight:3988, acceleration:13, year:73, origin:1},
+{name:"ford gran torino", mpg:14, cylinders:8, displacement:302, horsepower:137, weight:4042, acceleration:14.5, year:73, origin:1},
+{name:"dodge coronet custom", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:3777, acceleration:12.5, year:73, origin:1},
+{name:"mercury marquis brougham", mpg:12, cylinders:8, displacement:429, horsepower:198, weight:4952, acceleration:11.5, year:73, origin:1},
+{name:"chevrolet caprice classic", mpg:13, cylinders:8, displacement:400, horsepower:150, weight:4464, acceleration:12, year:73, origin:1},
+{name:"ford ltd", mpg:13, cylinders:8, displacement:351, horsepower:158, weight:4363, acceleration:13, year:73, origin:1},
+{name:"plymouth fury gran sedan", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4237, acceleration:14.5, year:73, origin:1},
+{name:"chrysler new yorker brougham", mpg:13, cylinders:8, displacement:440, horsepower:215, weight:4735, acceleration:11, year:73, origin:1},
+{name:"buick electra 225 custom", mpg:12, cylinders:8, displacement:455, horsepower:225, weight:4951, acceleration:11, year:73, origin:1},
+{name:"amc ambassador brougham", mpg:13, cylinders:8, displacement:360, horsepower:175, weight:3821, acceleration:11, year:73, origin:1},
+{name:"plymouth valiant", mpg:18, cylinders:6, displacement:225, horsepower:105, weight:3121, acceleration:16.5, year:73, origin:1},
+{name:"chevrolet nova custom", mpg:16, cylinders:6, displacement:250, horsepower:100, weight:3278, acceleration:18, year:73, origin:1},
+{name:"amc hornet", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:2945, acceleration:16, year:73, origin:1},
+{name:"ford maverick", mpg:18, cylinders:6, displacement:250, horsepower:88, weight:3021, acceleration:16.5, year:73, origin:1},
+{name:"plymouth duster", mpg:23, cylinders:6, displacement:198, horsepower:95, weight:2904, acceleration:16, year:73, origin:1},
+{name:"volkswagen super beetle", mpg:26, cylinders:4, displacement:97, horsepower:46, weight:1950, acceleration:21, year:73, origin:2},
+{name:"chevrolet impala", mpg:11, cylinders:8, displacement:400, horsepower:150, weight:4997, acceleration:14, year:73, origin:1},
+{name:"ford country", mpg:12, cylinders:8, displacement:400, horsepower:167, weight:4906, acceleration:12.5, year:73, origin:1},
+{name:"plymouth custom suburb", mpg:13, cylinders:8, displacement:360, horsepower:170, weight:4654, acceleration:13, year:73, origin:1},
+{name:"oldsmobile vista cruiser", mpg:12, cylinders:8, displacement:350, horsepower:180, weight:4499, acceleration:12.5, year:73, origin:1},
+{name:"amc gremlin", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:2789, acceleration:15, year:73, origin:1},
+{name:"toyota carina", mpg:20, cylinders:4, displacement:97, horsepower:88, weight:2279, acceleration:19, year:73, origin:3},
+{name:"chevrolet vega", mpg:21, cylinders:4, displacement:140, horsepower:72, weight:2401, acceleration:19.5, year:73, origin:1},
+{name:"datsun 610", mpg:22, cylinders:4, displacement:108, horsepower:94, weight:2379, acceleration:16.5, year:73, origin:3},
+{name:"maxda rx3", mpg:18, cylinders:3, displacement:70, horsepower:90, weight:2124, acceleration:13.5, year:73, origin:3},
+{name:"ford pinto", mpg:19, cylinders:4, displacement:122, horsepower:85, weight:2310, acceleration:18.5, year:73, origin:1},
+{name:"mercury capri v6", mpg:21, cylinders:6, displacement:155, horsepower:107, weight:2472, acceleration:14, year:73, origin:1},
+{name:"fiat 124 sport coupe", mpg:26, cylinders:4, displacement:98, horsepower:90, weight:2265, acceleration:15.5, year:73, origin:2},
+{name:"chevrolet monte carlo s", mpg:15, cylinders:8, displacement:350, horsepower:145, weight:4082, acceleration:13, year:73, origin:1},
+{name:"pontiac grand prix", mpg:16, cylinders:8, displacement:400, horsepower:230, weight:4278, acceleration:9.5, year:73, origin:1},
+{name:"fiat 128", mpg:29, cylinders:4, displacement:68, horsepower:49, weight:1867, acceleration:19.5, year:73, origin:2},
+{name:"opel manta", mpg:24, cylinders:4, displacement:116, horsepower:75, weight:2158, acceleration:15.5, year:73, origin:2},
+{name:"audi 100ls", mpg:20, cylinders:4, displacement:114, horsepower:91, weight:2582, acceleration:14, year:73, origin:2},
+{name:"volvo 144ea", mpg:19, cylinders:4, displacement:121, horsepower:112, weight:2868, acceleration:15.5, year:73, origin:2},
+{name:"dodge dart custom", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:3399, acceleration:11, year:73, origin:1},
+{name:"saab 99le", mpg:24, cylinders:4, displacement:121, horsepower:110, weight:2660, acceleration:14, year:73, origin:2},
+{name:"toyota mark ii", mpg:20, cylinders:6, displacement:156, horsepower:122, weight:2807, acceleration:13.5, year:73, origin:3},
+{name:"oldsmobile omega", mpg:11, cylinders:8, displacement:350, horsepower:180, weight:3664, acceleration:11, year:73, origin:1},
+{name:"plymouth duster", mpg:20, cylinders:6, displacement:198, horsepower:95, weight:3102, acceleration:16.5, year:74, origin:1},
+{name:"ford maverick", mpg:21, cylinders:6, displacement:200, horsepower:undefined, weight:2875, acceleration:17, year:74, origin:1},
+{name:"amc hornet", mpg:19, cylinders:6, displacement:232, horsepower:100, weight:2901, acceleration:16, year:74, origin:1},
+{name:"chevrolet nova", mpg:15, cylinders:6, displacement:250, horsepower:100, weight:3336, acceleration:17, year:74, origin:1},
+{name:"datsun b210", mpg:31, cylinders:4, displacement:79, horsepower:67, weight:1950, acceleration:19, year:74, origin:3},
+{name:"ford pinto", mpg:26, cylinders:4, displacement:122, horsepower:80, weight:2451, acceleration:16.5, year:74, origin:1},
+{name:"toyota corolla 1200", mpg:32, cylinders:4, displacement:71, horsepower:65, weight:1836, acceleration:21, year:74, origin:3},
+{name:"chevrolet vega", mpg:25, cylinders:4, displacement:140, horsepower:75, weight:2542, acceleration:17, year:74, origin:1},
+{name:"chevrolet chevelle malibu classic", mpg:16, cylinders:6, displacement:250, horsepower:100, weight:3781, acceleration:17, year:74, origin:1},
+{name:"amc matador", mpg:16, cylinders:6, displacement:258, horsepower:110, weight:3632, acceleration:18, year:74, origin:1},
+{name:"plymouth satellite sebring", mpg:18, cylinders:6, displacement:225, horsepower:105, weight:3613, acceleration:16.5, year:74, origin:1},
+{name:"ford gran torino", mpg:16, cylinders:8, displacement:302, horsepower:140, weight:4141, acceleration:14, year:74, origin:1},
+{name:"buick century luxus (sw)", mpg:13, cylinders:8, displacement:350, horsepower:150, weight:4699, acceleration:14.5, year:74, origin:1},
+{name:"dodge coronet custom (sw)", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4457, acceleration:13.5, year:74, origin:1},
+{name:"ford gran torino (sw)", mpg:14, cylinders:8, displacement:302, horsepower:140, weight:4638, acceleration:16, year:74, origin:1},
+{name:"amc matador (sw)", mpg:14, cylinders:8, displacement:304, horsepower:150, weight:4257, acceleration:15.5, year:74, origin:1},
+{name:"audi fox", mpg:29, cylinders:4, displacement:98, horsepower:83, weight:2219, acceleration:16.5, year:74, origin:2},
+{name:"volkswagen dasher", mpg:26, cylinders:4, displacement:79, horsepower:67, weight:1963, acceleration:15.5, year:74, origin:2},
+{name:"opel manta", mpg:26, cylinders:4, displacement:97, horsepower:78, weight:2300, acceleration:14.5, year:74, origin:2},
+{name:"toyota corona", mpg:31, cylinders:4, displacement:76, horsepower:52, weight:1649, acceleration:16.5, year:74, origin:3},
+{name:"datsun 710", mpg:32, cylinders:4, displacement:83, horsepower:61, weight:2003, acceleration:19, year:74, origin:3},
+{name:"dodge colt", mpg:28, cylinders:4, displacement:90, horsepower:75, weight:2125, acceleration:14.5, year:74, origin:1},
+{name:"fiat 128", mpg:24, cylinders:4, displacement:90, horsepower:75, weight:2108, acceleration:15.5, year:74, origin:2},
+{name:"fiat 124 tc", mpg:26, cylinders:4, displacement:116, horsepower:75, weight:2246, acceleration:14, year:74, origin:2},
+{name:"honda civic", mpg:24, cylinders:4, displacement:120, horsepower:97, weight:2489, acceleration:15, year:74, origin:3},
+{name:"subaru", mpg:26, cylinders:4, displacement:108, horsepower:93, weight:2391, acceleration:15.5, year:74, origin:3},
+{name:"fiat x1.9", mpg:31, cylinders:4, displacement:79, horsepower:67, weight:2000, acceleration:16, year:74, origin:2},
+{name:"plymouth valiant custom", mpg:19, cylinders:6, displacement:225, horsepower:95, weight:3264, acceleration:16, year:75, origin:1},
+{name:"chevrolet nova", mpg:18, cylinders:6, displacement:250, horsepower:105, weight:3459, acceleration:16, year:75, origin:1},
+{name:"mercury monarch", mpg:15, cylinders:6, displacement:250, horsepower:72, weight:3432, acceleration:21, year:75, origin:1},
+{name:"ford maverick", mpg:15, cylinders:6, displacement:250, horsepower:72, weight:3158, acceleration:19.5, year:75, origin:1},
+{name:"pontiac catalina", mpg:16, cylinders:8, displacement:400, horsepower:170, weight:4668, acceleration:11.5, year:75, origin:1},
+{name:"chevrolet bel air", mpg:15, cylinders:8, displacement:350, horsepower:145, weight:4440, acceleration:14, year:75, origin:1},
+{name:"plymouth grand fury", mpg:16, cylinders:8, displacement:318, horsepower:150, weight:4498, acceleration:14.5, year:75, origin:1},
+{name:"ford ltd", mpg:14, cylinders:8, displacement:351, horsepower:148, weight:4657, acceleration:13.5, year:75, origin:1},
+{name:"buick century", mpg:17, cylinders:6, displacement:231, horsepower:110, weight:3907, acceleration:21, year:75, origin:1},
+{name:"chevroelt chevelle malibu", mpg:16, cylinders:6, displacement:250, horsepower:105, weight:3897, acceleration:18.5, year:75, origin:1},
+{name:"amc matador", mpg:15, cylinders:6, displacement:258, horsepower:110, weight:3730, acceleration:19, year:75, origin:1},
+{name:"plymouth fury", mpg:18, cylinders:6, displacement:225, horsepower:95, weight:3785, acceleration:19, year:75, origin:1},
+{name:"buick skyhawk", mpg:21, cylinders:6, displacement:231, horsepower:110, weight:3039, acceleration:15, year:75, origin:1},
+{name:"chevrolet monza 2+2", mpg:20, cylinders:8, displacement:262, horsepower:110, weight:3221, acceleration:13.5, year:75, origin:1},
+{name:"ford mustang ii", mpg:13, cylinders:8, displacement:302, horsepower:129, weight:3169, acceleration:12, year:75, origin:1},
+{name:"toyota corolla", mpg:29, cylinders:4, displacement:97, horsepower:75, weight:2171, acceleration:16, year:75, origin:3},
+{name:"ford pinto", mpg:23, cylinders:4, displacement:140, horsepower:83, weight:2639, acceleration:17, year:75, origin:1},
+{name:"amc gremlin", mpg:20, cylinders:6, displacement:232, horsepower:100, weight:2914, acceleration:16, year:75, origin:1},
+{name:"pontiac astro", mpg:23, cylinders:4, displacement:140, horsepower:78, weight:2592, acceleration:18.5, year:75, origin:1},
+{name:"toyota corona", mpg:24, cylinders:4, displacement:134, horsepower:96, weight:2702, acceleration:13.5, year:75, origin:3},
+{name:"volkswagen dasher", mpg:25, cylinders:4, displacement:90, horsepower:71, weight:2223, acceleration:16.5, year:75, origin:2},
+{name:"datsun 710", mpg:24, cylinders:4, displacement:119, horsepower:97, weight:2545, acceleration:17, year:75, origin:3},
+{name:"ford pinto", mpg:18, cylinders:6, displacement:171, horsepower:97, weight:2984, acceleration:14.5, year:75, origin:1},
+{name:"volkswagen rabbit", mpg:29, cylinders:4, displacement:90, horsepower:70, weight:1937, acceleration:14, year:75, origin:2},
+{name:"amc pacer", mpg:19, cylinders:6, displacement:232, horsepower:90, weight:3211, acceleration:17, year:75, origin:1},
+{name:"audi 100ls", mpg:23, cylinders:4, displacement:115, horsepower:95, weight:2694, acceleration:15, year:75, origin:2},
+{name:"peugeot 504", mpg:23, cylinders:4, displacement:120, horsepower:88, weight:2957, acceleration:17, year:75, origin:2},
+{name:"volvo 244dl", mpg:22, cylinders:4, displacement:121, horsepower:98, weight:2945, acceleration:14.5, year:75, origin:2},
+{name:"saab 99le", mpg:25, cylinders:4, displacement:121, horsepower:115, weight:2671, acceleration:13.5, year:75, origin:2},
+{name:"honda civic cvcc", mpg:33, cylinders:4, displacement:91, horsepower:53, weight:1795, acceleration:17.5, year:75, origin:3},
+{name:"fiat 131", mpg:28, cylinders:4, displacement:107, horsepower:86, weight:2464, acceleration:15.5, year:76, origin:2},
+{name:"opel 1900", mpg:25, cylinders:4, displacement:116, horsepower:81, weight:2220, acceleration:16.9, year:76, origin:2},
+{name:"capri ii", mpg:25, cylinders:4, displacement:140, horsepower:92, weight:2572, acceleration:14.9, year:76, origin:1},
+{name:"dodge colt", mpg:26, cylinders:4, displacement:98, horsepower:79, weight:2255, acceleration:17.7, year:76, origin:1},
+{name:"renault 12tl", mpg:27, cylinders:4, displacement:101, horsepower:83, weight:2202, acceleration:15.3, year:76, origin:2},
+{name:"chevrolet chevelle malibu classic", mpg:17.5, cylinders:8, displacement:305, horsepower:140, weight:4215, acceleration:13, year:76, origin:1},
+{name:"dodge coronet brougham", mpg:16, cylinders:8, displacement:318, horsepower:150, weight:4190, acceleration:13, year:76, origin:1},
+{name:"amc matador", mpg:15.5, cylinders:8, displacement:304, horsepower:120, weight:3962, acceleration:13.9, year:76, origin:1},
+{name:"ford gran torino", mpg:14.5, cylinders:8, displacement:351, horsepower:152, weight:4215, acceleration:12.8, year:76, origin:1},
+{name:"plymouth valiant", mpg:22, cylinders:6, displacement:225, horsepower:100, weight:3233, acceleration:15.4, year:76, origin:1},
+{name:"chevrolet nova", mpg:22, cylinders:6, displacement:250, horsepower:105, weight:3353, acceleration:14.5, year:76, origin:1},
+{name:"ford maverick", mpg:24, cylinders:6, displacement:200, horsepower:81, weight:3012, acceleration:17.6, year:76, origin:1},
+{name:"amc hornet", mpg:22.5, cylinders:6, displacement:232, horsepower:90, weight:3085, acceleration:17.6, year:76, origin:1},
+{name:"chevrolet chevette", mpg:29, cylinders:4, displacement:85, horsepower:52, weight:2035, acceleration:22.2, year:76, origin:1},
+{name:"chevrolet woody", mpg:24.5, cylinders:4, displacement:98, horsepower:60, weight:2164, acceleration:22.1, year:76, origin:1},
+{name:"vw rabbit", mpg:29, cylinders:4, displacement:90, horsepower:70, weight:1937, acceleration:14.2, year:76, origin:2},
+{name:"honda civic", mpg:33, cylinders:4, displacement:91, horsepower:53, weight:1795, acceleration:17.4, year:76, origin:3},
+{name:"dodge aspen se", mpg:20, cylinders:6, displacement:225, horsepower:100, weight:3651, acceleration:17.7, year:76, origin:1},
+{name:"ford granada ghia", mpg:18, cylinders:6, displacement:250, horsepower:78, weight:3574, acceleration:21, year:76, origin:1},
+{name:"pontiac ventura sj", mpg:18.5, cylinders:6, displacement:250, horsepower:110, weight:3645, acceleration:16.2, year:76, origin:1},
+{name:"amc pacer d/l", mpg:17.5, cylinders:6, displacement:258, horsepower:95, weight:3193, acceleration:17.8, year:76, origin:1},
+{name:"volkswagen rabbit", mpg:29.5, cylinders:4, displacement:97, horsepower:71, weight:1825, acceleration:12.2, year:76, origin:2},
+{name:"datsun b-210", mpg:32, cylinders:4, displacement:85, horsepower:70, weight:1990, acceleration:17, year:76, origin:3},
+{name:"toyota corolla", mpg:28, cylinders:4, displacement:97, horsepower:75, weight:2155, acceleration:16.4, year:76, origin:3},
+{name:"ford pinto", mpg:26.5, cylinders:4, displacement:140, horsepower:72, weight:2565, acceleration:13.6, year:76, origin:1},
+{name:"volvo 245", mpg:20, cylinders:4, displacement:130, horsepower:102, weight:3150, acceleration:15.7, year:76, origin:2},
+{name:"plymouth volare premier v8", mpg:13, cylinders:8, displacement:318, horsepower:150, weight:3940, acceleration:13.2, year:76, origin:1},
+{name:"peugeot 504", mpg:19, cylinders:4, displacement:120, horsepower:88, weight:3270, acceleration:21.9, year:76, origin:2},
+{name:"toyota mark ii", mpg:19, cylinders:6, displacement:156, horsepower:108, weight:2930, acceleration:15.5, year:76, origin:3},
+{name:"mercedes-benz 280s", mpg:16.5, cylinders:6, displacement:168, horsepower:120, weight:3820, acceleration:16.7, year:76, origin:2},
+{name:"cadillac seville", mpg:16.5, cylinders:8, displacement:350, horsepower:180, weight:4380, acceleration:12.1, year:76, origin:1},
+{name:"chevy c10", mpg:13, cylinders:8, displacement:350, horsepower:145, weight:4055, acceleration:12, year:76, origin:1},
+{name:"ford f108", mpg:13, cylinders:8, displacement:302, horsepower:130, weight:3870, acceleration:15, year:76, origin:1},
+{name:"dodge d100", mpg:13, cylinders:8, displacement:318, horsepower:150, weight:3755, acceleration:14, year:76, origin:1},
+{name:"honda accord cvcc", mpg:31.5, cylinders:4, displacement:98, horsepower:68, weight:2045, acceleration:18.5, year:77, origin:3},
+{name:"buick opel isuzu deluxe", mpg:30, cylinders:4, displacement:111, horsepower:80, weight:2155, acceleration:14.8, year:77, origin:1},
+{name:"renault 5 gtl", mpg:36, cylinders:4, displacement:79, horsepower:58, weight:1825, acceleration:18.6, year:77, origin:2},
+{name:"plymouth arrow gs", mpg:25.5, cylinders:4, displacement:122, horsepower:96, weight:2300, acceleration:15.5, year:77, origin:1},
+{name:"datsun f-10 hatchback", mpg:33.5, cylinders:4, displacement:85, horsepower:70, weight:1945, acceleration:16.8, year:77, origin:3},
+{name:"chevrolet caprice classic", mpg:17.5, cylinders:8, displacement:305, horsepower:145, weight:3880, acceleration:12.5, year:77, origin:1},
+{name:"oldsmobile cutlass supreme", mpg:17, cylinders:8, displacement:260, horsepower:110, weight:4060, acceleration:19, year:77, origin:1},
+{name:"dodge monaco brougham", mpg:15.5, cylinders:8, displacement:318, horsepower:145, weight:4140, acceleration:13.7, year:77, origin:1},
+{name:"mercury cougar brougham", mpg:15, cylinders:8, displacement:302, horsepower:130, weight:4295, acceleration:14.9, year:77, origin:1},
+{name:"chevrolet concours", mpg:17.5, cylinders:6, displacement:250, horsepower:110, weight:3520, acceleration:16.4, year:77, origin:1},
+{name:"buick skylark", mpg:20.5, cylinders:6, displacement:231, horsepower:105, weight:3425, acceleration:16.9, year:77, origin:1},
+{name:"plymouth volare custom", mpg:19, cylinders:6, displacement:225, horsepower:100, weight:3630, acceleration:17.7, year:77, origin:1},
+{name:"ford granada", mpg:18.5, cylinders:6, displacement:250, horsepower:98, weight:3525, acceleration:19, year:77, origin:1},
+{name:"pontiac grand prix lj", mpg:16, cylinders:8, displacement:400, horsepower:180, weight:4220, acceleration:11.1, year:77, origin:1},
+{name:"chevrolet monte carlo landau", mpg:15.5, cylinders:8, displacement:350, horsepower:170, weight:4165, acceleration:11.4, year:77, origin:1},
+{name:"chrysler cordoba", mpg:15.5, cylinders:8, displacement:400, horsepower:190, weight:4325, acceleration:12.2, year:77, origin:1},
+{name:"ford thunderbird", mpg:16, cylinders:8, displacement:351, horsepower:149, weight:4335, acceleration:14.5, year:77, origin:1},
+{name:"volkswagen rabbit custom", mpg:29, cylinders:4, displacement:97, horsepower:78, weight:1940, acceleration:14.5, year:77, origin:2},
+{name:"pontiac sunbird coupe", mpg:24.5, cylinders:4, displacement:151, horsepower:88, weight:2740, acceleration:16, year:77, origin:1},
+{name:"toyota corolla liftback", mpg:26, cylinders:4, displacement:97, horsepower:75, weight:2265, acceleration:18.2, year:77, origin:3},
+{name:"ford mustang ii 2+2", mpg:25.5, cylinders:4, displacement:140, horsepower:89, weight:2755, acceleration:15.8, year:77, origin:1},
+{name:"chevrolet chevette", mpg:30.5, cylinders:4, displacement:98, horsepower:63, weight:2051, acceleration:17, year:77, origin:1},
+{name:"dodge colt m/m", mpg:33.5, cylinders:4, displacement:98, horsepower:83, weight:2075, acceleration:15.9, year:77, origin:1},
+{name:"subaru dl", mpg:30, cylinders:4, displacement:97, horsepower:67, weight:1985, acceleration:16.4, year:77, origin:3},
+{name:"volkswagen dasher", mpg:30.5, cylinders:4, displacement:97, horsepower:78, weight:2190, acceleration:14.1, year:77, origin:2},
+{name:"datsun 810", mpg:22, cylinders:6, displacement:146, horsepower:97, weight:2815, acceleration:14.5, year:77, origin:3},
+{name:"bmw 320i", mpg:21.5, cylinders:4, displacement:121, horsepower:110, weight:2600, acceleration:12.8, year:77, origin:2},
+{name:"mazda rx-4", mpg:21.5, cylinders:3, displacement:80, horsepower:110, weight:2720, acceleration:13.5, year:77, origin:3},
+{name:"volkswagen rabbit custom diesel", mpg:43.1, cylinders:4, displacement:90, horsepower:48, weight:1985, acceleration:21.5, year:78, origin:2},
+{name:"ford fiesta", mpg:36.1, cylinders:4, displacement:98, horsepower:66, weight:1800, acceleration:14.4, year:78, origin:1},
+{name:"mazda glc deluxe", mpg:32.8, cylinders:4, displacement:78, horsepower:52, weight:1985, acceleration:19.4, year:78, origin:3},
+{name:"datsun b210 gx", mpg:39.4, cylinders:4, displacement:85, horsepower:70, weight:2070, acceleration:18.6, year:78, origin:3},
+{name:"honda civic cvcc", mpg:36.1, cylinders:4, displacement:91, horsepower:60, weight:1800, acceleration:16.4, year:78, origin:3},
+{name:"oldsmobile cutlass salon brougham", mpg:19.9, cylinders:8, displacement:260, horsepower:110, weight:3365, acceleration:15.5, year:78, origin:1},
+{name:"dodge diplomat", mpg:19.4, cylinders:8, displacement:318, horsepower:140, weight:3735, acceleration:13.2, year:78, origin:1},
+{name:"mercury monarch ghia", mpg:20.2, cylinders:8, displacement:302, horsepower:139, weight:3570, acceleration:12.8, year:78, origin:1},
+{name:"pontiac phoenix lj", mpg:19.2, cylinders:6, displacement:231, horsepower:105, weight:3535, acceleration:19.2, year:78, origin:1},
+{name:"chevrolet malibu", mpg:20.5, cylinders:6, displacement:200, horsepower:95, weight:3155, acceleration:18.2, year:78, origin:1},
+{name:"ford fairmont (auto)", mpg:20.2, cylinders:6, displacement:200, horsepower:85, weight:2965, acceleration:15.8, year:78, origin:1},
+{name:"ford fairmont (man)", mpg:25.1, cylinders:4, displacement:140, horsepower:88, weight:2720, acceleration:15.4, year:78, origin:1},
+{name:"plymouth volare", mpg:20.5, cylinders:6, displacement:225, horsepower:100, weight:3430, acceleration:17.2, year:78, origin:1},
+{name:"amc concord", mpg:19.4, cylinders:6, displacement:232, horsepower:90, weight:3210, acceleration:17.2, year:78, origin:1},
+{name:"buick century special", mpg:20.6, cylinders:6, displacement:231, horsepower:105, weight:3380, acceleration:15.8, year:78, origin:1},
+{name:"mercury zephyr", mpg:20.8, cylinders:6, displacement:200, horsepower:85, weight:3070, acceleration:16.7, year:78, origin:1},
+{name:"dodge aspen", mpg:18.6, cylinders:6, displacement:225, horsepower:110, weight:3620, acceleration:18.7, year:78, origin:1},
+{name:"amc concord d/l", mpg:18.1, cylinders:6, displacement:258, horsepower:120, weight:3410, acceleration:15.1, year:78, origin:1},
+{name:"chevrolet monte carlo landau", mpg:19.2, cylinders:8, displacement:305, horsepower:145, weight:3425, acceleration:13.2, year:78, origin:1},
+{name:"buick regal sport coupe (turbo)", mpg:17.7, cylinders:6, displacement:231, horsepower:165, weight:3445, acceleration:13.4, year:78, origin:1},
+{name:"ford futura", mpg:18.1, cylinders:8, displacement:302, horsepower:139, weight:3205, acceleration:11.2, year:78, origin:1},
+{name:"dodge magnum xe", mpg:17.5, cylinders:8, displacement:318, horsepower:140, weight:4080, acceleration:13.7, year:78, origin:1},
+{name:"chevrolet chevette", mpg:30, cylinders:4, displacement:98, horsepower:68, weight:2155, acceleration:16.5, year:78, origin:1},
+{name:"toyota corona", mpg:27.5, cylinders:4, displacement:134, horsepower:95, weight:2560, acceleration:14.2, year:78, origin:3},
+{name:"datsun 510", mpg:27.2, cylinders:4, displacement:119, horsepower:97, weight:2300, acceleration:14.7, year:78, origin:3},
+{name:"dodge omni", mpg:30.9, cylinders:4, displacement:105, horsepower:75, weight:2230, acceleration:14.5, year:78, origin:1},
+{name:"toyota celica gt liftback", mpg:21.1, cylinders:4, displacement:134, horsepower:95, weight:2515, acceleration:14.8, year:78, origin:3},
+{name:"plymouth sapporo", mpg:23.2, cylinders:4, displacement:156, horsepower:105, weight:2745, acceleration:16.7, year:78, origin:1},
+{name:"oldsmobile starfire sx", mpg:23.8, cylinders:4, displacement:151, horsepower:85, weight:2855, acceleration:17.6, year:78, origin:1},
+{name:"datsun 200-sx", mpg:23.9, cylinders:4, displacement:119, horsepower:97, weight:2405, acceleration:14.9, year:78, origin:3},
+{name:"audi 5000", mpg:20.3, cylinders:5, displacement:131, horsepower:103, weight:2830, acceleration:15.9, year:78, origin:2},
+{name:"volvo 264gl", mpg:17, cylinders:6, displacement:163, horsepower:125, weight:3140, acceleration:13.6, year:78, origin:2},
+{name:"saab 99gle", mpg:21.6, cylinders:4, displacement:121, horsepower:115, weight:2795, acceleration:15.7, year:78, origin:2},
+{name:"peugeot 604sl", mpg:16.2, cylinders:6, displacement:163, horsepower:133, weight:3410, acceleration:15.8, year:78, origin:2},
+{name:"volkswagen scirocco", mpg:31.5, cylinders:4, displacement:89, horsepower:71, weight:1990, acceleration:14.9, year:78, origin:2},
+{name:"honda accord lx", mpg:29.5, cylinders:4, displacement:98, horsepower:68, weight:2135, acceleration:16.6, year:78, origin:3},
+{name:"pontiac lemans v6", mpg:21.5, cylinders:6, displacement:231, horsepower:115, weight:3245, acceleration:15.4, year:79, origin:1},
+{name:"mercury zephyr 6", mpg:19.8, cylinders:6, displacement:200, horsepower:85, weight:2990, acceleration:18.2, year:79, origin:1},
+{name:"ford fairmont 4", mpg:22.3, cylinders:4, displacement:140, horsepower:88, weight:2890, acceleration:17.3, year:79, origin:1},
+{name:"amc concord dl 6", mpg:20.2, cylinders:6, displacement:232, horsepower:90, weight:3265, acceleration:18.2, year:79, origin:1},
+{name:"dodge aspen 6", mpg:20.6, cylinders:6, displacement:225, horsepower:110, weight:3360, acceleration:16.6, year:79, origin:1},
+{name:"chevrolet caprice classic", mpg:17, cylinders:8, displacement:305, horsepower:130, weight:3840, acceleration:15.4, year:79, origin:1},
+{name:"ford ltd landau", mpg:17.6, cylinders:8, displacement:302, horsepower:129, weight:3725, acceleration:13.4, year:79, origin:1},
+{name:"mercury grand marquis", mpg:16.5, cylinders:8, displacement:351, horsepower:138, weight:3955, acceleration:13.2, year:79, origin:1},
+{name:"dodge st. regis", mpg:18.2, cylinders:8, displacement:318, horsepower:135, weight:3830, acceleration:15.2, year:79, origin:1},
+{name:"buick estate wagon (sw)", mpg:16.9, cylinders:8, displacement:350, horsepower:155, weight:4360, acceleration:14.9, year:79, origin:1},
+{name:"ford country squire (sw)", mpg:15.5, cylinders:8, displacement:351, horsepower:142, weight:4054, acceleration:14.3, year:79, origin:1},
+{name:"chevrolet malibu classic (sw)", mpg:19.2, cylinders:8, displacement:267, horsepower:125, weight:3605, acceleration:15, year:79, origin:1},
+{name:"chrysler lebaron town @ country (sw)", mpg:18.5, cylinders:8, displacement:360, horsepower:150, weight:3940, acceleration:13, year:79, origin:1},
+{name:"vw rabbit custom", mpg:31.9, cylinders:4, displacement:89, horsepower:71, weight:1925, acceleration:14, year:79, origin:2},
+{name:"maxda glc deluxe", mpg:34.1, cylinders:4, displacement:86, horsepower:65, weight:1975, acceleration:15.2, year:79, origin:3},
+{name:"dodge colt hatchback custom", mpg:35.7, cylinders:4, displacement:98, horsepower:80, weight:1915, acceleration:14.4, year:79, origin:1},
+{name:"amc spirit dl", mpg:27.4, cylinders:4, displacement:121, horsepower:80, weight:2670, acceleration:15, year:79, origin:1},
+{name:"mercedes benz 300d", mpg:25.4, cylinders:5, displacement:183, horsepower:77, weight:3530, acceleration:20.1, year:79, origin:2},
+{name:"cadillac eldorado", mpg:23, cylinders:8, displacement:350, horsepower:125, weight:3900, acceleration:17.4, year:79, origin:1},
+{name:"peugeot 504", mpg:27.2, cylinders:4, displacement:141, horsepower:71, weight:3190, acceleration:24.8, year:79, origin:2},
+{name:"oldsmobile cutlass salon brougham", mpg:23.9, cylinders:8, displacement:260, horsepower:90, weight:3420, acceleration:22.2, year:79, origin:1},
+{name:"plymouth horizon", mpg:34.2, cylinders:4, displacement:105, horsepower:70, weight:2200, acceleration:13.2, year:79, origin:1},
+{name:"plymouth horizon tc3", mpg:34.5, cylinders:4, displacement:105, horsepower:70, weight:2150, acceleration:14.9, year:79, origin:1},
+{name:"datsun 210", mpg:31.8, cylinders:4, displacement:85, horsepower:65, weight:2020, acceleration:19.2, year:79, origin:3},
+{name:"fiat strada custom", mpg:37.3, cylinders:4, displacement:91, horsepower:69, weight:2130, acceleration:14.7, year:79, origin:2},
+{name:"buick skylark limited", mpg:28.4, cylinders:4, displacement:151, horsepower:90, weight:2670, acceleration:16, year:79, origin:1},
+{name:"chevrolet citation", mpg:28.8, cylinders:6, displacement:173, horsepower:115, weight:2595, acceleration:11.3, year:79, origin:1},
+{name:"oldsmobile omega brougham", mpg:26.8, cylinders:6, displacement:173, horsepower:115, weight:2700, acceleration:12.9, year:79, origin:1},
+{name:"pontiac phoenix", mpg:33.5, cylinders:4, displacement:151, horsepower:90, weight:2556, acceleration:13.2, year:79, origin:1},
+{name:"vw rabbit", mpg:41.5, cylinders:4, displacement:98, horsepower:76, weight:2144, acceleration:14.7, year:80, origin:2},
+{name:"toyota corolla tercel", mpg:38.1, cylinders:4, displacement:89, horsepower:60, weight:1968, acceleration:18.8, year:80, origin:3},
+{name:"chevrolet chevette", mpg:32.1, cylinders:4, displacement:98, horsepower:70, weight:2120, acceleration:15.5, year:80, origin:1},
+{name:"datsun 310", mpg:37.2, cylinders:4, displacement:86, horsepower:65, weight:2019, acceleration:16.4, year:80, origin:3},
+{name:"chevrolet citation", mpg:28, cylinders:4, displacement:151, horsepower:90, weight:2678, acceleration:16.5, year:80, origin:1},
+{name:"ford fairmont", mpg:26.4, cylinders:4, displacement:140, horsepower:88, weight:2870, acceleration:18.1, year:80, origin:1},
+{name:"amc concord", mpg:24.3, cylinders:4, displacement:151, horsepower:90, weight:3003, acceleration:20.1, year:80, origin:1},
+{name:"dodge aspen", mpg:19.1, cylinders:6, displacement:225, horsepower:90, weight:3381, acceleration:18.7, year:80, origin:1},
+{name:"audi 4000", mpg:34.3, cylinders:4, displacement:97, horsepower:78, weight:2188, acceleration:15.8, year:80, origin:2},
+{name:"toyota corona liftback", mpg:29.8, cylinders:4, displacement:134, horsepower:90, weight:2711, acceleration:15.5, year:80, origin:3},
+{name:"mazda 626", mpg:31.3, cylinders:4, displacement:120, horsepower:75, weight:2542, acceleration:17.5, year:80, origin:3},
+{name:"datsun 510 hatchback", mpg:37, cylinders:4, displacement:119, horsepower:92, weight:2434, acceleration:15, year:80, origin:3},
+{name:"toyota corolla", mpg:32.2, cylinders:4, displacement:108, horsepower:75, weight:2265, acceleration:15.2, year:80, origin:3},
+{name:"mazda glc", mpg:46.6, cylinders:4, displacement:86, horsepower:65, weight:2110, acceleration:17.9, year:80, origin:3},
+{name:"dodge colt", mpg:27.9, cylinders:4, displacement:156, horsepower:105, weight:2800, acceleration:14.4, year:80, origin:1},
+{name:"datsun 210", mpg:40.8, cylinders:4, displacement:85, horsepower:65, weight:2110, acceleration:19.2, year:80, origin:3},
+{name:"vw rabbit c (diesel)", mpg:44.3, cylinders:4, displacement:90, horsepower:48, weight:2085, acceleration:21.7, year:80, origin:2},
+{name:"vw dasher (diesel)", mpg:43.4, cylinders:4, displacement:90, horsepower:48, weight:2335, acceleration:23.7, year:80, origin:2},
+{name:"audi 5000s (diesel)", mpg:36.4, cylinders:5, displacement:121, horsepower:67, weight:2950, acceleration:19.9, year:80, origin:2},
+{name:"mercedes-benz 240d", mpg:30, cylinders:4, displacement:146, horsepower:67, weight:3250, acceleration:21.8, year:80, origin:2},
+{name:"honda civic 1500 gl", mpg:44.6, cylinders:4, displacement:91, horsepower:67, weight:1850, acceleration:13.8, year:80, origin:3},
+{name:"renault lecar deluxe", mpg:40.9, cylinders:4, displacement:85, horsepower:undefined, weight:1835, acceleration:17.3, year:80, origin:2},
+{name:"subaru dl", mpg:33.8, cylinders:4, displacement:97, horsepower:67, weight:2145, acceleration:18, year:80, origin:3},
+{name:"vokswagen rabbit", mpg:29.8, cylinders:4, displacement:89, horsepower:62, weight:1845, acceleration:15.3, year:80, origin:2},
+{name:"datsun 280-zx", mpg:32.7, cylinders:6, displacement:168, horsepower:132, weight:2910, acceleration:11.4, year:80, origin:3},
+{name:"mazda rx-7 gs", mpg:23.7, cylinders:3, displacement:70, horsepower:100, weight:2420, acceleration:12.5, year:80, origin:3},
+{name:"triumph tr7 coupe", mpg:35, cylinders:4, displacement:122, horsepower:88, weight:2500, acceleration:15.1, year:80, origin:2},
+{name:"ford mustang cobra", mpg:23.6, cylinders:4, displacement:140, horsepower:undefined, weight:2905, acceleration:14.3, year:80, origin:1},
+{name:"honda accord", mpg:32.4, cylinders:4, displacement:107, horsepower:72, weight:2290, acceleration:17, year:80, origin:3},
+{name:"plymouth reliant", mpg:27.2, cylinders:4, displacement:135, horsepower:84, weight:2490, acceleration:15.7, year:81, origin:1},
+{name:"buick skylark", mpg:26.6, cylinders:4, displacement:151, horsepower:84, weight:2635, acceleration:16.4, year:81, origin:1},
+{name:"dodge aries wagon (sw)", mpg:25.8, cylinders:4, displacement:156, horsepower:92, weight:2620, acceleration:14.4, year:81, origin:1},
+{name:"chevrolet citation", mpg:23.5, cylinders:6, displacement:173, horsepower:110, weight:2725, acceleration:12.6, year:81, origin:1},
+{name:"plymouth reliant", mpg:30, cylinders:4, displacement:135, horsepower:84, weight:2385, acceleration:12.9, year:81, origin:1},
+{name:"toyota starlet", mpg:39.1, cylinders:4, displacement:79, horsepower:58, weight:1755, acceleration:16.9, year:81, origin:3},
+{name:"plymouth champ", mpg:39, cylinders:4, displacement:86, horsepower:64, weight:1875, acceleration:16.4, year:81, origin:1},
+{name:"honda civic 1300", mpg:35.1, cylinders:4, displacement:81, horsepower:60, weight:1760, acceleration:16.1, year:81, origin:3},
+{name:"subaru", mpg:32.3, cylinders:4, displacement:97, horsepower:67, weight:2065, acceleration:17.8, year:81, origin:3},
+{name:"datsun 210 mpg", mpg:37, cylinders:4, displacement:85, horsepower:65, weight:1975, acceleration:19.4, year:81, origin:3},
+{name:"toyota tercel", mpg:37.7, cylinders:4, displacement:89, horsepower:62, weight:2050, acceleration:17.3, year:81, origin:3},
+{name:"mazda glc 4", mpg:34.1, cylinders:4, displacement:91, horsepower:68, weight:1985, acceleration:16, year:81, origin:3},
+{name:"plymouth horizon 4", mpg:34.7, cylinders:4, displacement:105, horsepower:63, weight:2215, acceleration:14.9, year:81, origin:1},
+{name:"ford escort 4w", mpg:34.4, cylinders:4, displacement:98, horsepower:65, weight:2045, acceleration:16.2, year:81, origin:1},
+{name:"ford escort 2h", mpg:29.9, cylinders:4, displacement:98, horsepower:65, weight:2380, acceleration:20.7, year:81, origin:1},
+{name:"volkswagen jetta", mpg:33, cylinders:4, displacement:105, horsepower:74, weight:2190, acceleration:14.2, year:81, origin:2},
+{name:"renault 18i", mpg:34.5, cylinders:4, displacement:100, horsepower:undefined, weight:2320, acceleration:15.8, year:81, origin:2},
+{name:"honda prelude", mpg:33.7, cylinders:4, displacement:107, horsepower:75, weight:2210, acceleration:14.4, year:81, origin:3},
+{name:"toyota corolla", mpg:32.4, cylinders:4, displacement:108, horsepower:75, weight:2350, acceleration:16.8, year:81, origin:3},
+{name:"datsun 200sx", mpg:32.9, cylinders:4, displacement:119, horsepower:100, weight:2615, acceleration:14.8, year:81, origin:3},
+{name:"mazda 626", mpg:31.6, cylinders:4, displacement:120, horsepower:74, weight:2635, acceleration:18.3, year:81, origin:3},
+{name:"peugeot 505s turbo diesel", mpg:28.1, cylinders:4, displacement:141, horsepower:80, weight:3230, acceleration:20.4, year:81, origin:2},
+{name:"saab 900s", mpg:undefined, cylinders:4, displacement:121, horsepower:110, weight:2800, acceleration:15.4, year:81, origin:2},
+{name:"volvo diesel", mpg:30.7, cylinders:6, displacement:145, horsepower:76, weight:3160, acceleration:19.6, year:81, origin:2},
+{name:"toyota cressida", mpg:25.4, cylinders:6, displacement:168, horsepower:116, weight:2900, acceleration:12.6, year:81, origin:3},
+{name:"datsun 810 maxima", mpg:24.2, cylinders:6, displacement:146, horsepower:120, weight:2930, acceleration:13.8, year:81, origin:3},
+{name:"buick century", mpg:22.4, cylinders:6, displacement:231, horsepower:110, weight:3415, acceleration:15.8, year:81, origin:1},
+{name:"oldsmobile cutlass ls", mpg:26.6, cylinders:8, displacement:350, horsepower:105, weight:3725, acceleration:19, year:81, origin:1},
+{name:"ford granada gl", mpg:20.2, cylinders:6, displacement:200, horsepower:88, weight:3060, acceleration:17.1, year:81, origin:1},
+{name:"chrysler lebaron salon", mpg:17.6, cylinders:6, displacement:225, horsepower:85, weight:3465, acceleration:16.6, year:81, origin:1},
+{name:"chevrolet cavalier", mpg:28, cylinders:4, displacement:112, horsepower:88, weight:2605, acceleration:19.6, year:82, origin:1},
+{name:"chevrolet cavalier wagon", mpg:27, cylinders:4, displacement:112, horsepower:88, weight:2640, acceleration:18.6, year:82, origin:1},
+{name:"chevrolet cavalier 2-door", mpg:34, cylinders:4, displacement:112, horsepower:88, weight:2395, acceleration:18, year:82, origin:1},
+{name:"pontiac j2000 se hatchback", mpg:31, cylinders:4, displacement:112, horsepower:85, weight:2575, acceleration:16.2, year:82, origin:1},
+{name:"dodge aries se", mpg:29, cylinders:4, displacement:135, horsepower:84, weight:2525, acceleration:16, year:82, origin:1},
+{name:"pontiac phoenix", mpg:27, cylinders:4, displacement:151, horsepower:90, weight:2735, acceleration:18, year:82, origin:1},
+{name:"ford fairmont futura", mpg:24, cylinders:4, displacement:140, horsepower:92, weight:2865, acceleration:16.4, year:82, origin:1},
+{name:"amc concord dl", mpg:23, cylinders:4, displacement:151, horsepower:undefined, weight:3035, acceleration:20.5, year:82, origin:1},
+{name:"volkswagen rabbit l", mpg:36, cylinders:4, displacement:105, horsepower:74, weight:1980, acceleration:15.3, year:82, origin:2},
+{name:"mazda glc custom l", mpg:37, cylinders:4, displacement:91, horsepower:68, weight:2025, acceleration:18.2, year:82, origin:3},
+{name:"mazda glc custom", mpg:31, cylinders:4, displacement:91, horsepower:68, weight:1970, acceleration:17.6, year:82, origin:3},
+{name:"plymouth horizon miser", mpg:38, cylinders:4, displacement:105, horsepower:63, weight:2125, acceleration:14.7, year:82, origin:1},
+{name:"mercury lynx l", mpg:36, cylinders:4, displacement:98, horsepower:70, weight:2125, acceleration:17.3, year:82, origin:1},
+{name:"nissan stanza xe", mpg:36, cylinders:4, displacement:120, horsepower:88, weight:2160, acceleration:14.5, year:82, origin:3},
+{name:"honda accord", mpg:36, cylinders:4, displacement:107, horsepower:75, weight:2205, acceleration:14.5, year:82, origin:3},
+{name:"toyota corolla", mpg:34, cylinders:4, displacement:108, horsepower:70, weight:2245, acceleration:16.9, year:82, origin:3},
+{name:"honda civic", mpg:38, cylinders:4, displacement:91, horsepower:67, weight:1965, acceleration:15, year:82, origin:3},
+{name:"honda civic (auto)", mpg:32, cylinders:4, displacement:91, horsepower:67, weight:1965, acceleration:15.7, year:82, origin:3},
+{name:"datsun 310 gx", mpg:38, cylinders:4, displacement:91, horsepower:67, weight:1995, acceleration:16.2, year:82, origin:3},
+{name:"buick century limited", mpg:25, cylinders:6, displacement:181, horsepower:110, weight:2945, acceleration:16.4, year:82, origin:1},
+{name:"oldsmobile cutlass ciera (diesel)", mpg:38, cylinders:6, displacement:262, horsepower:85, weight:3015, acceleration:17, year:82, origin:1},
+{name:"chrysler lebaron medallion", mpg:26, cylinders:4, displacement:156, horsepower:92, weight:2585, acceleration:14.5, year:82, origin:1},
+{name:"ford granada l", mpg:22, cylinders:6, displacement:232, horsepower:112, weight:2835, acceleration:14.7, year:82, origin:1},
+{name:"toyota celica gt", mpg:32, cylinders:4, displacement:144, horsepower:96, weight:2665, acceleration:13.9, year:82, origin:3},
+{name:"dodge charger 2.2", mpg:36, cylinders:4, displacement:135, horsepower:84, weight:2370, acceleration:13, year:82, origin:1},
+{name:"chevrolet camaro", mpg:27, cylinders:4, displacement:151, horsepower:90, weight:2950, acceleration:17.3, year:82, origin:1},
+{name:"ford mustang gl", mpg:27, cylinders:4, displacement:140, horsepower:86, weight:2790, acceleration:15.6, year:82, origin:1},
+{name:"vw pickup", mpg:44, cylinders:4, displacement:97, horsepower:52, weight:2130, acceleration:24.6, year:82, origin:2},
+{name:"dodge rampage", mpg:32, cylinders:4, displacement:135, horsepower:84, weight:2295, acceleration:11.6, year:82, origin:1},
+{name:"ford ranger", mpg:28, cylinders:4, displacement:120, horsepower:79, weight:2625, acceleration:18.6, year:82, origin:1},
+{name:"chevy s-10", mpg:31, cylinders:4, displacement:119, horsepower:82, weight:2720, acceleration:19.4, year:82, origin:1}
+];

+ 91 - 0
ext/thirdparty/js/protovis/examples/clock/clock.html

@@ -0,0 +1,91 @@
+<html>
+  <head>
+    <title>PolarClock</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <style type="text/css">
+
+body {
+  background: #222;
+}
+
+#fig {
+  width: 768px;
+  height: 768px;
+}
+
+#label {
+  position: absolute;
+  bottom: 10px;
+  right: 10px;
+  font: 10px sans-serif;
+  color: #999;
+}
+
+#label a {
+  color: #ccc;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var radius = 768 / 2;
+
+/* Generate the fields for the given date. */
+function fields() {
+  var d = new Date();
+
+  function days() {
+    return 32 - new Date(d.getYear(), d.getMonth(), 32).getDate();
+  }
+
+  var millis = d.getMilliseconds() / 1000;
+  var second = (d.getSeconds() + millis) / 60;
+  var minute = (d.getMinutes() + second) / 60;
+  var hour = (d.getHours() + minute) / 24;
+  var weekday = (d.getDay() + hour) / 7;
+  var date = (d.getDate() - 1 + hour) / days();
+  var month = (d.getMonth() + date) / 12;
+
+  return [
+      {value: second, index: .7, text: pv.Format.date("%S s")(d)},
+      {value: minute, index: .6, text: pv.Format.date("%M m")(d)},
+      {value: hour, index: .5, text: pv.Format.date("%H h")(d)},
+      {value: weekday, index: .3, text: pv.Format.date("%a")(d)},
+      {value: date, index: .2, text: pv.Format.date("%d d")(d)},
+      {value: month, index: .1, text: pv.Format.date("%b")(d)}
+    ];
+}
+
+var vis = new pv.Panel()
+    .width(radius * 2)
+    .height(radius * 2);
+
+vis.add(pv.Wedge)
+    .data(fields)
+    .left(radius)
+    .bottom(radius)
+    .innerRadius(function(d) radius * d.index)
+    .outerRadius(function(d) radius * (d.index + .1))
+    .startAngle(-Math.PI / 2)
+    .angle(function(d) 2 * Math.PI * d.value)
+    .fillStyle(function(d) "hsl(" + (360 * d.value - 180) + ", 50%, 50%)")
+    .lineWidth(4)
+    .strokeStyle("#222")
+  .anchor("end").add(pv.Label)
+    .font("bold 12px sans-serif")
+    .textStyle("#000")
+    .textMargin(7)
+    .text(function(d) d.text);
+
+setInterval(function() vis.render(), 50);
+
+    </script>
+  </div></div>
+  <div id="label">
+    Inspired by <a href="http://blog.pixelbreaker.com/polarclock/">pixelbreaker</a>.
+  </div>
+  </body>
+</html>

+ 0 - 63
ext/thirdparty/js/protovis/examples/column-grouped.html

@@ -1,63 +0,0 @@
-<html>
-  <head>
-    <title>Grouped Column Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var n = 3,
-    m = 4,
-    data = pv.range(n).map(function() pv.range(m).map(Math.random)),
-    w = 250,
-    h = 400,
-    x = pv.Scale.ordinal(pv.range(n)).splitBanded(0, w, 4/5),
-    y = pv.Scale.linear(0, 1).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(5)
-    .top(5);
-
-var bar = vis.add(pv.Panel)
-    .data(data)
-    .left(function() x(this.index))
-  .add(pv.Bar)
-    .data(function(a) a)
-    .left(function() this.index * x.range().band / m)
-    .width(x.range().band / m)
-    .bottom(0)
-    .height(y)
-    .fillStyle(pv.Colors.category20().by(pv.index));
-
-bar.anchor("top").add(pv.Label)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Label)
-    .data(pv.range(n))
-    .bottom(0)
-    .left(function() x(this.index) + x.range().band / 2)
-    .textMargin(5)
-    .textBaseline("top")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .left(0)
-    .width(5)
-    .strokeStyle("#000")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/column-grouped.png


+ 0 - 58
ext/thirdparty/js/protovis/examples/column-stacked.html

@@ -1,58 +0,0 @@
-<html>
-  <head>
-    <title>Stacked Column Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(3).map(function() pv.range(10).map(Math.random)),
-    w = 250,
-    h = 400,
-    x = pv.Scale.ordinal(pv.range(10)).splitBanded(0, w, 4/5),
-    y = pv.Scale.linear(0, 3).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(5)
-    .top(5);
-
-var bar = vis.add(pv.Panel)
-    .data(data)
-  .add(pv.Bar)
-    .data(function(a) a)
-    .left(function() x(this.index))
-    .width(x.range().band)
-    .bottom(pv.Layout.stack())
-    .height(y);
-
-bar.anchor("top").add(pv.Label)
-    .visible(function(d) d > .2)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-bar.anchor("bottom").add(pv.Label)
-    .visible(function() !this.parent.index)
-    .textMargin(5)
-    .textBaseline("top")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .left(0)
-    .width(5)
-    .strokeStyle("#000")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/column-stacked.png


+ 0 - 54
ext/thirdparty/js/protovis/examples/column.html

@@ -1,54 +0,0 @@
-<html>
-  <head>
-    <title>Column Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(10).map(Math.random),
-    w = 250,
-    h = 400,
-    x = pv.Scale.ordinal(pv.range(10)).splitBanded(0, w, 4/5),
-    y = pv.Scale.linear(0, 1).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(5)
-    .top(5);
-
-var bar = vis.add(pv.Bar)
-    .data(data)
-    .left(function() x(this.index))
-    .width(x.range().band)
-    .bottom(0)
-    .height(y);
-
-bar.anchor("top").add(pv.Label)
-    .textStyle("white")
-    .text(function(d) d.toFixed(1));
-
-bar.anchor("bottom").add(pv.Label)
-    .textMargin(5)
-    .textBaseline("top")
-    .text(function() "ABCDEFGHIJK".charAt(this.index));
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
-  .add(pv.Rule)
-    .left(0)
-    .width(5)
-    .strokeStyle("#000")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/column.png


+ 65 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea-grouped-bar.html

@@ -0,0 +1,65 @@
+<html>
+  <head>
+    <title>Crimean War</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="crimea.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 600px;
+  height: 300px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var w = 545,
+    h = 280,
+    x = pv.Scale.ordinal(crimea, function(d) d.date).splitBanded(0, w, 4 / 5),
+    y = pv.Scale.linear(0, 1500).range(0, h),
+    k = x.range().band / causes.length,
+    format = pv.Format.date("%b");
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(19.5)
+    .right(40);
+
+var panel = vis.add(pv.Panel)
+    .data(crimea)
+    .left(function(d) x(d.date))
+    .width(x.range().band);
+
+panel.add(pv.Bar)
+    .data(causes)
+    .bottom(0)
+    .width(k)
+    .left(function() this.index * k)
+    .height(function(t, d) y(d[t]))
+    .fillStyle(pv.colors("lightpink", "darkgray", "lightblue"))
+    .strokeStyle(function() this.fillStyle().darker())
+    .lineWidth(1);
+
+panel.anchor("bottom").add(pv.Label)
+    .visible(function() !(this.parent.index % 3))
+    .textBaseline("top")
+    .textMargin(5)
+    .text(function(d) format(d.date));
+
+vis.add(pv.Rule)
+    .data(y.ticks())
+    .bottom(y)
+    .strokeStyle(function(i) i ? "rgba(255, 255, 255, .5)" : "black")
+  .anchor("right").add(pv.Label)
+    .visible(function() !(this.index & 1))
+    .textMargin(6);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 61 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea-line.html

@@ -0,0 +1,61 @@
+<html>
+  <head>
+    <title>Crimean War</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="crimea.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 600px;
+  height: 300px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var w = 545,
+    h = 280,
+    x = pv.Scale.linear(crimea, function(d) d.date).range(0, w),
+    y = pv.Scale.linear(0, 1500).range(0, h),
+    fill = pv.colors("lightpink", "darkgray", "lightblue"),
+    format = pv.Format.date("%b");
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(19.5)
+    .right(40);
+
+vis.add(pv.Panel)
+    .data(causes)
+  .add(pv.Line)
+    .data(crimea)
+    .left(function(d) x(d.date))
+    .bottom(function(d, t) y(d[t]))
+    .strokeStyle(fill.by(pv.parent))
+    .lineWidth(3);
+
+vis.add(pv.Label)
+    .data(x.ticks())
+    .left(x)
+    .bottom(0)
+    .textBaseline("top")
+    .textMargin(5)
+    .text(pv.Format.date("%b"));
+
+vis.add(pv.Rule)
+    .data(y.ticks())
+    .bottom(y)
+    .strokeStyle(function(i) i ? "#ccc" : "black")
+  .anchor("right").add(pv.Label)
+    .visible(function() !(this.index & 1))
+    .textMargin(6);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 61 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea-stacked-area.html

@@ -0,0 +1,61 @@
+<html>
+  <head>
+    <title>Crimean War</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="crimea.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 600px;
+  height: 300px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var w = 545,
+    h = 280,
+    x = pv.Scale.linear(crimea, function(d) d.date).range(0, w),
+    y = pv.Scale.linear(0, 2200).range(0, h),
+    fill = pv.colors("lightpink", "darkgray", "lightblue"),
+    format = pv.Format.date("%b");
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(19.5)
+    .right(40);
+
+vis.add(pv.Layout.Stack)
+    .layers(causes)
+    .values(crimea)
+    .x(function(d) x(d.date))
+    .y(function(d, t) y(d[t]))
+  .layer.add(pv.Area)
+    .fillStyle(fill.by(pv.parent))
+    .strokeStyle(function() this.fillStyle().darker())
+    .lineWidth(1);
+
+vis.add(pv.Label)
+    .data(x.ticks())
+    .left(x)
+    .bottom(0)
+    .textBaseline("top")
+    .textMargin(5)
+    .text(pv.Format.date("%b"));
+
+vis.add(pv.Rule)
+    .data(y.ticks(5))
+    .bottom(y)
+    .strokeStyle(function(i) i ? "rgba(255, 255, 255, .7)" : "black")
+  .anchor("right").add(pv.Label)
+    .textMargin(6);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 60 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea-stacked-bar.html

@@ -0,0 +1,60 @@
+<html>
+  <head>
+    <title>Crimean War</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="crimea.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 600px;
+  height: 300px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var w = 545,
+    h = 280,
+    x = pv.Scale.ordinal(crimea, function(d) d.date).splitBanded(0, w),
+    y = pv.Scale.linear(0, 2200).range(0, h),
+    fill = pv.colors("lightpink", "darkgray", "lightblue"),
+    format = pv.Format.date("%b");
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(19.5)
+    .right(40);
+
+vis.add(pv.Layout.Stack)
+    .layers(causes)
+    .values(crimea)
+    .x(function(d) x(d.date))
+    .y(function(d, t) y(d[t]))
+  .layer.add(pv.Bar)
+    .antialias(false)
+    .width(x.range().band)
+    .fillStyle(fill.by(pv.parent))
+    .strokeStyle(function() this.fillStyle().darker())
+    .lineWidth(1)
+  .anchor("bottom").add(pv.Label)
+    .visible(function() !this.parent.index && !(this.index % 3))
+    .textBaseline("top")
+    .textMargin(5)
+    .text(function(d) format(d.date));
+
+vis.add(pv.Rule)
+    .data(y.ticks(5))
+    .bottom(y)
+    .strokeStyle(function(i) i ? "rgba(255, 255, 255, .7)" : "black")
+  .anchor("right").add(pv.Label)
+    .textMargin(6);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 100 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea.html

@@ -0,0 +1,100 @@
+<html>
+  <head>
+    <title>Crimean War</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="crimea.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 800px;
+  height: 450px;
+}
+
+#title {
+  font: 16px baskerville;
+  text-transform: uppercase;
+}
+
+#caption {
+  position: absolute;
+  font: oblique 12px baskerville;
+  top: 300px;
+  left: 25px;
+  width: 320px;
+}
+
+#caption p {
+  margin: 0;
+  text-indent: 12px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <center id="title">
+      Diagram <small>of the</small> Causes <small>of</small> Mortality<br>
+      <small><small>in the</small> Army <small>of the</small> East</small>
+    </center>
+    <script type="text/javascript+protovis">
+
+/* Compute maximum. */
+crimea.forEach(function(d) d.max = Math.max(350, d.wounds, d.other, d.disease));
+
+/* Scales for radius, angle, and fill. */
+var format = pv.Format.date("%b"),
+    radius = pv.Scale.linear(0, 1400).range(0, 275),
+    angle = pv.Scale.linear(0, 12).range(Math.PI / 2, 5 * Math.PI / 2),
+    fill = pv.colors("lightpink", "darkgray", "lightblue").domain(causes);
+
+var vis = new pv.Panel()
+    .width(800)
+    .height(450);
+
+/* Split the root panel by year. */
+var panel = vis.add(pv.Panel)
+    .data([crimea.slice(12), crimea.slice(0, 12)])
+    .left(function() this.index * 400);
+
+/* Add a panel per month, and sort causes by that month's deaths. */
+var wedge = panel.add(pv.Panel)
+    .data(function(d) d)
+  .add(pv.Wedge)
+    .data(function(d) causes.sort(function(a, b) d[b] - d[a]))
+    .left(200)
+    .top(150)
+    .angle(Math.PI / 6)
+    .startAngle(function(c, d) angle(d.date.getMonth()))
+    .outerRadius(function(c, d) radius(d[c]))
+    .fillStyle(fill)
+    .strokeStyle(function() this.fillStyle().darker())
+    .lineWidth(1);
+
+/* Add a label using the pre-computed maximum value. */
+wedge.add(pv.Wedge)
+    .data(["max"])
+    .fillStyle(null)
+    .strokeStyle(null)
+  .anchor("outer").add(pv.Label)
+    .text(function(c, d) format(d.date))
+    .textAlign("center")
+    .textBaseline("bottom")
+    .textAngle(function() this.anchorTarget().midAngle() + Math.PI / 2);
+
+vis.render();
+
+    </script>
+    <div id="caption">
+      The Areas of the blue, red, &amp; black wedges are each measured from the
+      centre as the common vertex
+      <p>The blue wedges measured from the centre of the circle represent area
+      for area the deaths from Preventible or Mitigable Zymotic Diseases, the
+      red wedges measured from the center the deaths from wounds, &amp; the
+      black wedges measured from the center the deaths from all other causes
+      <p>In October 1844, &amp; April 1855, the black area coincides with the
+      red, in January &amp; February 1856, the blue coincides with the black
+      <p>The entire areas may be compared by following the blue, the red &amp;
+      the black lines enclosing them.
+    </div>
+  </div></div></body>
+</html>

+ 33 - 0
ext/thirdparty/js/protovis/examples/crimea/crimea.js

@@ -0,0 +1,33 @@
+var causes = ["wounds", "other", "disease"];
+
+var crimea = [
+  { date: "4/1854", wounds: 0, other: 110, disease: 110 },
+  { date: "5/1854", wounds: 0, other: 95, disease: 105 },
+  { date: "6/1854", wounds: 0, other: 40, disease: 95 },
+  { date: "7/1854", wounds: 0, other: 140, disease: 520 },
+  { date: "8/1854", wounds: 20, other: 150, disease: 800 },
+  { date: "9/1854", wounds: 220, other: 230, disease: 740 },
+  { date: "10/1854", wounds: 305, other: 310, disease: 600 },
+  { date: "11/1854", wounds: 480, other: 290, disease: 820 },
+  { date: "12/1854", wounds: 295, other: 310, disease: 1100 },
+  { date: "1/1855", wounds: 230, other: 460, disease: 1440 },
+  { date: "2/1855", wounds: 180, other: 520, disease: 1270 },
+  { date: "3/1855", wounds: 155, other: 350, disease: 935 },
+  { date: "4/1855", wounds: 195, other: 195, disease: 560 },
+  { date: "5/1855", wounds: 180, other: 155, disease: 550 },
+  { date: "6/1855", wounds: 330, other: 130, disease: 650 },
+  { date: "7/1855", wounds: 260, other: 130, disease: 430 },
+  { date: "8/1855", wounds: 290, other: 110, disease: 490 },
+  { date: "9/1855", wounds: 355, other: 100, disease: 290 },
+  { date: "10/1855", wounds: 135, other: 95, disease: 245 },
+  { date: "11/1855", wounds: 100, other: 140, disease: 325 },
+  { date: "12/1855", wounds: 40, other: 120, disease: 215 },
+  { date: "1/1856", wounds: 0, other: 160, disease: 160 },
+  { date: "2/1856", wounds: 0, other: 100, disease: 100 },
+  { date: "3/1856", wounds: 0, other: 125, disease: 90 }
+];
+
+(function() {
+  var format = pv.Format.date("%m/%y");
+  crimea.forEach(function(d) { d.date = format.parse(d.date); });
+})();

+ 0 - 37
ext/thirdparty/js/protovis/examples/donut.html

@@ -1,37 +0,0 @@
-<html>
-  <head>
-    <title>Donut</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(10).map(Math.random).sort(pv.reverseOrder),
-    w = 400,
-    h = 400,
-    r = w / 2,
-    t = 30,
-    a = pv.Scale.linear(0, pv.sum(data)).range(0, 2 * Math.PI);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h);
-
-vis.add(pv.Wedge)
-    .data(data)
-    .bottom(w / 2)
-    .left(w / 2)
-    .innerRadius(r - t)
-    .outerRadius(r)
-    .angle(a)
-    .title(function(d) d)
-  .anchor("outer").add(pv.Label)
-    .visible(function(d) d > .05)
-    .textMargin(t + 5)
-    .text(function(d) d.toFixed(2));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/donut.png


+ 0 - 51
ext/thirdparty/js/protovis/examples/dot.html

@@ -1,51 +0,0 @@
-<html>
-  <head>
-    <title>Scatterplot</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(100).map(Math.random),
-    w = 400,
-    h = 400,
-    x = pv.Scale.linear(0, 99).range(0, w),
-    y = pv.Scale.linear(0, 1).range(0, h),
-    c = pv.Scale.linear(0, 1).range("orange", "brown");
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5)
-    .strokeStyle("#ccc");
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .visible(function(d) d > 0)
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.add(pv.Dot)
-    .data(data)
-    .left(function() x(this.index))
-    .bottom(y)
-    .strokeStyle(c)
-    .fillStyle(function() this.strokeStyle().alpha(.2));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/dot.png


+ 22 - 0
ext/thirdparty/js/protovis/examples/downloadify/LICENSE.txt

@@ -0,0 +1,22 @@
+Downloadify: Client Side File Creation
+JavaScript + Flash Library
+
+Copyright (c) 2009 Douglas C. Neiner
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

BIN
ext/thirdparty/js/protovis/examples/downloadify/download.png


+ 57 - 0
ext/thirdparty/js/protovis/examples/downloadify/downloadify.html

@@ -0,0 +1,57 @@
+<html>
+  <head>
+    <title>Downloadify</title>
+    <script type="text/javascript" src="swfobject.js"></script>
+    <script type="text/javascript" src="downloadify.min.js"></script>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <link type="text/css" href="../../tests/style.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <script type="text/javascript+protovis">
+
+var data = pv.range(10).map(Math.random).sort(pv.reverseOrder),
+    w = 400,
+    h = 400,
+    r = w / 2,
+    t = 30,
+    a = pv.Scale.linear(0, pv.sum(data)).range(0, 2 * Math.PI);
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h);
+
+vis.add(pv.Wedge)
+    .data(data)
+    .bottom(w / 2)
+    .left(w / 2)
+    .innerRadius(r - t)
+    .outerRadius(r)
+    .angle(a)
+    .title(function(d) d)
+  .anchor("outer").add(pv.Label)
+    .visible(function(d) d > .05)
+    .textMargin(t + 5)
+    .text(function(d) d.toFixed(2));
+
+vis.render();
+
+Downloadify.create("save", {
+  swf: "downloadify.swf",
+  downloadImage: "download.png",
+  width: 100,
+  height: 30,
+  filename: "sample.svg",
+  data: "<svg xmlns=\"http://www.w3.org/2000/svg\"" + vis.canvas().innerHTML.substring(4)
+});
+
+    </script>
+    <p id="save">You must have Flash 10 installed to download this file.</p>
+
+    <p>This example demonstrates using <a
+    href="http://www.downloadify.info/">Downloadify</a> to save the contents of
+    a Protovis canvas to a static SVG file. Note that because of security
+    restrictions, this example only works when hosted on a server; it will not
+    work when opened as a local file. Also note that Downloadify requires Flash
+    10.
+  </body>
+</html>

File diff suppressed because it is too large
+ 2 - 0
ext/thirdparty/js/protovis/examples/downloadify/downloadify.min.js


BIN
ext/thirdparty/js/protovis/examples/downloadify/downloadify.swf


File diff suppressed because it is too large
+ 3 - 0
ext/thirdparty/js/protovis/examples/downloadify/swfobject.js


+ 17 - 0
ext/thirdparty/js/protovis/examples/ex.css

@@ -0,0 +1,17 @@
+body {
+  margin: 0;
+  display: table;
+  height: 100%;
+  width: 100%;
+  font: 14px/134% Helvetica Neue, sans-serif;
+}
+
+#center {
+  display: table-cell;
+  vertical-align: middle;
+}
+
+#fig {
+  position: relative;
+  margin: auto;
+}

+ 53 - 0
ext/thirdparty/js/protovis/examples/eyes/eyes.html

@@ -0,0 +1,53 @@
+<html>
+  <head>
+    <title>My God, it's full of eyes!</title>
+    <link rel="stylesheet" type="text/css" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <style type="text/css">
+
+body {
+  background: #222;
+}
+
+#fig {
+  width: 200px;
+  height: 200px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var vis = new pv.Panel()
+    .width(200)
+    .height(200)
+    .fillStyle("#666")
+    .strokeStyle("#ccc");
+
+vis.add(pv.Panel)
+    .data([{x:50, y:16, r:40},
+           {x:64, y:85, r:20},
+           {x:90, y:200, r:60},
+           {x:150, y:44, r:20},
+           {x:175, y:120, r:40}])
+    .left(function(d) d.x)
+    .top(function(d) d.y)
+  .add(pv.Dot)
+    .fillStyle("#fff")
+    .strokeStyle(null)
+    .radius(function(d) d.r)
+  .add(pv.Dot)
+    .def("v", function(d) this.mouse().norm().times(d.r / 2))
+    .fillStyle("#aaa")
+    .left(function(d) this.v().x)
+    .top(function(d) this.v().y)
+    .radius(function(d) d.r / 2);
+
+vis.render();
+
+pv.listen(window, "mousemove", function() vis.render());
+
+    </script>
+  </div></div></body>
+</html>

+ 44 - 0
ext/thirdparty/js/protovis/examples/eyes/matrix.html

@@ -0,0 +1,44 @@
+<html>
+  <head>
+    <title>Matrix</title>
+    <link rel="stylesheet" type="text/css" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <style type="text/css">
+
+body {
+  background: #222;
+}
+
+#fig {
+  width: 200px;
+  height: 200px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+var vis = new pv.Panel()
+    .width(200)
+    .height(200)
+    .strokeStyle("#aaa");
+
+vis.add(pv.Panel)
+    .data(pv.range(0, 201, 20))
+    .left(function(x) x)
+  .add(pv.Panel)
+    .data(pv.range(0, 201, 20))
+    .top(function(y) y)
+  .add(pv.Dot)
+    .fillStyle("#fff")
+    .strokeStyle(null)
+    .size(function() this.mouse().length());
+
+vis.render();
+
+pv.listen(window, "mousemove", function() vis.render());
+
+    </script>
+  </div></div></body>
+</html>

+ 109 - 0
ext/thirdparty/js/protovis/examples/flowers/flowers.html

@@ -0,0 +1,109 @@
+<html>
+  <head>
+    <title>Iris Flowers</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="flowers.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 680px;
+  height: 705px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* Size parameters. */
+var size = 150,
+    padding = 20;
+
+/* Scales for color and position. */
+var color = pv.colors(
+        "rgba(50%, 0%, 0%, .5)",
+        "rgba(0%, 50%, 0%, .5)",
+        "rgba(0%, 0%, 50%, .5)");
+    position = pv.dict(traits, function(t)
+        pv.Scale.linear(flowers, function(d) d[t])
+        .range(0, size));
+
+/* Root panel. */
+var vis = new pv.Panel()
+    .width((size + padding) * traits.length)
+    .height((size + padding) * traits.length + padding)
+    .left(.5)
+    .top(5.5);
+
+/* One cell per trait pair. */
+var cell = vis.add(pv.Panel)
+    .data(traits)
+    .top(function() this.index * (size + padding) + padding / 2)
+    .height(size)
+  .add(pv.Panel)
+    .data(function(y) traits.map(function(x) { return {x:x, y:y}; }))
+    .left(function() this.index * (size + padding) + padding / 2)
+    .width(size);
+
+/* Framed dot plots not along the diagonal. */
+var plot = cell.add(pv.Panel)
+    .visible(function(t) t.x != t.y)
+    .strokeStyle("#aaa");
+
+/* X-axis ticks. */
+var xtick = plot.add(pv.Rule)
+    .data(function(t) position[t.x].ticks().filter(function(x) !(x % 1)))
+    .left(function(d, t) position[t.x](d))
+    .strokeStyle("#eee")
+    .textMargin(5);
+
+/* Bottom and top labels. */
+xtick.anchor("bottom").add(pv.Label)
+    .visible(function() (cell.parent.index == traits.length - 1) && !(cell.index % 2));
+xtick.anchor("top").add(pv.Label)
+    .visible(function() (cell.parent.index == 0) && (cell.index % 2));
+
+/* Y-axis ticks. */
+var ytick = plot.add(pv.Rule)
+    .data(function(t) position[t.y].ticks().filter(function(x) !(x % 1)))
+    .bottom(function(d, t) position[t.y](d))
+    .strokeStyle("#eee")
+    .textMargin(5);
+
+/* Left and right labels. */
+ytick.anchor("left").add(pv.Label)
+    .visible(function() (cell.index == 0) && (cell.parent.index % 2));
+ytick.anchor("right").add(pv.Label)
+    .visible(function() (cell.index == traits.length - 1) && !(cell.parent.index % 2));
+
+/* Frame and dot plot. */
+plot.add(pv.Dot)
+    .data(flowers)
+    .left(function(d, t) position[t.x](d[t.x]))
+    .bottom(function(d, t) position[t.y](d[t.y]))
+    .size(8)
+    .strokeStyle(null)
+    .fillStyle(function(d) color(d.species));
+
+/* Labels along the diagonal. */
+cell.anchor("center").add(pv.Label)
+    .visible(function(t) t.x == t.y)
+    .font("bold 14px sans-serif")
+    .text(function(t) t.x.replace(/([WL])/, " $1").toLowerCase());
+
+/* Legend. */
+vis.add(pv.Dot)
+    .data(species)
+    .bottom(5)
+    .left(function() 15 + this.index * 65)
+    .size(8)
+    .strokeStyle(null)
+    .fillStyle(color)
+  .anchor("right").add(pv.Label);
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 154 - 0
ext/thirdparty/js/protovis/examples/flowers/flowers.js

@@ -0,0 +1,154 @@
+var species = ["setosa", "versicolor", "virginica"];
+var traits = ["sepalLength", "sepalWidth", "petalLength", "petalWidth"];
+var flowers = [
+  { sepalLength: 5.1, sepalWidth: 3.5, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.9, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.7, sepalWidth: 3.2, petalLength: 1.3, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.6, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.6, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.4, sepalWidth: 3.9, petalLength: 1.7, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 4.6, sepalWidth: 3.4, petalLength: 1.4, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.4, sepalWidth: 2.9, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.9, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.1, species: "setosa" },
+  { sepalLength: 5.4, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.8, sepalWidth: 3.4, petalLength: 1.6, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.8, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.1, species: "setosa" },
+  { sepalLength: 4.3, sepalWidth: 3.0, petalLength: 1.1, petalWidth: 0.1, species: "setosa" },
+  { sepalLength: 5.8, sepalWidth: 4.0, petalLength: 1.2, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.7, sepalWidth: 4.4, petalLength: 1.5, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 5.4, sepalWidth: 3.9, petalLength: 1.3, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.5, petalLength: 1.4, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 5.7, sepalWidth: 3.8, petalLength: 1.7, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.5, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 5.4, sepalWidth: 3.4, petalLength: 1.7, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 4.6, sepalWidth: 3.6, petalLength: 1.0, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.3, petalLength: 1.7, petalWidth: 0.5, species: "setosa" },
+  { sepalLength: 4.8, sepalWidth: 3.4, petalLength: 1.9, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.0, petalLength: 1.6, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.4, petalLength: 1.6, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 5.2, sepalWidth: 3.5, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.2, sepalWidth: 3.4, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.7, sepalWidth: 3.2, petalLength: 1.6, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.8, sepalWidth: 3.1, petalLength: 1.6, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.4, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 5.2, sepalWidth: 4.1, petalLength: 1.5, petalWidth: 0.1, species: "setosa" },
+  { sepalLength: 5.5, sepalWidth: 4.2, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.9, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.2, petalLength: 1.2, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.5, sepalWidth: 3.5, petalLength: 1.3, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.9, sepalWidth: 3.6, petalLength: 1.4, petalWidth: 0.1, species: "setosa" },
+  { sepalLength: 4.4, sepalWidth: 3.0, petalLength: 1.3, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.5, petalLength: 1.3, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 4.5, sepalWidth: 2.3, petalLength: 1.3, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 4.4, sepalWidth: 3.2, petalLength: 1.3, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.5, petalLength: 1.6, petalWidth: 0.6, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.9, petalWidth: 0.4, species: "setosa" },
+  { sepalLength: 4.8, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.3, species: "setosa" },
+  { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.6, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 4.6, sepalWidth: 3.2, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.3, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 5.0, sepalWidth: 3.3, petalLength: 1.4, petalWidth: 0.2, species: "setosa" },
+  { sepalLength: 7.0, sepalWidth: 3.2, petalLength: 4.7, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 6.4, sepalWidth: 3.2, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 4.9, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 5.5, sepalWidth: 2.3, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.5, sepalWidth: 2.8, petalLength: 4.6, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 5.7, sepalWidth: 2.8, petalLength: 4.5, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.3, sepalWidth: 3.3, petalLength: 4.7, petalWidth: 1.6, species: "versicolor" },
+  { sepalLength: 4.9, sepalWidth: 2.4, petalLength: 3.3, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 6.6, sepalWidth: 2.9, petalLength: 4.6, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.2, sepalWidth: 2.7, petalLength: 3.9, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 5.0, sepalWidth: 2.0, petalLength: 3.5, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 5.9, sepalWidth: 3.0, petalLength: 4.2, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 6.0, sepalWidth: 2.2, petalLength: 4.0, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 6.1, sepalWidth: 2.9, petalLength: 4.7, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 5.6, sepalWidth: 2.9, petalLength: 3.6, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 4.4, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 5.6, sepalWidth: 3.0, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 4.1, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 6.2, sepalWidth: 2.2, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 5.6, sepalWidth: 2.5, petalLength: 3.9, petalWidth: 1.1, species: "versicolor" },
+  { sepalLength: 5.9, sepalWidth: 3.2, petalLength: 4.8, petalWidth: 1.8, species: "versicolor" },
+  { sepalLength: 6.1, sepalWidth: 2.8, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.3, sepalWidth: 2.5, petalLength: 4.9, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 6.1, sepalWidth: 2.8, petalLength: 4.7, petalWidth: 1.2, species: "versicolor" },
+  { sepalLength: 6.4, sepalWidth: 2.9, petalLength: 4.3, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.6, sepalWidth: 3.0, petalLength: 4.4, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 6.8, sepalWidth: 2.8, petalLength: 4.8, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 6.7, sepalWidth: 3.0, petalLength: 5.0, petalWidth: 1.7, species: "versicolor" },
+  { sepalLength: 6.0, sepalWidth: 2.9, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 5.7, sepalWidth: 2.6, petalLength: 3.5, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 5.5, sepalWidth: 2.4, petalLength: 3.8, petalWidth: 1.1, species: "versicolor" },
+  { sepalLength: 5.5, sepalWidth: 2.4, petalLength: 3.7, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 3.9, petalWidth: 1.2, species: "versicolor" },
+  { sepalLength: 6.0, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.6, species: "versicolor" },
+  { sepalLength: 5.4, sepalWidth: 3.0, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 6.0, sepalWidth: 3.4, petalLength: 4.5, petalWidth: 1.6, species: "versicolor" },
+  { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 4.7, petalWidth: 1.5, species: "versicolor" },
+  { sepalLength: 6.3, sepalWidth: 2.3, petalLength: 4.4, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.6, sepalWidth: 3.0, petalLength: 4.1, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.5, sepalWidth: 2.5, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.5, sepalWidth: 2.6, petalLength: 4.4, petalWidth: 1.2, species: "versicolor" },
+  { sepalLength: 6.1, sepalWidth: 3.0, petalLength: 4.6, petalWidth: 1.4, species: "versicolor" },
+  { sepalLength: 5.8, sepalWidth: 2.6, petalLength: 4.0, petalWidth: 1.2, species: "versicolor" },
+  { sepalLength: 5.0, sepalWidth: 2.3, petalLength: 3.3, petalWidth: 1.0, species: "versicolor" },
+  { sepalLength: 5.6, sepalWidth: 2.7, petalLength: 4.2, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.7, sepalWidth: 3.0, petalLength: 4.2, petalWidth: 1.2, species: "versicolor" },
+  { sepalLength: 5.7, sepalWidth: 2.9, petalLength: 4.2, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.2, sepalWidth: 2.9, petalLength: 4.3, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 5.1, sepalWidth: 2.5, petalLength: 3.0, petalWidth: 1.1, species: "versicolor" },
+  { sepalLength: 5.7, sepalWidth: 2.8, petalLength: 4.1, petalWidth: 1.3, species: "versicolor" },
+  { sepalLength: 6.3, sepalWidth: 3.3, petalLength: 6.0, petalWidth: 2.5, species: "virginica" },
+  { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.9, species: "virginica" },
+  { sepalLength: 7.1, sepalWidth: 3.0, petalLength: 5.9, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 6.3, sepalWidth: 2.9, petalLength: 5.6, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.8, petalWidth: 2.2, species: "virginica" },
+  { sepalLength: 7.6, sepalWidth: 3.0, petalLength: 6.6, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 4.9, sepalWidth: 2.5, petalLength: 4.5, petalWidth: 1.7, species: "virginica" },
+  { sepalLength: 7.3, sepalWidth: 2.9, petalLength: 6.3, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.7, sepalWidth: 2.5, petalLength: 5.8, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 7.2, sepalWidth: 3.6, petalLength: 6.1, petalWidth: 2.5, species: "virginica" },
+  { sepalLength: 6.5, sepalWidth: 3.2, petalLength: 5.1, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 6.4, sepalWidth: 2.7, petalLength: 5.3, petalWidth: 1.9, species: "virginica" },
+  { sepalLength: 6.8, sepalWidth: 3.0, petalLength: 5.5, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 5.7, sepalWidth: 2.5, petalLength: 5.0, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 5.8, sepalWidth: 2.8, petalLength: 5.1, petalWidth: 2.4, species: "virginica" },
+  { sepalLength: 6.4, sepalWidth: 3.2, petalLength: 5.3, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.5, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 7.7, sepalWidth: 3.8, petalLength: 6.7, petalWidth: 2.2, species: "virginica" },
+  { sepalLength: 7.7, sepalWidth: 2.6, petalLength: 6.9, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 6.0, sepalWidth: 2.2, petalLength: 5.0, petalWidth: 1.5, species: "virginica" },
+  { sepalLength: 6.9, sepalWidth: 3.2, petalLength: 5.7, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 5.6, sepalWidth: 2.8, petalLength: 4.9, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 7.7, sepalWidth: 2.8, petalLength: 6.7, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 6.3, sepalWidth: 2.7, petalLength: 4.9, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.7, sepalWidth: 3.3, petalLength: 5.7, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 7.2, sepalWidth: 3.2, petalLength: 6.0, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.2, sepalWidth: 2.8, petalLength: 4.8, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.1, sepalWidth: 3.0, petalLength: 4.9, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.4, sepalWidth: 2.8, petalLength: 5.6, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 7.2, sepalWidth: 3.0, petalLength: 5.8, petalWidth: 1.6, species: "virginica" },
+  { sepalLength: 7.4, sepalWidth: 2.8, petalLength: 6.1, petalWidth: 1.9, species: "virginica" },
+  { sepalLength: 7.9, sepalWidth: 3.8, petalLength: 6.4, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 6.4, sepalWidth: 2.8, petalLength: 5.6, petalWidth: 2.2, species: "virginica" },
+  { sepalLength: 6.3, sepalWidth: 2.8, petalLength: 5.1, petalWidth: 1.5, species: "virginica" },
+  { sepalLength: 6.1, sepalWidth: 2.6, petalLength: 5.6, petalWidth: 1.4, species: "virginica" },
+  { sepalLength: 7.7, sepalWidth: 3.0, petalLength: 6.1, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 6.3, sepalWidth: 3.4, petalLength: 5.6, petalWidth: 2.4, species: "virginica" },
+  { sepalLength: 6.4, sepalWidth: 3.1, petalLength: 5.5, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.0, sepalWidth: 3.0, petalLength: 4.8, petalWidth: 1.8, species: "virginica" },
+  { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 5.4, petalWidth: 2.1, species: "virginica" },
+  { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 5.6, petalWidth: 2.4, species: "virginica" },
+  { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 5.1, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.9, species: "virginica" },
+  { sepalLength: 6.8, sepalWidth: 3.2, petalLength: 5.9, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 6.7, sepalWidth: 3.3, petalLength: 5.7, petalWidth: 2.5, species: "virginica" },
+  { sepalLength: 6.7, sepalWidth: 3.0, petalLength: 5.2, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 6.3, sepalWidth: 2.5, petalLength: 5.0, petalWidth: 1.9, species: "virginica" },
+  { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.2, petalWidth: 2.0, species: "virginica" },
+  { sepalLength: 6.2, sepalWidth: 3.4, petalLength: 5.4, petalWidth: 2.3, species: "virginica" },
+  { sepalLength: 5.9, sepalWidth: 3.0, petalLength: 5.1, petalWidth: 1.8, species: "virginica" }
+];

+ 79 - 0
ext/thirdparty/js/protovis/examples/group-stack/group-stack.html

@@ -0,0 +1,79 @@
+<html>
+  <head>
+    <title>Group Stacked Bar Chart</title>
+    <script type="text/javascript" src="../../protovis-d3.2.js"></script>
+    <script type="text/javascript" src="headcount.js"></script>
+  </head>
+  <body>
+    <script type="text/javascript+protovis">
+
+/* Extract the unique dates, departments and types. */
+var dates = pv.uniq(headcount, function(d) d.date),
+    depts = pv.uniq(headcount, function(d) d.dept),
+    types = pv.uniq(headcount, function(d) d.type);
+
+/* Build a map of headcounts by date > dept > type. */
+var count = pv.nest(headcount)
+    .key(function(d) d.date)
+    .key(function(d) d.dept)
+    .key(function(d) d.type)
+    .rollup(function(v) v[0].headcount);
+
+/* Compute the maximum stack height using sum(types | date + dept). */
+var max = pv.max(dates,
+    function(q) pv.max(depts,
+    function(d) pv.sum(types,
+    function(t) count[q][d][t])));
+
+var w = 250,
+    h = 400,
+    x1 = pv.Scale.ordinal(dates).splitBanded(0, w, .8),
+    x2 = pv.Scale.ordinal(depts).splitBanded(0, x1.range().band, .9),
+    y = pv.Scale.linear(0, max).range(0, h);
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .bottom(20)
+    .left(25)
+    .right(5)
+    .top(5);
+
+var bar = vis.add(pv.Panel)
+    .data(dates)
+    .left(x1)
+  .add(pv.Layout.Stack)
+    .layers(types)
+    .values(depts)
+    .x(x2)
+    .y(function(d, t, q) y(count[q][d][t]))
+  .layer.add(pv.Bar)
+    .width(x2.range().band)
+    .title(function(d, t, q) d + "-" + t + ": " + count[q][d][t])
+    .fillStyle(pv.Colors.category20().by(function(d, t) d + t));
+
+vis.add(pv.Label)
+    .data(dates)
+    .bottom(0)
+    .left(function(d) x1(d) + x1.range().band / 2)
+    .textMargin(5)
+    .textBaseline("top")
+    .textAlign("center")
+    .text(pv.Format.date("%m/%y"));
+
+vis.add(pv.Rule)
+    .data(y.ticks())
+    .bottom(y)
+    .strokeStyle(function(d) d ? "rgba(255, 255, 255, .3)" : "#000")
+  .add(pv.Rule)
+    .left(0)
+    .width(5)
+    .strokeStyle("#000")
+  .anchor("left").add(pv.Label)
+    .text(y.tickFormat);
+
+vis.render();
+
+    </script>
+  </body>
+</html>

+ 23 - 0
ext/thirdparty/js/protovis/examples/group-stack/headcount.js

@@ -0,0 +1,23 @@
+var headcount = [
+  {date: "1/2009", dept: "eng", type: "perm", headcount: 140},
+  {date: "1/2009", dept: "eng", type: "temp", headcount: 39},
+  {date: "1/2009", dept: "sales", type: "perm", headcount: 209},
+  {date: "1/2009", dept: "sales", type: "temp", headcount: 123},
+  {date: "4/2009", dept: "eng", type: "perm", headcount: 160},
+  {date: "4/2009", dept: "eng", type: "temp", headcount: 44},
+  {date: "4/2009", dept: "sales", type: "perm", headcount: 229},
+  {date: "4/2009", dept: "sales", type: "temp", headcount: 113},
+  {date: "7/2009", dept: "eng", type: "perm", headcount: 174},
+  {date: "7/2009", dept: "eng", type: "temp", headcount: 41},
+  {date: "7/2009", dept: "sales", type: "perm", headcount: 224},
+  {date: "7/2009", dept: "sales", type: "temp", headcount: 169},
+  {date: "10/2009", dept: "eng", type: "perm", headcount: 190},
+  {date: "10/2009", dept: "eng", type: "temp", headcount: 43},
+  {date: "10/2009", dept: "sales", type: "perm", headcount: 232},
+  {date: "10/2009", dept: "sales", type: "temp", headcount: 185}
+];
+
+(function() {
+  var df = pv.Format.date("%m/%y");
+  headcount.forEach(function(d) { d.date = df.parse(d.date); });
+})();

+ 76 - 0
ext/thirdparty/js/protovis/examples/hotel/hotel.html

@@ -0,0 +1,76 @@
+<html>
+  <head>
+    <title>Hotel Stays</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="hotel.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 520px;
+  height: 520px;
+}
+
+    </style>
+  </head>
+  <body><div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* Scales and size parameters. */
+var w = 270,
+    h = 480,
+    x = pv.Scale.ordinal(pv.range(24)).splitBanded(0, w),
+    y = pv.Scale.ordinal(order).splitBanded(0, h, 4 / 5);
+
+/* Compute the mean per metric. */
+var type = pv.nest(hotel).key(function(d) d.type),
+    mean = type.rollup(function(values) pv.mean(values, function(d) d.count));
+
+/* The root panel. */
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .top(40)
+    .right(200);
+
+/* A panel per type... */
+var panel = vis.add(pv.Panel)
+    .data(type.entries())
+    .top(y.by(pv.index))
+    .height(y.range().band);
+
+/* ... with a label ... */
+panel.anchor("right").add(pv.Label)
+    .font("13px Georgia")
+    .textAlign("left")
+    .textMargin(8)
+    .text(function(x, d) d.key);
+
+/* ... and bar chart. */
+panel.add(pv.Bar)
+    .def("y", function(d) pv.Scale.linear()
+        .domain(0, pv.max(d.values, function(d) d.count))
+        .range(0, this.parent.height()))
+    .data(function(d) pv.repeat(d.values))
+    .left(x.by(pv.index))
+    .bottom(0)
+    .width(x.range().band)
+    .height(function(d) this.y()(d.count))
+    .antialias(false)
+    .fillStyle(function(d) (d.count > mean[d.type]) ? "#000" : null)
+    .strokeStyle("#000")
+    .lineWidth(1);
+
+/* Month labels. */
+vis.add(pv.Label)
+    .data(pv.repeat("JFMAMJJASOND".split("")))
+    .top(function() (this.index % 6) > 2 ? 0 : -2)
+    .left(function() x(this.index) + x.range().band / 2)
+    .textAlign("center")
+    .font("bold 15px Arial");
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 245 - 0
ext/thirdparty/js/protovis/examples/hotel/hotel.js

@@ -0,0 +1,245 @@
+var hotel = [
+  {"type":"1. % CLIENTELE FEMALE","month":"Jan","count":26},
+  {"type":"1. % CLIENTELE FEMALE","month":"Feb","count":21},
+  {"type":"1. % CLIENTELE FEMALE","month":"Mar","count":26},
+  {"type":"1. % CLIENTELE FEMALE","month":"Apr","count":28},
+  {"type":"1. % CLIENTELE FEMALE","month":"May","count":20},
+  {"type":"1. % CLIENTELE FEMALE","month":"Jun","count":20},
+  {"type":"1. % CLIENTELE FEMALE","month":"Jul","count":20},
+  {"type":"1. % CLIENTELE FEMALE","month":"Aug","count":20},
+  {"type":"1. % CLIENTELE FEMALE","month":"Sep","count":20},
+  {"type":"1. % CLIENTELE FEMALE","month":"Oct","count":40},
+  {"type":"1. % CLIENTELE FEMALE","month":"Nov","count":15},
+  {"type":"1. % CLIENTELE FEMALE","month":"Dec","count":40},
+  {"type":"2. % CLIENTELE LOCAL","month":"Jan","count":69},
+  {"type":"2. % CLIENTELE LOCAL","month":"Feb","count":70},
+  {"type":"2. % CLIENTELE LOCAL","month":"Mar","count":77},
+  {"type":"2. % CLIENTELE LOCAL","month":"Apr","count":71},
+  {"type":"2. % CLIENTELE LOCAL","month":"May","count":37},
+  {"type":"2. % CLIENTELE LOCAL","month":"Jun","count":36},
+  {"type":"2. % CLIENTELE LOCAL","month":"Jul","count":39},
+  {"type":"2. % CLIENTELE LOCAL","month":"Aug","count":39},
+  {"type":"2. % CLIENTELE LOCAL","month":"Sep","count":55},
+  {"type":"2. % CLIENTELE LOCAL","month":"Oct","count":60},
+  {"type":"2. % CLIENTELE LOCAL","month":"Nov","count":68},
+  {"type":"2. % CLIENTELE LOCAL","month":"Dec","count":72},
+  {"type":"3. % CLIENTELE USA","month":"Jan","count":7},
+  {"type":"3. % CLIENTELE USA","month":"Feb","count":6},
+  {"type":"3. % CLIENTELE USA","month":"Mar","count":3},
+  {"type":"3. % CLIENTELE USA","month":"Apr","count":6},
+  {"type":"3. % CLIENTELE USA","month":"May","count":23},
+  {"type":"3. % CLIENTELE USA","month":"Jun","count":14},
+  {"type":"3. % CLIENTELE USA","month":"Jul","count":19},
+  {"type":"3. % CLIENTELE USA","month":"Aug","count":14},
+  {"type":"3. % CLIENTELE USA","month":"Sep","count":9},
+  {"type":"3. % CLIENTELE USA","month":"Oct","count":6},
+  {"type":"3. % CLIENTELE USA","month":"Nov","count":8},
+  {"type":"3. % CLIENTELE USA","month":"Dec","count":8},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jan","count":0},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Feb","count":0},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Mar","count":0},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Apr","count":0},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"May","count":8},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jun","count":6},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jul","count":6},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Aug","count":4},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Sep","count":2},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Oct","count":12},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Nov","count":0},
+  {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Dec","count":0},
+  {"type":"5. % CLIENTELE EUROPE","month":"Jan","count":20},
+  {"type":"5. % CLIENTELE EUROPE","month":"Feb","count":15},
+  {"type":"5. % CLIENTELE EUROPE","month":"Mar","count":14},
+  {"type":"5. % CLIENTELE EUROPE","month":"Apr","count":15},
+  {"type":"5. % CLIENTELE EUROPE","month":"May","count":23},
+  {"type":"5. % CLIENTELE EUROPE","month":"Jun","count":27},
+  {"type":"5. % CLIENTELE EUROPE","month":"Jul","count":22},
+  {"type":"5. % CLIENTELE EUROPE","month":"Aug","count":30},
+  {"type":"5. % CLIENTELE EUROPE","month":"Sep","count":27},
+  {"type":"5. % CLIENTELE EUROPE","month":"Oct","count":19},
+  {"type":"5. % CLIENTELE EUROPE","month":"Nov","count":19},
+  {"type":"5. % CLIENTELE EUROPE","month":"Dec","count":17},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jan","count":1},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Feb","count":0},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Mar","count":0},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Apr","count":8},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"May","count":6},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jun","count":4},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jul","count":6},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Aug","count":4},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Sep","count":2},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Oct","count":1},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Nov","count":0},
+  {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Dec","count":1},
+  {"type":"7. % CLIENTELE ASIA","month":"Jan","count":3},
+  {"type":"7. % CLIENTELE ASIA","month":"Feb","count":10},
+  {"type":"7. % CLIENTELE ASIA","month":"Mar","count":6},
+  {"type":"7. % CLIENTELE ASIA","month":"Apr","count":0},
+  {"type":"7. % CLIENTELE ASIA","month":"May","count":3},
+  {"type":"7. % CLIENTELE ASIA","month":"Jun","count":13},
+  {"type":"7. % CLIENTELE ASIA","month":"Jul","count":8},
+  {"type":"7. % CLIENTELE ASIA","month":"Aug","count":9},
+  {"type":"7. % CLIENTELE ASIA","month":"Sep","count":5},
+  {"type":"7. % CLIENTELE ASIA","month":"Oct","count":2},
+  {"type":"7. % CLIENTELE ASIA","month":"Nov","count":5},
+  {"type":"7. % CLIENTELE ASIA","month":"Dec","count":2},
+  {"type":"8. % BUSINESSMEN","month":"Jan","count":78},
+  {"type":"8. % BUSINESSMEN","month":"Feb","count":80},
+  {"type":"8. % BUSINESSMEN","month":"Mar","count":85},
+  {"type":"8. % BUSINESSMEN","month":"Apr","count":86},
+  {"type":"8. % BUSINESSMEN","month":"May","count":85},
+  {"type":"8. % BUSINESSMEN","month":"Jun","count":87},
+  {"type":"8. % BUSINESSMEN","month":"Jul","count":70},
+  {"type":"8. % BUSINESSMEN","month":"Aug","count":76},
+  {"type":"8. % BUSINESSMEN","month":"Sep","count":87},
+  {"type":"8. % BUSINESSMEN","month":"Oct","count":85},
+  {"type":"8. % BUSINESSMEN","month":"Nov","count":87},
+  {"type":"8. % BUSINESSMEN","month":"Dec","count":80},
+  {"type":"9. % TOURISTS","month":"Jan","count":22},
+  {"type":"9. % TOURISTS","month":"Feb","count":20},
+  {"type":"9. % TOURISTS","month":"Mar","count":15},
+  {"type":"9. % TOURISTS","month":"Apr","count":14},
+  {"type":"9. % TOURISTS","month":"May","count":15},
+  {"type":"9. % TOURISTS","month":"Jun","count":13},
+  {"type":"9. % TOURISTS","month":"Jul","count":30},
+  {"type":"9. % TOURISTS","month":"Aug","count":24},
+  {"type":"9. % TOURISTS","month":"Sep","count":13},
+  {"type":"9. % TOURISTS","month":"Oct","count":15},
+  {"type":"9. % TOURISTS","month":"Nov","count":13},
+  {"type":"9. % TOURISTS","month":"Dec","count":20},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Jan","count":70},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Feb","count":70},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Mar","count":75},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Apr","count":74},
+  {"type":"10. % DIRECT RESERVATIONS","month":"May","count":69},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Jun","count":68},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Jul","count":74},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Aug","count":75},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Sep","count":68},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Oct","count":68},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Nov","count":64},
+  {"type":"10. % DIRECT RESERVATIONS","month":"Dec","count":75},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Jan","count":20},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Feb","count":18},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Mar","count":19},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Apr","count":17},
+  {"type":"11. % AGENCY RESERVATIONS","month":"May","count":27},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Jun","count":27},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Jul","count":19},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Aug","count":19},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Sep","count":26},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Oct","count":27},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Nov","count":21},
+  {"type":"11. % AGENCY RESERVATIONS","month":"Dec","count":15},
+  {"type":"12. % AIR CREWS","month":"Jan","count":10},
+  {"type":"12. % AIR CREWS","month":"Feb","count":12},
+  {"type":"12. % AIR CREWS","month":"Mar","count":6},
+  {"type":"12. % AIR CREWS","month":"Apr","count":9},
+  {"type":"12. % AIR CREWS","month":"May","count":4},
+  {"type":"12. % AIR CREWS","month":"Jun","count":5},
+  {"type":"12. % AIR CREWS","month":"Jul","count":7},
+  {"type":"12. % AIR CREWS","month":"Aug","count":6},
+  {"type":"12. % AIR CREWS","month":"Sep","count":6},
+  {"type":"12. % AIR CREWS","month":"Oct","count":5},
+  {"type":"12. % AIR CREWS","month":"Nov","count":15},
+  {"type":"12. % AIR CREWS","month":"Dec","count":10},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jan","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Feb","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Mar","count":4},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Apr","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"May","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jun","count":1},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jul","count":1},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Aug","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Sep","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Oct","count":4},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Nov","count":2},
+  {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Dec","count":5},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Jan","count":25},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Feb","count":27},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Mar","count":37},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Apr","count":35},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"May","count":25},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Jun","count":25},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Jul","count":27},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Aug","count":28},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Sep","count":24},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Oct","count":30},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Nov","count":24},
+  {"type":"14. % CLIENTS 20-35 YEARS","month":"Dec","count":30},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Jan","count":48},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Feb","count":49},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Mar","count":42},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Apr","count":48},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"May","count":54},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Jun","count":55},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Jul","count":53},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Aug","count":51},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Sep","count":55},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Oct","count":46},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Nov","count":55},
+  {"type":"15. % CLIENTS 35-55 YEARS","month":"Dec","count":43},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jan","count":25},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Feb","count":22},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Mar","count":17},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Apr","count":15},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"May","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jun","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jul","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Aug","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Sep","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Oct","count":20},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Nov","count":19},
+  {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Dec","count":22},
+  {"type":"17. PRICE OF ROOMS","month":"Jan","count":163},
+  {"type":"17. PRICE OF ROOMS","month":"Feb","count":167},
+  {"type":"17. PRICE OF ROOMS","month":"Mar","count":166},
+  {"type":"17. PRICE OF ROOMS","month":"Apr","count":174},
+  {"type":"17. PRICE OF ROOMS","month":"May","count":152},
+  {"type":"17. PRICE OF ROOMS","month":"Jun","count":155},
+  {"type":"17. PRICE OF ROOMS","month":"Jul","count":145},
+  {"type":"17. PRICE OF ROOMS","month":"Aug","count":170},
+  {"type":"17. PRICE OF ROOMS","month":"Sep","count":157},
+  {"type":"17. PRICE OF ROOMS","month":"Oct","count":174},
+  {"type":"17. PRICE OF ROOMS","month":"Nov","count":165},
+  {"type":"17. PRICE OF ROOMS","month":"Dec","count":158},
+  {"type":"18. LENGTH OF STAY","month":"Jan","count":1.65},
+  {"type":"18. LENGTH OF STAY","month":"Feb","count":1.71},
+  {"type":"18. LENGTH OF STAY","month":"Mar","count":1.65},
+  {"type":"18. LENGTH OF STAY","month":"Apr","count":1.91},
+  {"type":"18. LENGTH OF STAY","month":"May","count":1.9},
+  {"type":"18. LENGTH OF STAY","month":"Jun","count":2},
+  {"type":"18. LENGTH OF STAY","month":"Jul","count":1.54},
+  {"type":"18. LENGTH OF STAY","month":"Aug","count":1.6},
+  {"type":"18. LENGTH OF STAY","month":"Sep","count":1.73},
+  {"type":"18. LENGTH OF STAY","month":"Oct","count":1.82},
+  {"type":"18. LENGTH OF STAY","month":"Nov","count":1.66},
+  {"type":"18. LENGTH OF STAY","month":"Dec","count":1.44},
+  {"type":"19. % OCCUPANCY","month":"Jan","count":67},
+  {"type":"19. % OCCUPANCY","month":"Feb","count":82},
+  {"type":"19. % OCCUPANCY","month":"Mar","count":70},
+  {"type":"19. % OCCUPANCY","month":"Apr","count":83},
+  {"type":"19. % OCCUPANCY","month":"May","count":74},
+  {"type":"19. % OCCUPANCY","month":"Jun","count":77},
+  {"type":"19. % OCCUPANCY","month":"Jul","count":56},
+  {"type":"19. % OCCUPANCY","month":"Aug","count":62},
+  {"type":"19. % OCCUPANCY","month":"Sep","count":90},
+  {"type":"19. % OCCUPANCY","month":"Oct","count":92},
+  {"type":"19. % OCCUPANCY","month":"Nov","count":78},
+  {"type":"19. % OCCUPANCY","month":"Dec","count":55},
+  {"type":"20. CONVENTIONS","month":"Jan","count":0},
+  {"type":"20. CONVENTIONS","month":"Feb","count":0},
+  {"type":"20. CONVENTIONS","month":"Mar","count":0},
+  {"type":"20. CONVENTIONS","month":"Apr","count":1},
+  {"type":"20. CONVENTIONS","month":"May","count":1},
+  {"type":"20. CONVENTIONS","month":"Jun","count":1},
+  {"type":"20. CONVENTIONS","month":"Jul","count":0},
+  {"type":"20. CONVENTIONS","month":"Aug","count":0},
+  {"type":"20. CONVENTIONS","month":"Sep","count":1},
+  {"type":"20. CONVENTIONS","month":"Oct","count":1},
+  {"type":"20. CONVENTIONS","month":"Nov","count":1},
+  {"type":"20. CONVENTIONS","month":"Dec","count":1}
+];
+
+/* Bertin's order, grouping metrics by seasonal pattern. */
+var order = [18, 17, 19, 7, 10, 3, 11, 12, 15, 13, 0, 1, 6, 8, 9, 16, 5, 2, 4, 14];

+ 71 - 0
ext/thirdparty/js/protovis/examples/jobs/jobs.html

@@ -0,0 +1,71 @@
+<html>
+  <head>
+    <title>Job Voyager</title>
+    <link type="text/css" rel="stylesheet" href="../ex.css"/>
+    <script type="text/javascript" src="../../protovis-d3.2.js"></script>
+    <script type="text/javascript" src="jobs.js"></script>
+    <style type="text/css">
+
+#fig {
+  width: 860px;
+  height: 580px;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="center"><div id="fig">
+    <script type="text/javascript+protovis">
+
+/* Flatten the tree into an array to faciliate transformation. */
+var jobs = pv.flatten(jobs)
+    .key("job")
+    .key("gender", function(i) i.charAt(0))
+    .key("year", function(i) years[i])
+    .key("people")
+    .array();
+
+/* Compute per-year and per-job totals. */
+var sumByYear = pv.nest(jobs)
+    .key(function(d) d.year)
+    .rollup(function(v) pv.sum(v, function(d) d.people)),
+  sumByJob = pv.nest(jobs)
+    .key(function(d) d.gender + d.job)
+    .rollup(function(v) pv.sum(v, function(d) d.people));
+
+var w = 800,
+    h = 480,
+    x = pv.Scale.linear(years).range(0, w),
+    y = pv.Scale.linear(0, sumByYear[2000]).range(0, h),
+    c = pv.Scale.ordinal("men", "women").range("#33f", "#f33")
+    a = pv.Scale.linear(pv.values(sumByJob)).range(.4, .8);
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .margin(30);
+
+vis.add(pv.Rule)
+    .data(x.ticks())
+    .left(x)
+    .strokeStyle("#ccc")
+  .anchor("bottom").add(pv.Label);
+
+vis.add(pv.Rule)
+    .bottom(0);
+
+var area = vis.add(pv.Layout.Stack)
+    .layers(pv.nest(jobs).key(function(d) d.gender + d.job).entries())
+    .values(function(d) d.values)
+    .x(function(d) x(d.year))
+    .y(function(d) y(d.people))
+    .order("reverse")
+    .offset("expand")
+  .layer.add(pv.Area)
+    .fillStyle(function(d, p) c(d.gender).alpha(a(sumByJob[p.key])));
+
+vis.render();
+
+    </script>
+  </div></div></body>
+</html>

+ 1024 - 0
ext/thirdparty/js/protovis/examples/jobs/jobs.js

@@ -0,0 +1,1024 @@
+var years = [1850,1860,1870,1880,1900,1910,1920,1930,1940,1950,1960,1970,1980,1990,2000];
+
+var jobs = {
+"Accountant / Auditor": {
+men: [708,1805,1310,2295,11753,0,111209,181482,0,330352,425002,575667,661606,814842,866460],
+women: [0,0,0,0,807,0,15746,14657,0,56117,112853,248441,452783,949683,1217596]
+},
+"Actor": {
+men: [506,401,1507,3983,10449,15867,14020,28815,12428,10678,10461,11726,0,0,29975],
+women: [0,100,200,1994,6736,14106,11001,19210,8750,7067,8069,11127,0,0,25931]
+},
+"Advertising Agent": {
+men: [0,0,703,499,4526,0,15437,37913,33554,26603,32275,53993,72865,94797,114250],
+women: [0,0,0,0,0,0,1414,4043,4883,4219,8669,19544,58594,104742,132581]
+},
+"Agent": {
+men: [2528,4610,5930,20657,19299,52647,30365,54081,92566,115523,146745,23236,0,0,0],
+women: [0,200,0,498,906,2016,3632,5562,12692,23172,46524,1102,0,0,0]
+},
+"Apprentice": {
+men: [3134,22765,24010,20449,17486,70527,17761,17699,39638,30590,21110,16425,4442,1865,0],
+women: [101,1107,4116,5585,5026,8568,3428,1517,3081,1072,2492,1103,1622,405,0]
+},
+"Apprentice - Auto Mechanic": {
+men: [0,0,0,0,0,0,3532,506,0,5955,2093,4106,3961,1800,0],
+women: [0,0,0,0,0,0,0,506,0,1074,0,100,120,51,0]
+},
+"Apprentice - Bricklayer": {
+men: [0,1204,3320,699,1004,0,101,2021,0,8290,2991,4710,3562,976,0],
+women: [0,0,0,0,0,0,0,0,0,0,0,200,140,53,0]
+},
+"Apprentice - Carpenter": {
+men: [404,6818,8443,5589,3113,0,1615,2527,13667,11840,7666,9616,11127,5609,0],
+women: [0,0,101,0,0,0,0,0,1010,54,0,0,840,318,0]
+},
+"Apprentice - Construction": {
+men: [202,3408,5525,1995,2012,21412,705,1515,18051,5717,3489,2603,0,0,0],
+women: [0,202,101,0,0,0,0,0,101,0,100,302,0,0,0]
+},
+"Apprentice - Electrician": {
+men: [0,0,0,0,1407,0,4439,1517,7102,12387,9156,22140,18588,17188,0],
+women: [0,0,0,0,0,0,0,0,101,0,99,500,1160,901,0]
+},
+"Apprentice - Machinist": {
+men: [0,2612,3212,4391,12049,0,17659,7077,17891,17372,14047,17724,15146,4030,0],
+women: [0,0,0,200,100,0,101,0,0,165,497,401,841,356,0]
+},
+"Apprentice - Mechanic": {
+men: [0,1003,1710,0,504,0,1313,1011,0,4726,4784,5309,0,0,0],
+women: [0,0,101,0,0,0,0,0,0,0,200,201,0,0,0]
+},
+"Apprentice - Metal Working": {
+men: [0,13251,15780,8480,8337,0,8076,6067,0,8716,4984,6807,720,930,0],
+women: [0,0,0,0,101,0,0,0,0,246,0,0,160,106,0]
+},
+"Apprentice - Plumber": {
+men: [0,1004,2011,1694,2815,0,5749,6571,8921,17684,9754,15327,12270,7878,0],
+women: [0,0,0,0,200,0,0,0,2821,3305,0,200,500,244,0]
+},
+"Apprentice - Printing": {
+men: [0,2005,4522,2597,4229,0,5150,9605,15899,20145,12253,10015,0,0,0],
+women: [0,0,0,99,200,0,303,505,2435,1967,299,1100,0,0,0]
+},
+"Architect": {
+men: [405,1707,1914,3892,10151,16624,15439,18200,19929,24820,30179,57091,107765,143413,171025],
+women: [0,0,0,0,100,0,100,0,303,519,1096,2606,10949,27057,45789]
+},
+"Artist / Art Teacher": {
+men: [2123,5024,3716,5485,15074,20151,20083,34876,43200,52247,70230,70208,88510,113275,147525],
+women: [0,605,502,3393,11754,15617,13929,20220,19699,30171,59496,51690,91749,136297,144382]
+},
+"Athlete": {
+men: [204,100,201,498,3417,0,3735,7579,10153,8927,4387,0,0,0,0],
+women: [0,0,0,200,0,0,0,0,748,155,796,0,0,0,0]
+},
+"Auctioneer": {
+men: [809,1908,2108,2594,2818,2519,5652,5053,5580,13509,4385,5415,6427,8339,0],
+women: [0,0,0,0,0,0,0,0,2744,2970,99,800,1282,1577,0]
+},
+"Author": {
+men: [101,301,303,797,803,1260,3836,7581,11522,9927,20930,18231,28608,61985,89748],
+women: [0,201,201,99,1104,756,2924,5055,4047,5669,11349,12021,26476,63063,107058]
+},
+"Baggageman": {
+men: [809,1509,2913,5186,7529,12846,11103,7582,5504,7482,6868,0,0,0,0],
+women: [0,0,0,0,0,251,101,0,0,381,498,0,0,0,0]
+},
+"Baker": {
+men: [14557,17661,24323,36718,70477,69276,99297,123866,139541,110668,108960,96872,88978,107471,109810],
+women: [101,401,602,897,4121,5036,4643,10112,12300,9889,28685,49583,66119,100474,117400]
+},
+"Bank Teller": {
+men: [404,1004,806,1396,5029,0,18875,33870,0,35493,45627,41973,55680,61846,53683],
+women: [0,0,101,0,101,0,2222,6067,0,32017,146571,312725,583967,562920,474467]
+},
+"Barber / Beautician": {
+men: [7685,8928,24425,43679,122105,177585,187113,275008,218924,199062,232886,227274,176025,162502,180813],
+women: [202,100,1104,2990,7325,19898,32802,118798,222479,199372,382438,640008,636306,806487,912194]
+},
+"Bartender": {
+men: [5660,9528,16476,25639,91055,110336,23312,1516,129349,207898,192736,189712,211294,194743,185678],
+women: [0,0,0,100,503,252,101,0,6704,17293,32280,61604,192798,215718,232073]
+},
+"Bill Collector": {
+men: [1212,2311,1908,3688,21211,31238,29573,36399,38109,18194,31184,40757,40434,61919,73893],
+women: [0,0,0,100,201,2016,3228,3538,3309,3874,9255,30353,64010,125183,189733]
+},
+"Blacksmith": {
+men: [96744,111164,133448,177847,220322,239044,202217,117282,90238,45402,29270,21935,0,0,0],
+women: [101,503,201,0,200,504,707,0,303,65,99,500,0,0,0]
+},
+"Blaster": {
+men: [0,0,300,0,302,0,2320,1011,6971,11950,8858,10522,12387,10256,11083],
+women: [0,0,0,0,0,0,0,0,202,0,100,402,541,537,1187]
+},
+"Boarding House Keeper": {
+men: [2124,4819,4924,7586,12564,19149,16353,10617,8844,7385,4282,2103,0,0,0],
+women: [910,9733,9138,16963,78882,141058,110201,81890,55217,21857,38355,10713,0,0,0]
+},
+"Boatman": {
+men: [28295,22671,19903,22846,8743,5291,5850,5561,12583,14891,8368,6510,0,0,0],
+women: [304,200,202,300,0,0,0,0,1355,773,199,100,0,0,0]
+},
+"Boilermaker": {
+men: [2020,3917,7332,10973,28436,39803,71945,55615,34322,38374,30978,35752,42092,28061,24467],
+women: [0,0,0,0,100,252,202,0,303,319,99,602,761,664,810]
+},
+"Bookbinder": {
+men: [3435,3410,5127,6884,13265,0,11605,11625,0,14948,14843,17835,14787,16648,29675],
+women: [0,201,702,3490,12966,0,11707,8599,0,17486,24210,35459,23481,21119,34600]
+},
+"Bookkeeper": {
+men: [2225,16847,30849,62745,158957,294208,244835,234070,454109,177052,170070,337040,226696,239124,220113],
+women: [0,301,1204,2889,57988,190197,283872,385193,475928,595798,1262258,1840579,2139251,2111677,1920224]
+},
+"Bootblack": {
+men: [0,202,1206,1896,9535,19394,15242,20226,15029,14807,13752,6012,0,0,0],
+women: [0,0,0,0,0,0,201,0,1503,1787,399,1002,0,0,0]
+},
+"Building Manager": {
+men: [2125,2909,602,1696,68034,0,12514,29320,46583,49271,35767,62713,133459,247337,244612],
+women: [101,0,101,0,20099,0,6156,25781,33714,27306,28494,50878,107540,229483,272713]
+},
+"Bus Driver": {
+men: [3839,4514,6318,3990,4622,0,11098,39423,0,155103,181709,196639,246381,272749,317367],
+women: [0,0,0,0,0,0,201,0,0,5339,23108,83046,216409,251743,303925]
+},
+"Buyer - Farm": {
+men: [404,4919,12366,23831,45443,0,60344,51566,38019,28490,21507,23538,20732,16759,12935],
+women: [0,0,0,100,505,0,403,506,505,166,597,1103,2223,3951,3870]
+},
+"Buyer - Store": {
+men: [0,100,0,99,5429,0,33604,42965,53514,102591,195651,544178,700449,560069,825260],
+women: [0,0,0,0,604,0,7972,10614,19293,35223,75217,150434,232898,359754,735183]
+},
+"Cabinet Maker": {
+men: [38303,35416,30948,36108,36590,40555,53790,61678,74244,70956,75927,82235,78786,75521,94810],
+women: [101,500,100,200,302,1008,504,506,4667,559,1395,6113,8669,6140,7648]
+},
+"Car Washer": {
+men: [0,0,0,0,0,0,27553,69245,54742,90099,110112,0,0,0,0],
+women: [0,0,0,0,0,0,101,506,482,8613,5875,0,0,0,0]
+},
+"Carpenter": {
+men: [219647,273528,352340,387029,600594,816886,840929,852292,741073,973660,1100617,1111775,1531584,1604105,1712796],
+women: [707,804,302,798,1103,2519,3129,506,1903,5723,3792,15824,28434,31003,35826]
+},
+"Cashier": {
+men: [101,600,604,2495,12054,0,27251,32354,0,47193,131521,185135,390848,766005,976286],
+women: [0,0,101,599,13373,0,57119,79874,0,197824,710621,1236998,2318015,3286285,3347118]
+},
+"Cement / Concrete Finisher": {
+men: [102,101,0,499,502,0,7972,20726,30773,36637,54904,88343,85759,88695,116125],
+women: [0,0,0,0,0,0,0,0,101,175,299,1201,1180,1386,1620]
+},
+"Chainman": {
+men: [0,0,0,0,302,0,2020,3536,13526,12715,14249,16531,13886,5411,0],
+women: [0,0,0,0,0,0,0,0,0,929,499,602,1021,759,0]
+},
+"Charwoman": {
+men: [0,0,302,600,3520,10579,16448,24774,37062,50778,74484,275355,204143,166599,198452],
+women: [0,400,100,100,4524,25945,18771,29825,43528,76814,206218,406102,766315,820584,1538658]
+},
+"Chemist": {
+men: [809,301,1104,2594,8036,15115,31894,37922,56420,71535,81301,104054,88543,114710,79842],
+women: [0,0,0,0,404,252,1414,505,1908,7798,13145,19839,23895,42610,39726]
+},
+"Chiropractor": {
+men: [0,0,0,0,100,0,3837,9605,9091,12017,13641,14624,20496,33741,46698],
+women: [0,0,0,0,0,0,1717,1011,1818,1932,1990,2205,3324,15502,19954]
+},
+"Clergyman": {
+men: [29414,35220,45907,68499,108124,122668,129169,136996,133751,168400,212391,230171,291038,321137,379579],
+women: [101,300,201,898,1207,2267,2424,2529,4020,8045,7764,8308,19574,40106,69192]
+},
+"Clerical Worker": {
+men: [2929,8431,62494,98934,245106,525693,850683,1078763,1329366,1584096,2030615,2474020,2718238,2983145,3739906],
+women: [0,100,2308,4788,38400,121157,417539,494402,745669,1539068,3761404,5105863,6374822,7560092,9244984]
+},
+"College President / Dean": {
+men: [101,101,101,398,201,0,505,1011,0,4142,6378,34354,0,0,0],
+women: [0,101,100,0,0,0,404,0,0,1526,1496,15025,0,0,0]
+},
+"Constable": {
+men: [3439,4715,4019,5686,8545,9825,5449,9099,10729,7493,8368,5110,0,0,0],
+women: [0,0,0,0,0,0,202,0,0,164,696,200,0,0,0]
+},
+"Cook": {
+men: [0,6928,16086,5690,68137,0,107994,170873,205345,230222,259815,433899,906926,1481390,2100285],
+women: [0,8032,37994,4787,204394,0,73046,104637,143807,254588,600691,867535,1375041,1609016,2289731]
+},
+"Counter Worker": {
+men: [0,0,0,0,502,0,6865,16175,0,51488,56092,64511,56640,93128,95273],
+women: [0,0,0,0,100,0,1313,7082,0,49079,210897,217777,270330,256746,208388]
+},
+"Craftsman": {
+men: [47904,78049,91556,61142,108845,43321,75069,49544,0,78662,122735,904916,0,0,0],
+women: [202,501,101,200,2211,756,1110,1011,0,619,2789,62514,0,0,0]
+},
+"Cranemen / Hoistmen": {
+men: [0,0,0,0,2717,0,30474,51565,123466,109222,144028,173610,182572,120046,97514],
+women: [0,0,0,0,0,0,202,0,583,1405,1097,2404,4400,3169,3609]
+},
+"Creditor": {
+men: [0,0,0,0,201,0,8582,18198,28019,27992,41142,46190,0,0,0],
+women: [0,0,0,0,0,0,403,2529,4308,8548,17638,22537,0,0,0]
+},
+"Crossing Guard / Toll Collector": {
+men: [1818,1604,2313,4192,4725,0,9889,10114,17110,12586,20520,22533,22733,23485,0],
+women: [0,402,300,697,202,0,202,0,0,229,14536,31948,42251,42603,0]
+},
+"Dancer / Dance Teacher": {
+men: [102,300,201,100,401,0,1313,2021,3362,3270,5981,1901,3925,6107,4794],
+women: [0,100,0,0,501,0,2825,11122,11905,12049,28201,10013,13749,21996,29546]
+},
+"Decorator": {
+men: [0,0,101,0,1812,5292,7571,20224,27711,30892,29889,36665,0,0,0],
+women: [0,0,0,0,100,504,705,4548,6321,11781,40449,66709,0,0,0]
+},
+"Delivery Man": {
+men: [1316,2109,3812,12462,41899,217884,166109,236570,409059,245625,470814,742046,769142,143502,50821],
+women: [0,100,101,398,100,2520,1211,2528,3817,4586,24218,35857,71026,18029,13282]
+},
+"Demonstrator": {
+men: [0,0,0,0,0,1008,1513,1012,2021,4894,1796,4512,3161,11569,18049],
+women: [0,0,0,0,602,2771,2422,2527,7821,14926,52985,76833,21926,67502,73418]
+},
+"Dentist": {
+men: [2023,5720,7136,12171,26222,41818,56401,69763,69505,70950,84779,90658,125312,148591,141323],
+women: [0,100,0,0,603,756,807,2528,1415,2037,3187,4605,10409,22823,30915]
+},
+"Designer": {
+men: [203,101,202,798,3515,7306,11402,11122,15745,34062,61770,94265,183331,294288,373242],
+women: [0,0,0,0,301,3022,5448,11126,8941,11044,21834,41775,221166,418677,521359]
+},
+"Disabled": {
+men: [910,2512,10656,7383,23017,0,10597,15166,0,0,0,0,0,0,0],
+women: [202,1305,8545,8179,8040,0,3534,505,0,0,0,0,0,0,0]
+},
+"Dispatcher": {
+men: [0,0,101,1198,803,0,2823,2529,0,31256,54589,59485,75592,123787,138567],
+women: [0,0,0,0,0,0,202,0,0,3466,10561,16128,38161,113690,163762]
+},
+"Doctor Office Attendant": {
+men: [101,0,0,0,503,0,2421,0,8806,2497,2891,25944,59807,62365,112481],
+women: [0,0,0,0,303,0,11105,28308,32096,40013,127703,298831,520895,442489,960494]
+},
+"Draftsman": {
+men: [101,302,1003,2394,12362,32998,51760,80877,91661,112090,222058,290040,307888,301258,216855],
+women: [0,0,0,0,201,252,1514,3540,2020,6803,24997,32359,65804,71277,52679]
+},
+"Dressmaker / Seamstress": {
+men: [202,1910,1706,998,4217,4282,8171,5053,7270,4609,5480,6409,8547,8137,35316],
+women: [2226,131138,138614,233469,453625,403770,281139,184030,155175,143321,186323,163170,141472,125498,115374]
+},
+"Dyer": {
+men: [2326,2715,2310,5188,17179,16375,17962,21242,24246,28005,21118,25750,0,0,0],
+women: [0,101,202,99,603,504,1110,0,758,2297,1395,3107,0,0,0]
+},
+"Economist": {
+men: [0,0,0,0,0,0,101,1011,0,6678,16035,61492,74162,93846,71392],
+women: [0,0,0,0,0,0,100,0,0,3251,3289,10717,32636,74349,64767]
+},
+"Editor / Reporter": {
+men: [2327,3611,5834,11872,28136,31492,28555,49037,47417,66138,94148,159347,186706,221291,239429],
+women: [0,0,100,400,2711,3524,5750,12637,15064,25334,69526,117199,200657,278778,318909]
+},
+"Electrician": {
+men: [0,0,101,400,46435,130726,206165,257818,217697,325389,384469,494793,698214,777440,868613],
+women: [0,0,100,0,502,252,2017,0,1898,2213,4685,13323,15435,21758,24584]
+},
+"Electrotyper": {
+men: [0,100,100,999,2206,5541,3933,9099,9311,18965,9759,6913,0,0,0],
+women: [0,0,0,0,100,753,101,505,606,1605,298,301,0,0,0]
+},
+"Elevator Operator": {
+men: [0,0,0,0,11247,18893,31072,71278,72757,67776,69127,38849,21958,11416,0],
+women: [0,0,0,0,0,0,6156,13143,14365,29340,45326,19036,7664,3215,0]
+},
+"Engineer": {
+men: [0,0,101,0,1006,0,9888,12636,0,78147,152998,253425,308454,395357,396626],
+women: [0,0,0,0,0,0,101,0,0,333,1096,4508,13670,41711,49325]
+},
+"Engineer - Aeuronautical": {
+men: [0,0,0,0,0,0,403,3035,0,18100,54294,70109,89216,144618,117501],
+women: [0,0,0,0,0,0,0,0,0,545,897,2003,3140,13004,11645]
+},
+"Engineer - Chemical": {
+men: [0,0,0,0,100,0,1312,7075,11561,30515,42658,53196,59210,65561,62749],
+women: [0,0,0,0,0,0,0,0,203,1545,897,1205,3282,8189,10994]
+},
+"Engineer - Civil": {
+men: [607,2507,4019,6381,18597,47349,68401,85930,90394,127908,172552,188593,214288,259854,275116],
+women: [0,0,0,0,0,1258,0,0,303,4171,1194,3405,7342,19468,32554]
+},
+"Engineer - Electrical": {
+men: [0,0,0,0,6644,0,29464,54095,55931,110418,183872,301011,325825,463684,377014],
+women: [0,0,0,0,0,0,202,0,202,1010,2196,6709,18148,50213,44169]
+},
+"Engineer - Industrial": {
+men: [0,0,0,0,0,0,3331,7078,13750,46819,103512,187121,287934,390793,570889],
+women: [0,0,0,0,0,0,0,0,1372,843,2594,6610,56732,137988,285490]
+},
+"Engineer - Mechanical": {
+men: [101,300,202,399,11145,14607,26647,43477,81157,117503,167238,194229,228850,215965,297908],
+women: [0,0,0,0,101,0,0,0,202,746,599,1704,5288,11152,20586]
+},
+"Engineer - Metallurgical": {
+men: [0,0,0,0,0,0,1108,3538,10425,11737,18527,15622,25544,17850,36887],
+women: [0,0,0,0,0,0,0,0,1414,679,700,401,1380,2562,4554]
+},
+"Engineer - Mining": {
+men: [0,100,100,999,3417,10328,6256,8091,0,10661,12947,17124,35084,33345,23729],
+women: [0,0,0,0,0,0,0,0,0,420,0,201,1462,2347,1776]
+},
+"Engraver": {
+men: [1820,2608,3516,5884,9368,13348,10088,13141,8127,9858,12760,7511,10670,13165,11601],
+women: [0,0,0,0,500,252,606,3035,808,1318,2591,3504,7723,7785,6674]
+},
+"Entertainer": {
+men: [910,501,604,3593,3713,22165,3632,9609,6756,11328,10860,55995,70659,100096,84890],
+women: [0,0,101,398,402,252,403,1518,897,6703,5075,26138,48109,102835,122685]
+},
+"Farm Advisor": {
+men: [0,100,0,0,0,0,3127,4549,7677,6357,7078,6811,0,0,0],
+women: [0,0,0,0,0,0,202,505,4520,8128,10762,10811,0,0,0]
+},
+"Farm Foreman": {
+men: [16270,31787,2810,3790,4022,51894,15337,20723,24110,18215,28900,38151,50749,42815,57670],
+women: [101,402,0,199,100,5794,1211,1518,303,420,1495,4011,12963,8331,11769]
+},
+"Farm Laborer": {
+men: [296047,841587,2595826,2913760,3964960,5061866,3295843,3489124,3086228,2188723,1784546,1407937,995680,853810,856153],
+women: [1313,18465,401852,508897,677490,1641086,819956,654160,392640,644460,838162,516273,429164,347642,384886]
+},
+"Farm Manager": {
+men: [707,3514,1710,2196,8940,0,80524,44993,34456,30519,26102,67090,145958,251617,208086],
+women: [0,1606,100,400,1003,0,14731,15166,1010,2118,997,4006,18873,41998,37048]
+},
+"Farmer": {
+men: [2415878,2586005,3118876,4483723,5535233,5765835,6225184,5791250,5064557,4225264,2766741,1655668,1284012,868622,634832],
+women: [17583,99747,46126,95948,316196,282118,274294,246702,161483,113760,181127,112396,181370,157681,117671]
+},
+"Fireman": {
+men: [1718,3811,6031,16261,81592,139785,192430,196150,199221,250390,255326,292747,404958,382977,373490],
+women: [0,0,0,99,200,252,606,1516,1480,3969,1396,9011,11495,15924,23972]
+},
+"Fisherman": {
+men: [12734,18666,24328,34303,73919,73556,51958,67234,66581,81244,55407,47863,72464,70675,68818],
+women: [0,0,0,599,3514,0,404,0,3039,1461,1098,3008,7263,6360,5504]
+},
+"Floor Manager": {
+men: [0,0,0,0,802,14106,3533,3034,7505,5095,7174,0,0,0,0],
+women: [0,0,0,0,101,4030,1414,505,3596,5334,7976,0,0,0,0]
+},
+"Foremen": {
+men: [2427,9835,10358,22943,131261,274820,443397,519696,568592,790386,1215583,1664520,2132755,1741680,1999279],
+women: [0,101,201,599,9846,20403,39854,41959,48342,66337,113444,170726,352845,322602,436539]
+},
+"Forgemen": {
+men: [1010,1507,1308,599,3613,7558,8676,6069,0,17916,11543,17428,16311,19672,16752],
+women: [0,0,0,0,101,0,303,0,0,339,997,1304,1322,1246,1115]
+},
+"Forrester": {
+men: [0,300,100,0,1207,4284,7266,12134,0,26195,40254,52191,59767,52735,46628],
+women: [0,0,0,0,0,0,0,0,0,1750,2487,3109,8826,9165,7396]
+},
+"Funeral Director": {
+men: [606,601,2106,5784,12066,16372,22005,32352,34865,35287,36562,44275,42362,46564,44421],
+women: [0,0,0,99,200,1259,806,1011,1718,4118,2591,4205,4483,7353,9932]
+},
+"Furnaceman": {
+men: [9808,7528,13162,42480,28251,29463,28262,19715,30045,58253,62349,79432,0,0,0],
+women: [0,0,0,0,200,504,202,0,101,783,1190,3505,0,0,0]
+},
+"Furrier": {
+men: [202,301,501,997,3919,0,7469,10616,16327,13387,4085,3807,3882,7218,0],
+women: [0,303,0,796,903,0,1514,1010,2424,2251,1297,802,8922,14334,0]
+},
+"Gardener / Groundskeeper": {
+men: [8596,18751,31048,41906,55665,93958,39958,124869,186215,157029,287768,543926,570275,924326,1267931],
+women: [0,1005,100,898,905,5542,909,1011,2518,3698,6477,20631,57849,86456,113506]
+},
+"Glazier": {
+men: [101,901,904,696,3317,0,3635,9101,12949,14297,18235,28336,34302,49856,57335],
+women: [0,0,0,0,101,0,202,0,303,784,500,1504,2142,2971,2671]
+},
+"Hospital Attendant": {
+men: [101,200,403,1495,5430,0,12112,24262,65725,87897,124009,145853,207920,281405,329525],
+women: [101,902,403,698,3113,0,11104,10616,54842,126801,479067,984420,1705976,2153464,2508569]
+},
+"Household Worker": {
+men: [14966,36635,79495,200507,109734,287427,108884,108678,188721,92978,114267,100857,57388,62976,31353],
+women: [11620,616191,869232,1096234,1465711,2031315,1476973,1947276,2259463,1541444,2760658,2152078,962462,855222,123088]
+},
+"Huckster": {
+men: [11322,21079,32454,54049,73066,0,45724,52579,54906,21167,27385,35059,57774,96374,0],
+women: [0,1403,2110,3786,2513,0,1514,3540,3755,3572,49318,170465,281812,216853,0]
+},
+"Human Resources": {
+men: [0,0,0,0,0,0,1917,2022,0,39058,76577,231098,393747,407601,565758],
+women: [0,0,0,0,0,0,200,505,0,15585,45217,126330,327683,501023,974106]
+},
+"Inmate": {
+men: [303,1303,19096,11683,20904,25692,32293,64714,0,0,0,0,0,0,0],
+women: [0,2305,14797,8674,11053,3778,17355,40948,0,0,0,0,0,0,0]
+},
+"Inspector": {
+men: [1721,1808,5325,7384,40907,48616,118660,123842,137552,170403,212526,254269,204298,204463,161302],
+women: [0,0,0,0,1405,1259,4742,4041,8597,11117,24507,28647,37570,66435,72389]
+},
+"Insulation Worker": {
+men: [0,0,0,0,202,0,2624,1517,10681,17794,24297,29951,60958,86239,77376],
+women: [0,0,0,0,101,0,0,0,786,1610,995,900,3242,4158,4840]
+},
+"Insurance Agent": {
+men: [606,1806,12458,13365,67332,74801,119169,259333,232506,288469,415632,509645,536722,605552,512838],
+women: [0,0,604,0,1403,3024,5653,15160,15793,24562,65148,110316,297359,589576,752326]
+},
+"Janitor": {
+men: [202,803,3016,7480,48751,94970,135536,253254,343957,423443,698408,1471666,2153590,2288548,2004939],
+women: [0,100,302,697,7340,18391,21601,24772,41564,62893,117939,238126,751580,1153478,953749]
+},
+"Jeweler": {
+men: [11832,17268,14776,22250,49851,27203,33402,31341,44607,48404,40433,35357,68858,77985,120157],
+women: [101,301,101,599,2510,1008,2624,2024,5015,2997,3887,9316,24699,32224,31809]
+},
+"Job Setter": {
+men: [0,0,0,0,0,0,2524,6571,0,24555,40441,91541,57611,28718,0],
+women: [0,0,0,0,0,0,0,0,0,550,698,3011,4323,2841,0]
+},
+"Laborer": {
+men: [620277,826978,1134710,1851194,3134854,3523434,3861050,4421845,4600712,3170293,3563009,4034593,4605256,5021782,4746546],
+women: [3436,18778,37194,157410,134963,123424,206999,202730,134098,117171,210569,474892,837301,1077068,825610]
+},
+"Laundry / Dry Cleaning": {
+men: [303,1805,7018,16074,48646,40805,54781,95031,53970,143430,132711,141238,113516,161794,157827],
+women: [0,601,4030,39807,31145,73802,99415,187559,175984,307130,504340,416819,286070,318990,275642]
+},
+"Lawyer / Judge": {
+men: [24369,35027,44027,65815,98163,111097,121497,158729,168630,173840,211203,281466,481261,628376,699931],
+women: [0,100,0,0,402,1258,1110,2529,4735,5909,9565,17728,85744,213279,310186]
+},
+"Librarian": {
+men: [0,100,302,298,805,0,1313,2022,4836,6517,12953,24742,38669,50193,38871],
+women: [0,0,201,399,2813,0,12916,29830,31267,55246,103011,146646,209578,257080,188810]
+},
+"Library Attendant": {
+men: [0,0,303,0,402,0,303,0,7096,2879,10059,32563,35398,41915,52874],
+women: [0,0,302,0,1307,0,3028,1518,28746,12268,36750,136732,151852,149378,205979]
+},
+"Lithographer": {
+men: [808,600,1207,3493,8239,7054,11407,14663,28115,30018,28588,32552,22554,41137,0],
+women: [0,0,101,0,202,252,404,506,606,1051,1992,5615,6041,14706,0]
+},
+"Locomotive Engineer": {
+men: [505,2206,11876,16461,52563,106301,113014,114256,69930,78796,79088,66515,87426,55052,57211],
+women: [0,0,0,0,100,252,403,506,202,189,198,800,1480,1520,2324]
+},
+"Locomotive Fireman": {
+men: [0,1709,8755,10872,45919,71293,93545,64215,50255,60293,40442,13918,0,0,0],
+women: [0,0,0,0,0,252,0,0,0,55,0,100,0,0,0]
+},
+"Longshoreman": {
+men: [1314,2207,6423,10575,26726,70023,84361,63693,68299,71535,64546,57690,31467,20427,0],
+women: [0,0,0,0,101,252,505,0,449,1266,398,601,522,563,0]
+},
+"Loom Fixer": {
+men: [0,100,100,299,7435,12595,18167,18704,23235,32712,30085,25537,0,0,0],
+women: [0,0,0,0,101,0,0,505,0,1016,398,300,0,0,0]
+},
+"Lumberman": {
+men: [7986,16948,27120,50575,108406,144577,177099,147613,161252,202339,163385,108184,135143,137894,132973],
+women: [0,101,0,500,302,503,1109,1010,824,1710,1596,4105,4223,4953,4596]
+},
+"Machinist": {
+men: [23644,38635,51649,84404,263131,471039,818495,655648,503033,522212,572045,422413,555009,612731,546426],
+women: [0,403,0,99,1207,3273,6660,8597,4600,7161,11652,17829,32900,30893,33788]
+},
+"Mail Carrier": {
+men: [808,1907,2312,9171,26923,84376,97076,111722,123474,168099,230874,262603,261261,279346,269004],
+women: [0,0,0,0,302,504,908,506,2323,2689,6875,27746,41965,98128,137492]
+},
+"Manager / Owner": {
+men: [224003,365479,493343,629424,1277509,2160453,2171254,2864304,2930996,3890801,4254695,4393393,6783518,8899765,11270779],
+women: [1717,21688,18179,35500,88545,117876,150882,219900,347927,561469,862923,997653,2683545,4957672,7154236]
+},
+"Mason": {
+men: [51032,67738,88049,96139,149652,183629,125934,164810,147647,169569,236678,235386,279192,307451,264638],
+women: [0,200,301,400,504,252,504,505,1411,819,1096,3402,3882,5004,3111]
+},
+"Mathematician": {
+men: [0,0,0,0,100,0,0,505,0,1618,5874,6907,5543,4668,0],
+women: [0,0,0,0,0,0,0,0,0,669,3187,1902,1321,1952,0]
+},
+"Meat Cutter": {
+men: [19314,35620,42303,77217,107334,15115,125634,131935,146170,173515,200374,214449,281687,257308,269489],
+women: [0,202,101,399,603,0,1312,1010,987,3651,9559,17125,61267,76033,94222]
+},
+"Mechanic": {
+men: [29113,39053,29052,30222,44014,40551,119593,211814,429926,858091,1414733,1218050,1700996,1821648,2232570],
+women: [101,200,0,0,402,252,1312,2021,9456,12727,32085,36966,65886,78010,90507]
+},
+"Mechanic - Airplane": {
+men: [0,0,0,0,0,0,1007,9603,31726,73763,121473,157173,119283,180131,202371],
+women: [0,0,0,0,0,0,0,506,505,1239,3689,5511,4303,9653,13018]
+},
+"Mechanic - Automobile": {
+men: [0,0,0,0,0,0,197967,434751,418084,695009,727963,989179,1431954,1586352,1829579],
+women: [0,0,0,0,0,0,707,1517,1313,6934,3488,15418,18996,31606,36084]
+},
+"Mechanic - Office Machines": {
+men: [0,0,0,0,100,0,3027,6070,0,18600,30580,72912,82521,125662,276652],
+women: [0,0,0,0,0,0,0,0,0,163,100,2406,6744,16289,43897]
+},
+"Mechanic - Radio / Television": {
+men: [0,0,0,0,0,0,101,26789,0,78890,114485,144978,175139,182758,91074],
+women: [0,0,0,0,0,0,0,0,0,1856,3084,7808,10370,17777,6283]
+},
+"Mechanic - Railroad": {
+men: [101,0,1106,2296,9950,0,74476,50037,40559,52977,51803,73929,0,0,0],
+women: [0,0,0,0,0,0,101,0,0,0,99,702,0,0,0]
+},
+"Messenger": {
+men: [506,1704,10651,16762,70948,109325,93446,122857,84153,72703,84687,67815,89011,136265,193642],
+women: [0,0,302,998,5431,9823,10900,9605,3421,15403,19520,19726,32289,46974,57087]
+},
+"Metal Filer": {
+men: [303,2514,5418,7390,39098,39544,60232,84931,104474,156734,164297,263025,286902,146202,110367],
+women: [0,202,605,199,1706,3780,3024,3539,7582,6945,15144,56876,64627,28219,16030]
+},
+"Metal Heater": {
+men: [101,1404,1402,2196,5633,7305,14739,13143,17704,10872,10362,9310,0,0,0],
+women: [0,0,100,0,0,0,0,505,5079,1491,99,601,0,0,0]
+},
+"Metal Worker": {
+men: [11319,20465,30239,40487,64716,76316,155800,126889,135611,189923,229401,261258,295536,291631,297786],
+women: [0,100,101,299,101,0,605,505,3866,1796,4682,5616,11370,15090,12523]
+},
+"Midwife": {
+men: [0,0,0,0,0,252,101,0,0,109,600,200,0,0,0],
+women: [0,1404,1203,2592,5623,4787,4740,3539,0,1086,1391,1203,0,0,0]
+},
+"Military": {
+men: [8693,10522,29943,27521,133383,132487,249460,108692,235610,991684,1765471,2108307,1610699,1540672,1017572],
+women: [0,0,100,300,202,0,906,0,404,20661,34658,60304,173030,187266,171138]
+},
+"Miller": {
+men: [31743,34234,37084,43282,37099,21411,23918,13648,16251,12321,10764,8412,0,0,0],
+women: [101,100,100,398,200,252,403,0,101,0,100,100,0,0,0]
+},
+"Milliner": {
+men: [202,903,1009,1598,2914,6549,2117,3034,1616,3488,794,500,0,0,0],
+women: [506,25379,26737,38392,81502,123938,64274,33868,10493,14466,5575,4505,0,0,0]
+},
+"Millwright": {
+men: [9003,7722,8735,9183,10861,0,38246,53577,43715,59944,72993,91451,145908,106960,90310],
+women: [101,0,100,0,0,0,303,1011,0,265,0,901,5382,3918,2007]
+},
+"Miner": {
+men: [87431,147614,171550,274581,584858,914115,1026107,758812,795289,593828,416018,271064,350231,238962,200747],
+women: [303,803,302,100,2812,3275,4137,2022,4858,725,3088,10623,12927,9715,7109]
+},
+"Model Maker": {
+men: [1616,2912,3314,5789,15775,23428,29867,29314,34247,52235,47117,42759,35088,29407,16049],
+women: [0,101,0,0,301,252,202,0,505,2444,1596,2403,5804,7102,2772]
+},
+"Molder": {
+men: [9102,18769,29132,40395,95689,123690,131574,104648,78483,61505,62161,56384,36344,19382,0],
+women: [0,0,0,0,302,0,404,506,778,441,2786,11423,7024,3892,0]
+},
+"Motion Picture Projectionist": {
+men: [0,0,0,0,0,0,10089,18705,29822,25522,20021,20335,15972,10917,10296],
+women: [0,0,0,0,0,0,202,0,1313,445,399,1301,1861,2219,1720]
+},
+"Motorman": {
+men: [101,100,0,10756,33779,66248,67514,76336,52754,50163,27104,13617,0,0,0],
+women: [0,0,0,0,100,504,303,0,101,516,100,100,0,0,0]
+},
+"Musician / Music Teacher": {
+men: [3236,8025,9053,17949,40304,57938,50958,89981,84556,82343,92558,150233,288301,402586,413003],
+women: [101,4715,6638,16453,50346,84875,71438,76841,63824,91745,140663,213735,363906,587496,761844]
+},
+"Newsboy": {
+men: [505,1105,1909,3192,7438,28718,32389,32860,55754,99159,264781,250617,100156,87100,123854],
+women: [0,0,100,0,0,504,606,0,1515,3154,11756,17517,51773,59204,140034]
+},
+"Nurse": {
+men: [101,101,1105,2294,7541,22169,8785,4041,19999,17356,28988,90047,154691,241714,403441],
+women: [707,6629,16289,26836,100388,225705,256231,388747,436474,615880,1287387,1563833,2096615,2702420,3505260]
+},
+"Nutritionist": {
+men: [0,0,0,0,0,0,101,0,0,1180,1991,3205,7965,11261,9461],
+women: [0,0,0,0,0,0,1514,4552,0,22631,40932,52883,73865,99487,88039]
+},
+"Office Machine Operator": {
+men: [0,0,0,0,201,0,1917,6071,16510,26048,81701,159568,278817,450697,334259],
+women: [0,0,0,0,0,0,13621,38412,61555,129829,408461,612403,854621,1252448,891903]
+},
+"Oiler / Greaser": {
+men: [0,0,0,0,6630,15620,26540,29825,40008,62567,60558,56403,51225,28470,30515],
+women: [0,0,0,0,100,0,302,0,778,671,797,2306,2201,1252,2196]
+},
+"Operative": {
+men: [192143,247834,609233,989348,1052589,1753668,1963909,2144940,2999021,4057324,4986070,5939103,5807712,5338347,5837694],
+women: [1212,73186,182209,303660,492853,943342,1107472,1268895,2053061,2577284,5044007,6135206,5651553,4635239,4200004]
+},
+"Optician / Lens Grinder": {
+men: [202,401,503,1398,3920,0,11710,8087,13608,19545,17831,23534,29999,37323,20024],
+women: [0,0,0,0,504,0,907,505,863,1947,4679,8509,23697,49567,39007]
+},
+"Optometrist": {
+men: [0,0,0,0,0,0,3430,10106,11290,16568,17440,20031,24055,25867,24325],
+women: [0,0,0,0,0,0,0,506,1773,946,1197,902,2442,4742,9246]
+},
+"Osteopath": {
+men: [0,0,0,0,201,0,2825,4045,5657,6758,3784,0,0,0,0],
+women: [0,0,0,0,101,0,909,2527,1212,574,500,0,0,0,0]
+},
+"Painter": {
+men: [24058,55188,86449,130754,278009,336038,331975,554055,505402,570711,643596,631217,760594,885076,882211],
+women: [101,201,301,698,2913,2771,6659,14158,11859,31300,41041,65407,110802,128104,108402]
+},
+"Paperhanger": {
+men: [607,1907,2712,3990,21617,23172,18656,33868,31499,22586,13057,0,0,0,15223],
+women: [0,0,0,0,403,1007,707,505,3800,3055,2288,0,0,0,7125]
+},
+"Parking Attendant": {
+men: [0,0,0,0,0,0,3532,76845,244162,255490,434923,621579,438129,343931,290103],
+women: [0,0,0,0,0,0,202,505,11348,6263,10951,22439,47128,46028,53227]
+},
+"Pharmacist": {
+men: [5461,9836,16085,28406,54859,0,69519,89469,79447,84842,97311,107984,122992,129075,123677],
+women: [0,201,0,200,1003,0,2825,2023,5816,13857,10264,20235,41371,76550,107598]
+},
+"Photo Developer": {
+men: [0,0,0,100,603,0,2422,8590,15775,18452,26196,41276,48507,55700,43477],
+women: [0,0,100,200,1106,0,4341,6572,9844,15688,32268,47477,65144,67981,62574]
+},
+"Photographer": {
+men: [707,3815,6935,10667,21811,25946,23116,27300,34411,46122,50022,66716,81296,112297,116115],
+women: [0,100,303,698,2820,5792,4842,3034,3311,9922,10361,15632,32123,57529,70166]
+},
+"Physician / Surgeon": {
+men: [43256,58907,61635,86590,117403,147613,130056,139517,167176,186164,222442,269060,394999,494783,576125],
+women: [0,301,904,2592,5635,7555,5555,8593,8033,11600,16339,31353,65607,133057,211250]
+},
+"Piano / Organ Tuner": {
+men: [0,501,402,1398,4526,9065,6860,12135,10537,13802,5384,8118,0,0,0],
+women: [0,0,0,0,0,0,0,506,0,325,99,500,0,0,0]
+},
+"Pilot": {
+men: [0,0,0,0,101,0,806,6571,6947,16817,30676,51099,80769,117916,136359],
+women: [0,0,0,0,0,0,0,0,303,0,599,804,1341,4648,5919]
+},
+"Plasterer": {
+men: [9505,13749,19695,27532,39880,46607,38442,77840,59528,68312,63664,36556,32999,49512,54434],
+women: [0,200,100,0,201,0,101,0,909,1203,200,1201,880,1043,695]
+},
+"Plumber": {
+men: [1516,6216,12969,18655,90259,152913,216042,249220,205078,292481,371777,426834,560336,576342,636668],
+women: [0,0,101,0,202,756,604,505,1388,2210,1397,5604,8083,9252,11947]
+},
+"Policeman / Detective": {
+men: [2930,4117,12456,14858,41908,68769,92029,141547,150849,202046,274172,391239,504399,589960,817139],
+women: [0,100,101,0,201,0,1107,1516,1920,4611,11849,18734,32562,91240,144722]
+},
+"Porter": {
+men: [6064,11944,17889,21643,72538,87910,111610,159765,173740,173360,182380,29337,24222,40885,56206],
+women: [0,0,0,0,403,1008,1413,2529,3714,6489,3484,600,2120,4839,11117]
+},
+"Postmaster": {
+men: [1922,3108,3317,5488,14178,0,16751,18192,21643,22144,27385,30154,23556,27766,20279],
+women: [0,100,201,798,5831,0,13418,11622,16614,14591,21920,16728,18413,25369,27120]
+},
+"Power Station Operator": {
+men: [0,0,0,0,0,0,4036,7583,35641,22608,28090,23836,29157,39503,43979],
+women: [0,0,0,0,0,0,101,2022,1245,1045,2787,802,1441,2285,3787]
+},
+"Pressman": {
+men: [101,301,601,699,14669,25186,23918,34884,38795,56811,78705,147758,269303,324773,280610],
+women: [0,0,0,0,602,1008,706,506,773,1908,5886,19231,63388,79866,72897]
+},
+"Produce Grader": {
+men: [0,0,0,0,403,2519,5048,4549,22012,23753,10362,12425,0,0,0],
+women: [0,0,0,0,1509,2016,4032,3031,20208,28323,53084,56705,0,0,0]
+},
+"Professional - Misc": {
+men: [7076,1711,3814,3295,9149,11587,9086,31847,133278,98096,263832,907129,634581,1190777,2833825],
+women: [303,0,200,599,1909,10580,3129,2528,37527,19300,94244,764981,580750,1012193,2592152]
+},
+"Professor": {
+men: [1112,1002,1712,3190,5628,21667,17960,31851,53898,31980,66431,175361,337037,452502,707315],
+women: [0,400,0,0,805,4031,8881,14656,20493,17593,27397,109100,213694,329228,637686]
+},
+"Professor - Agriculture ": {
+men: [0,0,0,0,101,0,303,0,0,5005,3288,4806,3400,1167,0],
+women: [0,0,0,0,0,0,0,0,0,109,299,301,720,237,0]
+},
+"Professor - Biology": {
+men: [0,0,0,0,302,0,0,0,0,4834,6975,17827,7188,4388,0],
+women: [0,0,0,0,0,0,0,0,0,1407,2691,6407,3922,2447,0]
+},
+"Professor - Chemistry": {
+men: [0,0,0,99,0,0,404,0,0,5931,5785,14525,7186,4135,0],
+women: [0,0,0,0,0,0,0,0,0,1034,1394,2702,1943,1329,0]
+},
+"Professor - Economics": {
+men: [0,0,0,0,0,0,0,505,0,3419,3883,10217,4463,3274,0],
+women: [0,0,0,0,0,0,0,0,0,463,199,903,1262,1134,0]
+},
+"Professor - Engineering": {
+men: [0,0,0,0,0,0,705,0,0,8515,9866,16335,10848,7440,0],
+women: [0,0,0,0,0,0,0,0,0,0,299,1303,1541,1418,0]
+},
+"Professor - Geology": {
+men: [0,0,100,100,0,0,0,0,0,936,1795,0,0,0,0],
+women: [0,0,0,0,0,0,0,0,0,0,100,0,0,0,0]
+},
+"Professor - Mathematics": {
+men: [101,200,100,200,100,0,202,0,0,4048,8964,24749,15650,15592,0],
+women: [0,0,0,0,0,0,0,0,0,998,1693,8811,7664,10315,0]
+},
+"Professor - Medical": {
+men: [0,0,0,0,0,0,403,1012,0,2200,4982,13320,9945,7061,0],
+women: [0,0,0,0,0,0,101,0,0,246,1796,17730,22797,15130,0]
+},
+"Professor - Physics": {
+men: [0,0,0,0,100,0,202,0,0,2972,5282,14037,5609,3834,0],
+women: [0,0,0,0,0,0,0,0,0,1101,199,1000,440,503,0]
+},
+"Professor - Psychology": {
+men: [0,0,0,0,0,0,0,0,0,2316,2193,10322,3322,2555,0],
+women: [0,0,0,0,0,0,0,0,0,1497,1196,3308,2585,2702,0]
+},
+"Professor - Science": {
+men: [0,100,0,100,0,0,101,0,0,136,199,3906,2240,961,0],
+women: [0,0,0,0,0,0,0,0,0,0,100,201,641,665,0]
+},
+"Professor - Social Science ": {
+men: [0,202,202,0,101,0,505,1011,0,13381,17431,31253,10031,6137,0],
+women: [0,0,0,0,0,0,101,0,0,6210,11061,8218,5305,3183,0]
+},
+"Professor - Statistics": {
+men: [0,0,0,0,0,0,0,0,0,519,100,0,0,0,0],
+women: [0,0,0,0,0,0,0,0,0,0,100,0,0,0,0]
+},
+"Psychologist": {
+men: [0,0,0,0,0,0,0,0,0,1742,10065,16925,50235,83271,66504],
+women: [0,0,0,0,0,0,100,0,0,2509,5376,14422,50476,123250,119715]
+},
+"Public Officials": {
+men: [7585,10236,14974,28125,35977,103010,50743,54094,138820,109734,173633,252529,284687,435434,129379],
+women: [102,0,100,897,1605,12093,4844,3032,16572,21025,59279,84936,158596,600459,162534]
+},
+"Purchasing Agent": {
+men: [0,0,0,996,1006,0,15744,21742,34317,63795,99324,152374,207326,239191,141566],
+women: [0,0,0,100,402,0,807,2528,8463,6955,14743,28844,85914,170629,160663]
+},
+"Radio Operator": {
+men: [0,0,0,0,0,0,2825,5059,12231,16670,27301,51476,83564,70794,121044],
+women: [0,0,0,0,0,0,202,506,404,2611,5379,11417,47147,21810,24389]
+},
+"Railroad Brakeman": {
+men: [506,2410,12362,23342,71057,94464,121299,87963,75661,79785,71215,57785,91941,39506,11668],
+women: [0,0,0,0,100,252,302,506,458,485,199,600,1303,564,377]
+},
+"Railroad Conductor": {
+men: [404,5217,8237,18353,55275,60701,82636,80889,47656,55662,63262,53684,58455,45153,54613],
+women: [0,0,0,99,101,0,202,0,606,54,400,901,981,2878,3685]
+},
+"Railroad Switchman": {
+men: [101,202,1308,3191,22994,68008,68425,68251,46193,67040,65023,62820,10746,5871,0],
+women: [0,0,0,0,0,0,301,0,0,218,498,800,321,393,0]
+},
+"Real Estate Agent": {
+men: [405,2511,9342,13753,54886,125936,120301,164288,111205,134551,172155,208549,404125,446923,437118],
+women: [0,0,0,0,1408,3275,4338,9603,9954,24702,65960,119193,375987,499220,500595]
+},
+"Recreation Attendant": {
+men: [303,0,201,797,1305,0,7368,21230,58467,63049,93742,146544,177265,227691,343733],
+women: [0,0,0,0,0,0,201,506,9754,5241,16527,70335,149228,204770,339990]
+},
+"Religious Worker": {
+men: [0,1712,400,99,3717,9319,6861,9100,8879,15925,26016,17126,23979,49125,63275],
+women: [101,2014,7131,7088,26638,10328,26133,38417,23772,29036,42944,24832,36143,70844,108514]
+},
+"Retired": {
+men: [1112,10543,77092,109228,87522,0,143179,199186,0,0,0,0,0,0,0],
+women: [0,2711,11762,14252,8536,0,10593,21738,0,0,0,0,0,0,0]
+},
+"Road Machinery Operator": {
+men: [1415,0,0,698,803,0,10292,22751,0,113735,235174,394873,466269,477535,512160],
+women: [0,0,0,0,0,0,404,0,0,948,599,4905,7446,9309,12391]
+},
+"Roller": {
+men: [1010,1706,2312,2996,14363,16373,26233,41952,28821,33817,33573,19733,20678,13779,14228],
+women: [0,0,0,0,0,252,201,0,202,510,896,1403,2542,2172,5966]
+},
+"Roofer": {
+men: [101,1202,2809,4591,8648,14860,11707,30332,36595,56125,64048,73714,149440,236158,291409],
+women: [0,0,0,0,0,0,0,0,808,0,99,1002,1701,3950,4992]
+},
+"Sailor": {
+men: [69440,67827,65509,72121,50515,50632,52981,44992,44940,58129,48904,42272,42697,34208,31389],
+women: [101,301,201,299,503,252,404,0,505,986,698,1201,1321,1197,1895]
+},
+"Salesman": {
+men: [104351,166761,218916,362213,829630,1078646,1178007,1830029,1832034,2171684,2558950,3021401,3004021,3500491,4087696],
+women: [405,4616,12868,32418,201808,356928,504441,698141,847292,1345595,3203794,3508146,3179503,3386271,3846310]
+},
+"Sawyer": {
+men: [9799,13444,13364,9285,39788,46344,39246,41453,46802,98150,109190,114909,110477,95725,70658],
+women: [0,0,0,0,402,0,303,0,303,2415,3092,13721,17380,15024,11801]
+},
+"Scientist": {
+men: [101,101,0,0,101,0,303,1518,0,2012,2787,802,7405,13614,116374],
+women: [0,0,0,0,0,0,0,0,0,65,597,301,2142,6180,61293]
+},
+"Scientist - Agriculture": {
+men: [0,0,0,0,0,0,404,3032,0,5534,8576,12623,21680,28764,24723],
+women: [0,0,0,0,0,0,101,505,0,201,997,1305,6944,11230,8867]
+},
+"Scientist - Biology": {
+men: [0,100,100,199,202,0,1109,3036,0,6498,10164,22333,46475,56200,98754],
+women: [0,0,0,0,0,0,707,1517,0,2817,4885,13616,27184,42853,84371]
+},
+"Scientist - Geology": {
+men: [0,0,101,299,100,0,2014,1515,0,10546,20425,21138,43346,50659,70402],
+women: [0,0,0,0,0,0,101,0,0,435,1195,1500,6407,9337,23132]
+},
+"Scientist - Physics": {
+men: [0,0,0,0,0,0,202,1011,0,6923,13544,21536,31601,37195,29426],
+women: [0,0,0,0,0,0,0,0,0,636,499,1301,1800,5253,3888]
+},
+"Scientist - Social": {
+men: [0,0,0,0,302,0,302,505,0,2784,2489,10112,19772,28226,21044],
+women: [0,0,0,0,0,0,0,0,0,1187,1195,5808,17494,31972,22081]
+},
+"Secretary": {
+men: [0,0,202,1199,31973,48107,62172,92012,84828,89660,91039,166371,97205,125895,191588],
+women: [0,0,0,0,93152,261962,606354,980734,1100500,1574256,3861587,5795976,6002545,5743406,4829263]
+},
+"Security Guard": {
+men: [3134,5921,13271,22650,59778,80602,127651,150635,236592,261719,352263,403058,720590,1009311,1212189],
+women: [0,302,0,198,905,1007,1412,1012,3536,5407,16836,23846,124913,217882,376663]
+},
+"Service Attendant": {
+men: [0,100,200,2091,2613,15874,5246,5054,17126,19180,29596,57294,137592,172544,211791],
+women: [0,601,6331,8885,5227,9826,7167,14156,25520,37959,95145,327779,1001088,1490132,1948587]
+},
+"Service Worker": {
+men: [2324,401,2512,13370,15770,17630,61340,95556,161281,254527,337750,1009079,726901,879740,627109],
+women: [0,2005,6030,3991,37766,1260,110919,162783,195557,339275,782462,1739908,952071,1031602,446730]
+},
+"Serviceman": {
+men: [0,0,101,1197,17088,24432,57005,103125,114467,213453,283614,407903,412263,372866,536422],
+women: [0,0,0,0,101,504,909,505,1871,5900,6880,15325,39367,39196,52984]
+},
+"Sheriff / Bailiff": {
+men: [1718,2913,3321,7084,8546,10833,9679,18197,14692,18768,28402,37065,60663,108736,8228],
+women: [0,0,0,0,0,0,201,0,404,1147,1594,2502,9769,25739,3574]
+},
+"Ship Officers": {
+men: [7781,15656,15980,17955,26327,24683,43997,36906,34287,45197,45128,28364,48159,49256,43594],
+women: [0,0,0,0,302,0,202,0,303,5697,199,1003,1322,1940,1504]
+},
+"Shipping and Receiving": {
+men: [303,100,1204,7481,37391,76329,122796,172885,230332,287314,296519,409220,593776,678335,584615],
+women: [0,0,0,0,1103,1512,5047,2022,17449,18829,39555,94357,187654,294791,254624]
+},
+"Shoemaker": {
+men: [139284,154840,111359,107911,103413,65241,69127,64211,68516,56070,40653,85438,120915,145321,282385],
+women: [101,804,302,199,5427,252,3331,4046,764,1432,1492,12019,15429,14360,14101]
+},
+"Social Worker": {
+men: [0,0,0,0,1510,504,9488,12641,29975,37483,90078,147737,204654,263039,404846],
+women: [0,0,0,0,803,0,10699,13648,46434,65279,155991,263309,409918,587375,1023517]
+},
+"Sports Instructor / Official": {
+men: [0,0,1006,0,6727,0,8069,20225,21582,33262,57567,65403,59219,84565,173041],
+women: [0,0,0,0,602,0,1614,0,5037,11964,41355,43071,23814,34696,90745]
+},
+"Stationary Engineer": {
+men: [10304,21783,27547,62034,156714,225712,206553,208276,201613,228473,314408,201808,182504,243935,213589],
+women: [101,101,0,100,202,755,404,2023,1379,1732,2889,3004,6103,12680,9471]
+},
+"Statistician / Actuary": {
+men: [0,0,0,0,202,0,2018,3537,0,15850,15446,17925,25151,30736,33042],
+women: [0,0,0,0,0,0,605,2528,0,8274,10469,17530,20670,25831,23370]
+},
+"Stock Broker": {
+men: [101,0,0,597,100,16374,16956,41456,21300,11770,33367,97647,115757,231013,467290],
+women: [0,0,0,0,0,0,403,1517,3484,2603,2392,12318,27833,94937,235499]
+},
+"Stone Cutter": {
+men: [11323,15541,19486,29221,43720,32995,21792,21734,20082,11725,6378,7016,0,0,0],
+women: [0,0,0,0,100,0,202,0,1978,219,399,801,0,0,0]
+},
+"Street Car Conductor": {
+men: [0,300,2813,1698,21815,61212,59636,39428,17030,12833,5974,12222,0,0,0],
+women: [0,0,0,0,0,0,202,0,101,0,99,301,0,0,0]
+},
+"Surveyor": {
+men: [1314,2606,2713,3789,5323,0,9684,14157,18349,24636,51674,70528,91629,106192,118867],
+women: [0,0,0,100,0,0,0,0,1098,2892,5078,5608,9826,14333,17314]
+},
+"Tailor": {
+men: [55694,64025,57391,79299,136114,156426,175990,165822,102822,83604,42928,56304,43507,36681,0],
+women: [1517,38441,31066,43974,49576,44844,37442,29321,16548,24368,12553,37364,34396,37225,0]
+},
+"Taxi Cab Driver / Chauffeur": {
+men: [1212,8330,13171,6883,54585,81605,163471,245170,0,210517,182830,183626,202071,221055,294801],
+women: [0,0,0,99,200,252,1110,2529,0,2306,7277,13222,29521,30311,48088]
+},
+"Teacher": {
+men: [30418,45663,44313,74988,111956,122676,120384,189588,273015,296407,510329,950391,1271710,1343051,1402235],
+women: [2728,68141,89459,155996,328340,501770,619195,765334,808035,864419,1680774,2725497,3208473,3902382,4460616]
+},
+"Teamster": {
+men: [0,0,0,0,0,0,288481,106152,29961,25025,25494,11323,0,0,0],
+women: [0,0,0,0,0,0,1616,0,404,511,100,801,0,0,0]
+},
+"Technician": {
+men: [0,0,101,0,703,0,1212,2023,7420,27935,96121,160324,248394,365240,431203],
+women: [0,0,0,0,0,0,100,0,1201,3687,6772,15023,37006,65100,117728]
+},
+"Technician - Medical / Dental": {
+men: [0,0,0,0,0,0,3530,10614,0,36735,59266,107186,197649,296690,460297],
+women: [0,0,0,0,0,0,1311,3539,0,46337,137864,255735,487792,833104,1064460]
+},
+"Technician - Testing": {
+men: [0,0,101,0,803,0,4946,9603,43733,63429,235487,313412,679611,806222,242234],
+women: [0,0,0,0,603,0,2018,5054,21121,21443,66442,89253,282257,358804,148853]
+},
+"Telegraph Messenger": {
+men: [101,0,601,1497,4122,6801,8784,12129,15456,8459,5382,2505,0,0,0],
+women: [0,0,0,0,0,504,303,1516,179,499,896,301,0,0,0]
+},
+"Telegraph Operator": {
+men: [505,1403,6639,16164,42897,61714,63275,55610,43794,29863,18035,13520,5545,0,0],
+women: [0,0,502,999,5528,6803,15944,12130,11584,6225,9559,5107,3804,0,0]
+},
+"Telephone Operator": {
+men: [0,0,0,1097,6126,9573,11407,13651,13047,28994,17446,30156,79779,36678,32532],
+women: [0,0,0,100,17985,86153,179937,229503,191238,360778,652281,635165,389159,269331,189007]
+},
+"Temperer": {
+men: [0,0,202,398,1105,1007,3735,3033,13475,17479,21626,22225,27475,20928,14405],
+women: [0,0,0,100,0,252,0,0,391,167,699,1003,1881,1310,1677]
+},
+"Textile Spinner": {
+men: [4955,6524,3412,1495,29336,26445,31896,32354,0,19327,13945,0,0,0,0],
+women: [606,5118,1006,1292,32956,46599,55605,65222,0,63813,69634,0,0,0,0]
+},
+"Therapist": {
+men: [0,401,805,700,2011,2517,3127,6069,12063,11852,17043,36159,64399,89015,127400],
+women: [0,0,100,0,1706,5036,3231,4046,9081,13497,30066,70219,168127,284654,423125]
+},
+"Ticket Agent": {
+men: [1314,4718,9655,20852,36377,28718,51963,55611,41637,53053,67749,68007,47751,88051,104583],
+women: [0,0,100,399,404,1259,1716,506,2121,7253,25404,51088,66826,221236,307394]
+},
+"Tool Maker": {
+men: [505,301,804,1097,7140,11840,61051,101109,96279,161693,205485,214270,208764,164984,138638],
+women: [0,0,0,0,0,252,303,0,101,401,2486,5308,4680,4571,4739]
+},
+"Truck / Tractor Driver": {
+men: [31753,63194,118214,157797,435202,430738,296383,752249,1314002,1406612,1787785,1582606,2084404,3150279,3681627],
+women: [202,200,100,199,1704,2268,2120,2023,9254,5306,11548,28240,60371,233616,255543]
+},
+"Typesetter": {
+men: [16068,21878,31352,56060,104848,119412,138562,200197,170993,172748,181010,150058,38944,27338,51064],
+women: [101,100,1108,2193,12370,12090,11095,13145,12657,11801,25304,38163,47775,59642,48722]
+},
+"Union Official": {
+men: [0,0,0,897,2111,4535,8777,8593,20236,22634,31957,49489,0,0,0],
+women: [0,0,0,200,504,1511,1615,0,2802,2839,5282,11723,0,0,0]
+},
+"Upholsterer": {
+men: [2425,2406,3415,8976,20400,17134,21188,39935,39026,62230,58277,66008,62601,65890,57883],
+women: [0,202,201,500,806,1511,808,4548,2222,4590,9070,16631,19717,21674,17947]
+},
+"Usher": {
+men: [0,100,0,0,403,0,2317,7078,17957,17200,15142,20237,23617,30728,58147],
+women: [0,0,0,0,0,0,2925,6069,4500,9367,10360,8512,13330,15375,26527]
+},
+"Veterinarian": {
+men: [0,101,905,2894,6837,12344,14934,12131,11029,15063,17730,17025,32252,38495,39184],
+women: [0,0,0,0,0,0,202,0,606,2701,598,1401,5206,14634,25883]
+},
+"Waiter / Waitress": {
+men: [7184,7926,18090,27544,63437,119657,109513,154184,205614,129961,151423,178989,227767,356754,595509],
+women: [202,705,7343,7381,43520,92691,104857,185034,412143,610478,1661504,1932298,2063563,1690717,1843769]
+},
+"Weaver": {
+men: [15970,14346,11651,16657,97151,111082,102615,96063,0,64570,46228,28449,31842,24244,17800],
+women: [909,27189,9755,11071,96654,99753,87387,62189,0,43353,42041,41582,61698,49668,32015]
+},
+"Welder": {
+men: [101,200,300,198,904,0,25637,61167,134709,281806,399733,576267,821710,700666,727405],
+women: [0,0,0,0,0,0,606,1011,2323,10209,28594,48083,57920,36224,63197]
+}
+};

+ 154 - 0
ext/thirdparty/js/protovis/examples/jquery-1.4.2.min.js

@@ -0,0 +1,154 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
+e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
+j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
+"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
+true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
+c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
+L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
+"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
+d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
+a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
+!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
+true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
+i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
+" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
+this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
+e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
+null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
+"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
+a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
+isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
+{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
+if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
+!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
+toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
+u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
+function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
+if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
+for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
+1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
+relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
+l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
+h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
+m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
+!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
+h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
+gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
+c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
+a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
+this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
+u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
+1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
+"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
+serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
+function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
+global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
+e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
+"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
+false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
+false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
+c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
+d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
+g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
+1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
+"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
+if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
+this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
+"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
+animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
+j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
+this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
+"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
+c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
+this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
+this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
+e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
+c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
+function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
+this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
+k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
+f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
+c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
+d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
+f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
+"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
+e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);

+ 0 - 51
ext/thirdparty/js/protovis/examples/line.html

@@ -1,51 +0,0 @@
-<html>
-  <head>
-    <title>Line Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(0, 10, .1).map(function(x) {
-        return {x: x, y: Math.sin(x) + Math.random() * .5 + 2};
-      }),
-    w = 400,
-    h = 200,
-    x = pv.Scale.linear(data, function(d) d.x).range(0, w),
-    y = pv.Scale.linear(0, 4).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5);
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .visible(function() !(this.index % 2))
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .visible(function(d) d > 0)
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.add(pv.Line)
-    .data(data)
-    .left(function(d) x(d.x))
-    .bottom(function(d) y(d.y))
-    .lineWidth(3);
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/line.png


+ 83 - 0
ext/thirdparty/js/protovis/examples/nba/nba.html

@@ -0,0 +1,83 @@
+<html>
+  <head>
+    <title>NBA per game performance of top 50 scorers</title>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="nba.js"></script>
+    <style type="text/css">
+
+body {
+  font: 12px/134% Helvetica Neue, sans-serif;
+  width: 580px;
+}
+
+h1 {
+  font-size: medium;
+  padding-bottom: 10px;
+  border-bottom: solid 1px #bbb;
+}
+
+    </style>
+  </head>
+  <body>
+  <h1>NBA per game performance of top 50 scorers</h1>
+  2008-2009 season<p>
+    <script type="text/javascript+protovis">
+
+/* Convert from tabular format to array of objects. */
+var cols = nba.shift();
+nba = nba.map(function(d) pv.dict(cols, function() d[this.index]));
+cols.shift();
+
+/* The color scale ranges 3 standard deviations in each direction. */
+var x = pv.dict(cols, function(f) pv.mean(nba, function(d) d[f])),
+    s = pv.dict(cols, function(f) pv.deviation(nba, function(d) d[f])),
+ fill = pv.dict(cols, function(f) pv.Scale.linear()
+        .domain(-3 * s[f] + x[f], 3 * s[f] + x[f])
+        .range("white", "steelblue"));
+
+/* The cell dimensions. */
+var w = 24, h = 13;
+
+var vis = new pv.Panel()
+    .width(cols.length * w)
+    .height(nba.length * h)
+    .top(30.5)
+    .left(100.5)
+    .right(.5)
+    .bottom(.5);
+
+vis.add(pv.Panel)
+    .data(cols)
+    .left(function() this.index * w)
+    .width(w)
+  .add(pv.Panel)
+    .data(nba)
+    .top(function() this.index * h)
+    .height(h)
+    .strokeStyle("white")
+    .lineWidth(1)
+    .fillStyle(function(d, f) fill[f](d[f]))
+    .title(function(d, f) d.Name + "'s " + f + ": " + d[f]);
+
+vis.add(pv.Label)
+    .data(cols)
+    .left(function() this.index * w + w / 2)
+    .textAngle(-Math.PI / 2)
+    .textBaseline("middle");
+
+vis.add(pv.Label)
+    .data(nba)
+    .top(function() this.index * h + h / 2)
+    .textAlign("right")
+    .textBaseline("middle")
+    .text(function(d) d.Name);
+
+vis.render();
+
+    </script>
+    <div style="text-align:right;">
+      Source: <a href="http://flowingdata.com/2010/01/21/how-to-make-a-heatmap-a-quick-and-easy-solution/">FlowingData</a><br>
+      Implementation: <a href="http://protovis.org">Protovis</a>
+    </div>
+  </body>
+</html>

+ 53 - 0
ext/thirdparty/js/protovis/examples/nba/nba.js

@@ -0,0 +1,53 @@
+var nba = [
+["Name","G","MIN","PTS","FGM","FGA","FGP","FTM","FTA","FTP","3PM","3PA","3PP","ORB","DRB","TRB","AST","STL","BLK","TO","PF"],
+["Dwyane Wade",79,38.6,30.2,10.8,22,0.491,7.5,9.8,0.765,1.1,3.5,0.317,1.1,3.9,5,7.5,2.2,1.3,3.4,2.3],
+["LeBron James",81,37.7,28.4,9.7,19.9,0.489,7.3,9.4,0.78,1.6,4.7,0.344,1.3,6.3,7.6,7.2,1.7,1.1,3,1.7],
+["Kobe Bryant",82,36.2,26.8,9.8,20.9,0.467,5.9,6.9,0.856,1.4,4.1,0.351,1.1,4.1,5.2,4.9,1.5,0.5,2.6,2.3],
+["Dirk Nowitzki",81,37.7,25.9,9.6,20,0.479,6,6.7,0.89,0.8,2.1,0.359,1.1,7.3,8.4,2.4,0.8,0.8,1.9,2.2],
+["Danny Granger",67,36.2,25.8,8.5,19.1,0.447,6,6.9,0.878,2.7,6.7,0.404,0.7,4.4,5.1,2.7,1,1.4,2.5,3.1],
+["Kevin Durant",74,39,25.3,8.9,18.8,0.476,6.1,7.1,0.863,1.3,3.1,0.422,1,5.5,6.5,2.8,1.3,0.7,3,1.8],
+["Kevin Martin",51,38.2,24.6,6.7,15.9,0.42,9,10.3,0.867,2.3,5.4,0.415,0.6,3,3.6,2.7,1.2,0.2,2.9,2.3],
+["Al Jefferson",50,36.6,23.1,9.7,19.5,0.497,3.7,5,0.738,0,0.1,0,3.4,7.5,11,1.6,0.8,1.7,1.8,2.8],
+["Chris Paul",78,38.5,22.8,8.1,16.1,0.503,5.8,6.7,0.868,0.8,2.3,0.364,0.9,4.7,5.5,11,2.8,0.1,3,2.7],
+["Carmelo Anthony",66,34.5,22.8,8.1,18.3,0.443,5.6,7.1,0.793,1,2.6,0.371,1.6,5.2,6.8,3.4,1.1,0.4,3,3],
+["Chris Bosh",77,38.1,22.7,8,16.4,0.487,6.5,8,0.817,0.2,0.6,0.245,2.8,7.2,10,2.5,0.9,1,2.3,2.5],
+["Brandon Roy",78,37.2,22.6,8.1,16.9,0.48,5.3,6.5,0.824,1.1,2.8,0.377,1.3,3.4,4.7,5.1,1.1,0.3,1.9,1.6],
+["Antawn Jamison",81,38.2,22.2,8.3,17.8,0.468,4.2,5.6,0.754,1.4,3.9,0.351,2.4,6.5,8.9,1.9,1.2,0.3,1.5,2.7],
+["Tony Parker",72,34.1,22,8.9,17.5,0.506,3.9,5,0.782,0.3,0.9,0.292,0.4,2.7,3.1,6.9,0.9,0.1,2.6,1.5],
+["Amare Stoudemire",53,36.8,21.4,7.6,14.1,0.539,6.1,7.3,0.835,0.1,0.1,0.429,2.2,5.9,8.1,2,0.9,1.1,2.8,3.1],
+["Joe Johnson",79,39.5,21.4,7.8,18,0.437,3.8,4.6,0.826,1.9,5.2,0.36,0.8,3.6,4.4,5.8,1.1,0.2,2.5,2.2],
+["Devin Harris",69,36.1,21.3,6.6,15.1,0.438,7.2,8.8,0.82,0.9,3.2,0.291,0.4,2.9,3.3,6.9,1.7,0.2,3.1,2.4],
+["Michael Redd",33,36.4,21.2,7.5,16.6,0.455,4,4.9,0.814,2.1,5.8,0.366,0.7,2.5,3.2,2.7,1.1,0.1,1.6,1.4],
+["David West",76,39.3,21,8,17,0.472,4.8,5.5,0.884,0.1,0.3,0.24,2.1,6.4,8.5,2.3,0.6,0.9,2.1,2.7],
+["Zachary Randolph",50,35.1,20.8,8.3,17.5,0.475,3.6,4.9,0.734,0.6,1.9,0.33,3.1,6.9,10.1,2.1,0.9,0.3,2.3,2.7],
+["Caron Butler",67,38.6,20.8,7.3,16.2,0.453,5.1,6,0.858,1,3.1,0.31,1.8,4.4,6.2,4.3,1.6,0.3,3.1,2.5],
+["Vince Carter",80,36.8,20.8,7.4,16.8,0.437,4.2,5.1,0.817,1.9,4.9,0.385,0.9,4.2,5.1,4.7,1,0.5,2.1,2.9],
+["Stephen Jackson",59,39.7,20.7,7,16.9,0.414,5,6,0.826,1.7,5.2,0.338,1.2,3.9,5.1,6.5,1.5,0.5,3.9,2.6],
+["Ben Gordon",82,36.6,20.7,7.3,16,0.455,4,4.7,0.864,2.1,5.1,0.41,0.6,2.8,3.5,3.4,0.9,0.3,2.4,2.2],
+["Dwight Howard",79,35.7,20.6,7.1,12.4,0.572,6.4,10.7,0.594,0,0,0,4.3,9.6,13.8,1.4,1,2.9,3,3.4],
+["Paul Pierce",81,37.4,20.5,6.7,14.6,0.457,5.7,6.8,0.83,1.5,3.8,0.391,0.7,5,5.6,3.6,1,0.3,2.8,2.7],
+["Al Harrington",73,34.9,20.1,7.3,16.6,0.439,3.2,4,0.793,2.3,6.4,0.364,1.4,4.9,6.2,1.4,1.2,0.3,2.2,3.1],
+["Jamal Crawford",65,38.1,19.7,6.4,15.7,0.41,4.6,5.3,0.872,2.2,6.1,0.36,0.4,2.6,3,4.4,0.9,0.2,2.3,1.4],
+["Yao Ming",77,33.6,19.7,7.4,13.4,0.548,4.9,5.7,0.866,0,0,1,2.6,7.2,9.9,1.8,0.4,1.9,3,3.3],
+["Richard Jefferson",82,35.9,19.6,6.5,14.9,0.439,5.1,6.3,0.805,1.4,3.6,0.397,0.7,3.9,4.6,2.4,0.8,0.2,2,3.1],
+["Jason Terry",74,33.6,19.6,7.3,15.8,0.463,2.7,3,0.88,2.3,6.2,0.366,0.5,1.9,2.4,3.4,1.3,0.3,1.6,1.9],
+["Deron Williams",68,36.9,19.4,6.8,14.5,0.471,4.8,5.6,0.849,1,3.3,0.31,0.4,2.5,2.9,10.7,1.1,0.3,3.4,2],
+["Tim Duncan",75,33.7,19.3,7.4,14.8,0.504,4.5,6.4,0.692,0,0,0,2.7,8,10.7,3.5,0.5,1.7,2.2,2.3],
+["Monta Ellis",25,35.6,19,7.8,17.2,0.451,3.1,3.8,0.83,0.3,1,0.308,0.6,3.8,4.3,3.7,1.6,0.3,2.7,2.7],
+["Rudy Gay",79,37.3,18.9,7.2,16,0.453,3.3,4.4,0.767,1.1,3.1,0.351,1.4,4.2,5.5,1.7,1.2,0.7,2.6,2.8],
+["Pau Gasol",81,37.1,18.9,7.3,12.9,0.567,4.2,5.4,0.781,0,0,0.5,3.2,6.4,9.6,3.5,0.6,1,1.9,2.1],
+["Andre Iguodala",82,39.8,18.8,6.6,14,0.473,4.6,6.4,0.724,1,3.2,0.307,1.1,4.6,5.7,5.3,1.6,0.4,2.7,1.9],
+["Corey Maggette",51,31.1,18.6,5.7,12.4,0.461,6.7,8.1,0.824,0.5,1.9,0.253,1,4.6,5.5,1.8,0.9,0.2,2.4,3.8],
+["O.J. Mayo",82,38,18.5,6.9,15.6,0.438,3,3.4,0.879,1.8,4.6,0.384,0.7,3.1,3.8,3.2,1.1,0.2,2.8,2.5],
+["John Salmons",79,37.5,18.3,6.5,13.8,0.472,3.6,4.4,0.83,1.6,3.8,0.417,0.7,3.5,4.2,3.2,1.1,0.3,2.1,2.3],
+["Richard Hamilton",67,34,18.3,7,15.6,0.447,3.3,3.9,0.848,1,2.8,0.368,0.7,2.4,3.1,4.4,0.6,0.1,2,2.6],
+["Ray Allen",79,36.3,18.2,6.3,13.2,0.48,3,3.2,0.952,2.5,6.2,0.409,0.8,2.7,3.5,2.8,0.9,0.2,1.7,2],
+["LaMarcus Aldridge",81,37.1,18.1,7.4,15.3,0.484,3.2,4.1,0.781,0.1,0.3,0.25,2.9,4.6,7.5,1.9,1,1,1.5,2.6],
+["Josh Howard",52,31.9,18,6.8,15.1,0.451,3.3,4.2,0.782,1.1,3.2,0.345,1.1,3.9,5.1,1.6,1.1,0.6,1.7,2.6],
+["Maurice Williams",81,35,17.8,6.5,13.9,0.467,2.6,2.8,0.912,2.3,5.2,0.436,0.6,2.9,3.4,4.1,0.9,0.1,2.2,2.7],
+["Shaquille O'neal",75,30.1,17.8,6.8,11.2,0.609,4.1,6.9,0.595,0,0,0,2.5,5.9,8.4,1.7,0.7,1.4,2.2,3.4],
+["Rashard Lewis",79,36.2,17.7,6.1,13.8,0.439,2.8,3.4,0.836,2.8,7,0.397,1.2,4.6,5.7,2.6,1,0.6,2,2.5],
+["Chauncey Billups",79,35.3,17.7,5.2,12.4,0.418,5.3,5.8,0.913,2.1,5,0.408,0.4,2.6,3,6.4,1.2,0.2,2.2,2],
+["Allen Iverson",57,36.7,17.5,6.1,14.6,0.417,4.8,6.1,0.781,0.5,1.7,0.283,0.5,2.5,3,5,1.5,0.1,2.6,1.5],
+["Nate Robinson",74,29.9,17.2,6.1,13.9,0.437,3.4,4,0.841,1.7,5.2,0.325,1.3,2.6,3.9,4.1,1.3,0.1,1.9,2.8]
+];

+ 82 - 0
ext/thirdparty/js/protovis/examples/nba/nba2.html

@@ -0,0 +1,82 @@
+<html>
+  <head>
+    <title>NBA per game performance of top 50 scorers</title>
+    <script type="text/javascript" src="../../protovis-r3.2.js"></script>
+    <script type="text/javascript" src="nba.js"></script>
+    <style type="text/css">
+
+body {
+  font: 12px/134% Helvetica Neue, sans-serif;
+  width: 580px;
+}
+
+h1 {
+  font-size: medium;
+  padding-bottom: 10px;
+  border-bottom: solid 1px #bbb;
+}
+
+    </style>
+  </head>
+  <body>
+  <h1>NBA per game performance of top 50 scorers</h1>
+  2008-2009 season<p>
+    <script type="text/javascript+protovis">
+
+/* Convert from tabular format to array of objects. */
+var cols = nba.shift();
+nba = nba.map(function(d) pv.dict(cols, function() d[this.index]));
+cols.shift();
+
+/* The color scale uses noniles per dimension. */
+var fill = pv.dict(cols, function(f) pv.Scale.quantile()
+    .quantiles(9)
+    .domain(nba.map(function(d) d[f]))
+    .range("#dee", "steelblue"));
+
+/* The cell dimensions. */
+var w = 24, h = 13;
+
+var vis = new pv.Panel()
+    .width(cols.length * w)
+    .height(nba.length * h)
+    .top(30.5)
+    .left(100.5)
+    .right(.5)
+    .bottom(.5);
+
+vis.add(pv.Panel)
+    .data(cols)
+    .left(function() this.index * w)
+    .width(w)
+  .add(pv.Panel)
+    .data(nba)
+    .top(function() this.index * h)
+    .height(h)
+    .strokeStyle("white")
+    .lineWidth(1)
+    .fillStyle(function(d, f) fill[f](d[f]))
+    .title(function(d, f) d.Name + "'s " + f + ": " + d[f]);
+
+vis.add(pv.Label)
+    .data(cols)
+    .left(function() this.index * w + w / 2)
+    .textAngle(-Math.PI / 2)
+    .textBaseline("middle");
+
+vis.add(pv.Label)
+    .data(nba)
+    .top(function() this.index * h + h / 2)
+    .textAlign("right")
+    .textBaseline("middle")
+    .text(function(d) d.Name);
+
+vis.render();
+
+    </script>
+    <div style="text-align:right;">
+      Source: <a href="http://flowingdata.com/2010/01/21/how-to-make-a-heatmap-a-quick-and-easy-solution/">FlowingData</a><br>
+      Implementation: <a href="http://protovis.org">Protovis</a>
+    </div>
+  </body>
+</html>

+ 0 - 39
ext/thirdparty/js/protovis/examples/pie.html

@@ -1,39 +0,0 @@
-<html>
-  <head>
-    <title>Pie</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(10).map(Math.random).sort(pv.reverseOrder),
-    w = 400,
-    h = 400,
-    r = w / 2,
-    a = pv.Scale.linear(0, pv.sum(data)).range(0, 2 * Math.PI);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h);
-
-vis.add(pv.Wedge)
-    .data(data)
-    .bottom(w / 2)
-    .left(w / 2)
-    .outerRadius(r)
-    .angle(a)
-    .title(function(d) d)
-  .add(pv.Wedge) // invisible wedge to offset label
-    .visible(function(d) d > .15)
-    .innerRadius(2 * r / 3)
-    .outerRadius(r)
-    .fillStyle(null)
-  .anchor("center").add(pv.Label)
-    .textAngle(0)
-    .text(function(d) d.toFixed(2));
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/pie.png


+ 184 - 0
ext/thirdparty/js/protovis/examples/sankey/gdp2009.js

@@ -0,0 +1,184 @@
+var gdp2009 = [
+    {name:"United States", gdp:14256275},
+    {name:"Japan", gdp:5068059},
+    {name:"China", gdp:4908982},
+    {name:"Germany", gdp:3352742},
+    {name:"France", gdp:2675951},
+    {name:"United Kingdom", gdp:2183607},
+    {name:"Italy", gdp:2118264},
+    {name:"Brazil", gdp:1574039},
+    {name:"Spain", gdp:1464040},
+    {name:"Canada", gdp:1336427},
+    {name:"India", gdp:1235975},
+    {name:"Russia", gdp:1229227},
+    {name:"Australia", gdp:997201},
+    {name:"Mexico", gdp:874903},
+    {name:"South Korea", gdp:832512},
+    {name:"Netherlands", gdp:794777},
+    {name:"Turkey", gdp:615329},
+    {name:"Indonesia", gdp:539377},
+    {name:"Switzerland", gdp:494622},
+    {name:"Belgium", gdp:470400},
+    {name:"Poland", gdp:430197},
+    {name:"Sweden", gdp:405440},
+    {name:"Norway", gdp:382983},
+    {name:"Austria", gdp:381880},
+    {name:"Republic of China (Taiwan)", gdp:378969},
+    {name:"Saudi Arabia", gdp:369671},
+    {name:"Venezuela", gdp:337295},
+    {name:"Greece", gdp:330780},
+    {name:"Iran", gdp:330461},
+    {name:"Argentina", gdp:310065},
+    {name:"Denmark", gdp:309252},
+    {name:"South Africa", gdp:287219},
+    {name:"Thailand", gdp:263889},
+    {name:"Finland", gdp:238128},
+    {name:"United Arab Emirates", gdp:229971},
+    {name:"Colombia", gdp:228836},
+    {name:"Portugal", gdp:227855},
+    {name:"Ireland", gdp:227781},
+    {name:"Hong Kong", gdp:210731},
+    {name:"Czech Republic", gdp:194828},
+    {name:"Israel", gdp:194825},
+    {name:"Malaysia", gdp:191463},
+    {name:"Egypt", gdp:187954},
+    {name:"Singapore", gdp:177132},
+    {name:"Nigeria", gdp:173428},
+    {name:"Pakistan", gdp:166515},
+    {name:"Chile", gdp:161781},
+    {name:"Romania", gdp:161521},
+    {name:"Philippines", gdp:160991},
+    {name:"Algeria", gdp:140848},
+    {name:"Hungary", gdp:129407},
+    {name:"Peru", gdp:126766},
+    {name:"New Zealand", gdp:117795},
+    {name:"Ukraine", gdp:116191},
+    {name:"Kuwait", gdp:111309},
+    {name:"Kazakhstan", gdp:109273},
+    {name:"Bangladesh", gdp:94507},
+    {name:"Vietnam", gdp:92439},
+    {name:"Morocco", gdp:90815},
+    {name:"Slovakia", gdp:88208},
+    {name:"Qatar", gdp:83910},
+    {name:"Angola", gdp:68755},
+    {name:"Iraq", gdp:65838},
+    {name:"Croatia", gdp:63188},
+    {name:"Libya", gdp:60351},
+    {name:"Ecuador", gdp:57303},
+    {name:"Sudan", gdp:54677},
+    {name:"Oman", gdp:53395},
+    {name:"Syria", gdp:52524},
+    {name:"Luxembourg", gdp:51736},
+    {name:"Slovenia", gdp:49217},
+    {name:"Belarus", gdp:48973},
+    {name:"Bulgaria", gdp:47102},
+    {name:"Dominican Republic", gdp:46743},
+    {name:"Azerbaijan", gdp:43111},
+    {name:"Serbia", gdp:42879},
+    {name:"Sri Lanka", gdp:41323},
+    {name:"Tunisia", gdp:40168},
+    {name:"Guatemala", gdp:37302},
+    {name:"Lithuania", gdp:37254},
+    {name:"Lebanon", gdp:33585},
+    {name:"Uzbekistan", gdp:32816},
+    {name:"Kenya", gdp:32724},
+    {name:"Ethiopia", gdp:32319},
+    {name:"Uruguay", gdp:31528},
+    {name:"Costa Rica", gdp:29318},
+    {name:"Burma", gdp:27553},
+    {name:"Latvia", gdp:26247},
+    {name:"Yemen", gdp:25131},
+    {name:"Panama", gdp:24711},
+    {name:"Cyprus", gdp:23603},
+    {name:"Jordan", gdp:22929},
+    {name:"Côte d'Ivoire", gdp:22497},
+    {name:"Tanzania", gdp:22318},
+    {name:"Cameroon", gdp:22223},
+    {name:"El Salvador", gdp:21100},
+    {name:"Trinidad and Tobago", gdp:20380},
+    {name:"Bahrain", gdp:20214},
+    {name:"Estonia", gdp:19123},
+    {name:"Bolivia", gdp:17627},
+    {name:"Bosnia and Herzegovina", gdp:17133},
+    {name:"Uganda", gdp:15736},
+    {name:"Ghana", gdp:15513},
+    {name:"Paraguay", gdp:14668},
+    {name:"Honduras", gdp:14268},
+    {name:"Afghanistan", gdp:14044},
+    {name:"Zambia", gdp:13000},
+    {name:"Senegal", gdp:12738},
+    {name:"Nepal", gdp:12615},
+    {name:"Equatorial Guinea", gdp:12222},
+    {name:"Albania", gdp:12185},
+    {name:"Iceland", gdp:12133},
+    {name:"Jamaica", gdp:11903},
+    {name:"Botswana", gdp:11630},
+    {name:"Democratic Republic of the Congo", gdp:11108},
+    {name:"Gabon", gdp:11016},
+    {name:"Cambodia", gdp:10804},
+    {name:"Georgia", gdp:10737},
+    {name:"Brunei", gdp:10546},
+    {name:"Mozambique", gdp:9831},
+    {name:"Republic of the Congo", gdp:9532},
+    {name:"Namibia", gdp:9459},
+    {name:"Macedonia", gdp:9238},
+    {name:"Mali", gdp:8965},
+    {name:"Mauritius", gdp:8761},
+    {name:"Armenia", gdp:8714},
+    {name:"Madagascar", gdp:8551},
+    {name:"Burkina Faso", gdp:8105},
+    {name:"Malta", gdp:7955},
+    {name:"Papua New Guinea", gdp:7907},
+    {name:"The Bahamas", gdp:7335},
+    {name:"Chad", gdp:6854},
+    {name:"Benin", gdp:6672},
+    {name:"Haiti", gdp:6558},
+    {name:"Nicaragua", gdp:6151},
+    {name:"Laos", gdp:5598},
+    {name:"Moldova", gdp:5403},
+    {name:"Kosovo", gdp:5352},
+    {name:"Niger", gdp:5261},
+    {name:"Rwanda", gdp:5245},
+    {name:"Tajikistan", gdp:4982},
+    {name:"Kyrgyzstan", gdp:4570},
+    {name:"Malawi", gdp:4570},
+    {name:"Zimbabwe", gdp:4397},
+    {name:"Guinea", gdp:4394},
+    {name:"Mongolia", gdp:4203},
+    {name:"Montenegro", gdp:4114},
+    {name:"Barbados", gdp:3595},
+    {name:"Fiji", gdp:3060},
+    {name:"Mauritania", gdp:3029},
+    {name:"Swaziland", gdp:2983},
+    {name:"Suriname", gdp:2962},
+    {name:"Togo", gdp:2865},
+    {name:"Guyana", gdp:2024},
+    {name:"Central African Republic", gdp:1986},
+    {name:"Sierra Leone", gdp:1877},
+    {name:"Eritrea", gdp:1873},
+    {name:"Cape Verde", gdp:1768},
+    {name:"Lesotho", gdp:1602},
+    {name:"Maldives", gdp:1357},
+    {name:"Belize", gdp:1336},
+    {name:"Burundi", gdp:1321},
+    {name:"Bhutan", gdp:1269},
+    {name:"Antigua and Barbuda", gdp:1178},
+    {name:"Djibouti", gdp:1049},
+    {name:"Saint Lucia", gdp:973},
+    {name:"Liberia", gdp:876},
+    {name:"Guinea-Bissau", gdp:826},
+    {name:"Seychelles", gdp:767},
+    {name:"The Gambia", gdp:736},
+    {name:"Solomon Islands", gdp:657},
+    {name:"Vanuatu", gdp:635},
+    {name:"Grenada", gdp:615},
+    {name:"East Timor", gdp:590},
+    {name:"Saint Vincent and the Grenadines", gdp:567},
+    {name:"Samoa", gdp:558},
+    {name:"Saint Kitts and Nevis", gdp:557},
+    {name:"Comoros", gdp:532},
+    {name:"Dominica", gdp:362},
+    {name:"Tonga", gdp:313},
+    {name:"Săo Tomé and Príncipe", gdp:191},
+    {name:"Kiribati", gdp:130},
+];

+ 77 - 0
ext/thirdparty/js/protovis/examples/sankey/sankey.html

@@ -0,0 +1,77 @@
+<html>
+  <head>
+    <title>GDP of the World</title>
+    <script type="text/javascript" src="../../protovis-d3.2.js"></script>
+    <script type="text/javascript" src="gdp2009.js"></script>
+  </head>
+  <body>
+    <script type="text/javascript+protovis">
+var top20 = [];
+for(var i = 0; i < 20; i++) {
+  top20.push(gdp2009[i]);
+}
+
+// define the data
+var data = top20;
+var text = function(d) d.name;
+var value = function(d) d.gdp;
+
+
+var prev = 0,
+    sum = 0,
+    hdif = [];
+for(var i = 0; i < data.length; i++) {
+  sum += value(data[i]);
+  hdif.push((sum + prev) / 2);
+  prev = sum;
+}
+
+var w = 700,
+    h = 800,
+    lMargin = 50,
+    rMargin = 230,
+    baseWidth = 400,
+    scale = 1.9,
+    steps = [0, 0.2, 0.8, 1],
+    x = pv.Scale.linear(steps).range(lMargin, w-rMargin),
+    ws = pv.Scale.linear(0, sum).range(0, baseWidth),
+    h0 = pv.Scale.linear(0, sum).range(-baseWidth/2, baseWidth/2),
+    h1 = pv.Scale.linear(0, sum).range(-scale*baseWidth/2, scale*baseWidth/2);
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(h)
+    .strokeStyle("#ccc")
+    .margin(20);
+
+vis.add(pv.Panel)
+    .data(hdif)
+  .add(pv.Line)
+    .data(steps)
+    .left(x)
+    .bottom(function(step, val) h/2 - ((this.index < 2)?h0(val):h1(val)))
+    .lineWidth(function() ws(value(data[this.parent.index])))
+    .interpolate("monotone");
+
+vis.add(pv.Label)
+    .left(x(0))
+    .bottom(h/2)
+    .textBaseline("middle")
+    .textAlign("right")
+    .font("18px sans-serif")
+    .text("All");
+
+vis.add(pv.Label)
+    .data(hdif)
+    .left(x(1))
+    .bottom(function(val) h/2 - h1(val))
+    .textBaseline("middle")
+    .textAlign("left")
+    .font(function() (6*Math.log(ws(value(data[this.index])))).toFixed(0) + "px sans-serif")
+    .text(function() text(data[this.index]));
+
+vis.render();
+
+    </script>
+  </body>
+</html>

+ 112 - 0
ext/thirdparty/js/protovis/examples/slider/cell.html

@@ -0,0 +1,112 @@
+<html>
+  <head>
+    <title>Automaton Explorer</title>
+    <script type="text/javascript" src="../../protovis-d3.2.js"></script>
+		<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
+		<script type="text/javascript" src="jquery-ui-1.8rc3.custom.min.js"></script>
+    <script type="text/javascript" src="cell.js"></script>
+		<link type="text/css" href="ui-lightness/jquery-ui-1.8rc3.custom.css" rel="stylesheet"/>
+    <link type="text/css" href="../../tests/style.css" rel="stylesheet"/>
+    <style type="text/css">
+
+.ui-slider {
+  font-size: 10px;
+  width: 300px;
+  margin-top: 5px;
+}
+
+sup, sub {
+  line-height: 0;
+}
+
+.ui-state-focus {
+  outline: none;
+}
+
+#slider {
+  width: 300px;
+  display: inline-block;
+  margin-left: 10px;
+  margin-right: 10px;
+}
+
+    </style>
+  </head>
+  <body>
+    <h3>Automaton Explorer</h3>
+    <div style="width:8in;">
+      rule: <span id="slider"></span><span id="rule">30</span>
+      <span style="float:right;">
+        start: <input type="radio" checked id="point" name="start" value="point">
+        <label for="point">point</label>
+        <input type="radio" id="random" name="start" value="random">
+        <label for="random">random</label>
+      </span>
+    </div><p>
+    <script type="text/javascript+protovis">
+
+var h = 128,
+    w = h << 1,
+    start = "point",
+    rule = 30;
+
+var vis = new pv.Panel()
+    .width(w * 3)
+    .height(h * 3)
+    .top(40);
+
+vis.add(pv.Panel)
+    .data(pv.range(8))
+    .right(function(i) (i + .5) * w * 3 / 8)
+    .top(-35)
+    .event("mousedown", function(i)
+        ($("#rule").html(rule ^= 1 << i),
+         $(slider).slider('value', rule),
+         vis))
+  .add(pv.Bar)
+    .top(10)
+    .right(-5)
+    .width(10)
+    .height(10)
+    .title(function(j, i) "Toggle bit " + i + ".")
+    .strokeStyle("#bbb")
+    .fillStyle(function(i) rule >> i & 1 ? "#000" : "#fff")
+  .add(pv.Bar)
+    .data(pv.range(3))
+    .top(0)
+    .right(function(i) i * 10 - 15)
+    .fillStyle(function(i, j) j >> i & 1 ? "#000" : "#fff");
+
+vis.add(pv.Image)
+    .def("cell", cell)
+    .imageWidth(w)
+    .imageHeight(h)
+    .image(pv.colors("#fff", "#000").by(function(x, y) this.cell()[y][x]));
+
+vis.render();
+
+$(slider).slider({
+  min: 1, value: 30, max: 255, slide: function(e, ui) {
+    $("#rule").html(rule = ui.value);
+    vis.render();
+  }
+});
+
+$([point, random]).change(function() {
+  start = this.value;
+  vis.render();
+});
+
+    </script>
+
+    <p>From <a href="http://mathworld.wolfram.com/CellularAutomaton.html">MathWorld</a>:
+    "A cellular automaton is a collection of 'colored' cells on a grid of
+    specified shape that evolves through a number of discrete time steps
+    according to a set of rules based on the states of neighboring cells." This
+    example explores binary, nearest-neighbor, one-dimensional automata, of
+    which there are 256 (2<sup>8</sup>) possible rules. The eight possible
+    outcomes for the current rule are shown across the top; click to toggle the
+    selected bit.
+
+  </body>
+</html>

+ 31 - 0
ext/thirdparty/js/protovis/examples/slider/cell.js

@@ -0,0 +1,31 @@
+/** Depends on globals: rule, w, h, mode. */
+function cell() {
+  var d = pv.range(h).map(function() {
+          return pv.range(w).map(function() { return 0; });
+        }),
+      r = pv.range(8).map(function(i) {
+          return rule >> i & 1;
+        });
+  if (start == "point") {
+    d[0][w >> 1] = 1;
+  } else {
+    for (var x = 0; x < w; x++) {
+      d[0][x] = cell.random(x);
+    }
+  }
+  for (var y = 1; y < h; y++) {
+    var p = d[y - 1], c = d[y];
+    for (var x = 0; x < w; x++) {
+      c[x] = r[p[x - 1] << 2 | p[x] << 1 | p[x + 1]];
+    }
+  }
+  return d;
+}
+
+cell.$random = {};
+
+/** Caches random output to make exploration deterministic. */
+cell.random = function(i) {
+  return i in cell.$random ? cell.$random[i]
+      : (cell.$random[i] = Math.random() < .5 ? 0 : 1);
+};

+ 85 - 0
ext/thirdparty/js/protovis/examples/slider/horizon.html

@@ -0,0 +1,85 @@
+<html>
+  <head>
+    <title>Horizon Explorer</title>
+    <script type="text/javascript" src="../../protovis-d3.2.js"></script>
+		<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
+		<script type="text/javascript" src="jquery-ui-1.8rc3.custom.min.js"></script>
+		<link type="text/css" href="ui-lightness/jquery-ui-1.8rc3.custom.css" rel="stylesheet"/>
+    <link type="text/css" href="../../tests/style.css" rel="stylesheet"/>
+    <style type="text/css">
+
+.ui-slider {
+  font-size: 10px;
+  width: 300px;
+  margin-top: 5px;
+}
+
+.ui-state-focus {
+  outline: none;
+}
+
+#slider {
+  width: 300px;
+  display: inline-block;
+  margin-left: 10px;
+  margin-right: 10px;
+}
+
+#bands {
+  display: inline-block;
+  width: 20px;
+  text-align: right;
+}
+
+    </style>
+  </head>
+  <body>
+    <h3>Horizon Explorer</h3>
+    <div style="width:600px;">
+      bands: <span id="slider"></span><span id="bands">1</span>
+      <span style="float:right;">
+        mode: <input type="radio" id="mirror" name="mode" value="mirror">
+        <label for="mirror">mirror</label>
+        <input type="radio" checked id="offset" name="mode" value="offset">
+        <label for="offset">offset</label>
+      </span>
+    </div><p>
+    <script type="text/javascript+protovis">
+
+var w = 600,
+    h = 70,
+    bands = 1,
+    mode = "offset",
+    data = pv.range(101).map(function(d) Math.sin(d / 2) + Math.sin(d / 7)),
+    x = pv.Scale.linear(data, pv.index).range(0, w).by(pv.index),
+    y = pv.Scale.linear(data).range(-h, h);
+
+var vis = new pv.Panel()
+    .width(w)
+    .height(function() h / bands);
+
+vis.add(pv.Layout.Horizon)
+    .bands(function() bands)
+    .mode(function() mode)
+  .band.add(pv.Area)
+    .data(data)
+    .left(x)
+    .height(y);
+
+vis.render();
+
+$(slider).slider({
+  min: 1, max: 10, slide: function(e, ui) {
+    $("#bands").html(bands = ui.value);
+    vis.render();
+  }
+});
+
+$([mirror, offset]).change(function() {
+  mode = this.value;
+  vis.render();
+});
+
+    </script>
+  </body>
+</html>

File diff suppressed because it is too large
+ 17 - 0
ext/thirdparty/js/protovis/examples/slider/jquery-ui-1.8rc3.custom.min.js


+ 50 - 0
ext/thirdparty/js/protovis/examples/slider/slider.html

@@ -0,0 +1,50 @@
+<html>
+	<head>
+		<title>Slider</title>
+		<script type="text/javascript" src="../../protovis-d3.2.js"></script>
+		<script type="text/javascript" src="../jquery-1.4.2.min.js"></script>
+		<script type="text/javascript" src="jquery-ui-1.8rc3.custom.min.js"></script>
+		<link type="text/css" href="ui-lightness/jquery-ui-1.8rc3.custom.css" rel="stylesheet"/>
+    <style type="text/css">
+
+.ui-slider {
+  font-size: 10px;
+  width: 300px;
+  margin-top: 5px;
+}
+
+.ui-state-focus {
+  outline: none;
+}
+
+    </style>
+	</head>
+	<body>
+    <script type="text/javascript+protovis">
+
+var color = pv.color("black");
+
+var vis = new pv.Panel()
+    .width(300)
+    .height(300)
+    .fillStyle(color);
+
+vis.anchor("center").add(pv.Label)
+    .text(function() color.color);
+
+vis.render();
+
+$([red, green, blue]).slider({
+    min: 0, max: 255, slide: function(e, ui) {
+        vis.fillStyle(color = color[this.id](ui.value)).render();
+      }
+  });
+
+    </script>
+    <div id="red"></div>
+    <div id="green"></div>
+    <div id="blue"></div>
+	</body>
+</html>
+
+

BIN
ext/thirdparty/js/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png


BIN
ext/thirdparty/js/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png


+ 0 - 52
ext/thirdparty/js/protovis/examples/step.html

@@ -1,52 +0,0 @@
-<html>
-  <head>
-    <title>Step Chart</title>
-    <script type="text/javascript" src="../protovis-d3.1.js"></script>
-  </head>
-  <body>
-    <script type="text/javascript+protovis">
-
-var data = pv.range(0, 10, .1).map(function(x) {
-        return {x: x, y: Math.sin(x) + Math.random() * .5 + 2};
-      }),
-    w = 400,
-    h = 200,
-    x = pv.Scale.linear(data, function(d) d.x).range(0, w),
-    y = pv.Scale.linear(0, 4).range(0, h);
-
-var vis = new pv.Panel()
-    .width(w)
-    .height(h)
-    .bottom(20)
-    .left(20)
-    .right(10)
-    .top(5);
-
-vis.add(pv.Rule)
-    .data(y.ticks())
-    .visible(function() !(this.index % 2))
-    .bottom(function(d) Math.round(y(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("left").add(pv.Label)
-    .text(function(d) d.toFixed(1));
-
-vis.add(pv.Rule)
-    .data(x.ticks())
-    .visible(function(d) d > 0)
-    .left(function(d) Math.round(x(d)) - .5)
-    .strokeStyle("#eee")
-  .anchor("bottom").add(pv.Label)
-    .text(function(d) d.toFixed());
-
-vis.add(pv.Line)
-    .data(data)
-    .left(function(d) x(d.x))
-    .bottom(function(d) y(d.y))
-    .lineWidth(3)
-    .interpolate("step-after");
-
-vis.render();
-
-    </script>
-  </body>
-</html>

BIN
ext/thirdparty/js/protovis/examples/step.png


+ 0 - 594
ext/thirdparty/js/protovis/js/color/Color.js

@@ -1,594 +0,0 @@
-/**
- * Returns the {@link pv.Color} for the specified color format string. Colors
- * may have an associated opacity, or alpha channel. Color formats are specified
- * by CSS Color Modular Level 3, using either in RGB or HSL color space. For
- * example:<ul>
- *
- * <li>#f00 // #rgb
- * <li>#ff0000 // #rrggbb
- * <li>rgb(255, 0, 0)
- * <li>rgb(100%, 0%, 0%)
- * <li>hsl(0, 100%, 50%)
- * <li>rgba(0, 0, 255, 0.5)
- * <li>hsla(120, 100%, 50%, 1)
- *
- * </ul>The SVG 1.0 color keywords names are also supported, such as "aliceblue"
- * and "yellowgreen". The "transparent" keyword is supported for a
- * fully-transparent color.
- *
- * <p>If the <tt>format</tt> argument is already an instance of <tt>Color</tt>,
- * the argument is returned with no further processing.
- *
- * @param {string} format the color specification string, such as "#f00".
- * @returns {pv.Color} the corresponding <tt>Color</tt>.
- * @see <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color
- * keywords</a>
- * @see <a href="http://www.w3.org/TR/css3-color/">CSS3 color module</a>
- */
-pv.color = function(format) {
-  if (!format || (format == "transparent")) {
-    return pv.rgb(0, 0, 0, 0);
-  }
-  if (format instanceof pv.Color) {
-    return format;
-  }
-
-  /* Handle hsl, rgb. */
-  var m1 = /([a-z]+)\((.*)\)/i.exec(format);
-  if (m1) {
-    var m2 = m1[2].split(","), a = 1;
-    switch (m1[1]) {
-      case "hsla":
-      case "rgba": {
-        a = parseFloat(m2[3]);
-        break;
-      }
-    }
-    switch (m1[1]) {
-      case "hsla":
-      case "hsl": {
-        var h = parseFloat(m2[0]), // degrees
-            s = parseFloat(m2[1]) / 100, // percentage
-            l = parseFloat(m2[2]) / 100; // percentage
-        return (new pv.Color.Hsl(h, s, l, a)).rgb();
-      }
-      case "rgba":
-      case "rgb": {
-        function parse(c) { // either integer or percentage
-          var f = parseFloat(c);
-          return (c[c.length - 1] == '%') ? Math.round(f * 2.55) : f;
-        }
-        var r = parse(m2[0]), g = parse(m2[1]), b = parse(m2[2]);
-        return pv.rgb(r, g, b, a);
-      }
-    }
-  }
-
-  /* Named colors. */
-  format = pv.Color.names[format] || format;
-
-  /* Hexadecimal colors: #rgb and #rrggbb. */
-  if (format.charAt(0) == "#") {
-    var r, g, b;
-    if (format.length == 4) {
-      r = format.charAt(1); r += r;
-      g = format.charAt(2); g += g;
-      b = format.charAt(3); b += b;
-    } else if (format.length == 7) {
-      r = format.substring(1, 3);
-      g = format.substring(3, 5);
-      b = format.substring(5, 7);
-    }
-    return pv.rgb(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1);
-  }
-
-  /* Otherwise, assume named colors. TODO allow lazy conversion to RGB. */
-  return new pv.Color(format, 1);
-};
-
-/**
- * Constructs a color with the specified color format string and opacity. This
- * constructor should not be invoked directly; use {@link pv.color} instead.
- *
- * @class Represents an abstract (possibly translucent) color. The color is
- * divided into two parts: the <tt>color</tt> attribute, an opaque color format
- * string, and the <tt>opacity</tt> attribute, a float in [0, 1]. The color
- * space is dependent on the implementing class; all colors support the
- * {@link #rgb} method to convert to RGB color space for interpolation.
- *
- * <p>See also the <a href="../../api/Color.html">Color guide</a>.
- *
- * @param {string} color an opaque color format string, such as "#f00".
- * @param {number} opacity the opacity, in [0,1].
- * @see pv.color
- */
-pv.Color = function(color, opacity) {
-  /**
-   * An opaque color format string, such as "#f00".
-   *
-   * @type string
-   * @see <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color
-   * keywords</a>
-   * @see <a href="http://www.w3.org/TR/css3-color/">CSS3 color module</a>
-   */
-  this.color = color;
-
-  /**
-   * The opacity, a float in [0, 1].
-   *
-   * @type number
-   */
-  this.opacity = opacity;
-};
-
-/**
- * Returns a new color that is a brighter version of this color. The behavior of
- * this method may vary slightly depending on the underlying color space.
- * Although brighter and darker are inverse operations, the results of a series
- * of invocations of these two methods might be inconsistent because of rounding
- * errors.
- *
- * @param [k] {number} an optional scale factor; defaults to 1.
- * @see #darker
- * @returns {pv.Color} a brighter color.
- */
-pv.Color.prototype.brighter = function(k) {
-  return this.rgb().brighter(k);
-};
-
-/**
- * Returns a new color that is a brighter version of this color. The behavior of
- * this method may vary slightly depending on the underlying color space.
- * Although brighter and darker are inverse operations, the results of a series
- * of invocations of these two methods might be inconsistent because of rounding
- * errors.
- *
- * @param [k] {number} an optional scale factor; defaults to 1.
- * @see #brighter
- * @returns {pv.Color} a darker color.
- */
-pv.Color.prototype.darker = function(k) {
-  return this.rgb().darker(k);
-};
-
-/**
- * Constructs a new RGB color with the specified channel values.
- *
- * @param {number} r the red channel, an integer in [0,255].
- * @param {number} g the green channel, an integer in [0,255].
- * @param {number} b the blue channel, an integer in [0,255].
- * @param {number} [a] the alpha channel, a float in [0,1].
- * @returns pv.Color.Rgb
- */
-pv.rgb = function(r, g, b, a) {
-  return new pv.Color.Rgb(r, g, b, (arguments.length == 4) ? a : 1);
-};
-
-/**
- * Constructs a new RGB color with the specified channel values.
- *
- * @class Represents a color in RGB space.
- *
- * @param {number} r the red channel, an integer in [0,255].
- * @param {number} g the green channel, an integer in [0,255].
- * @param {number} b the blue channel, an integer in [0,255].
- * @param {number} a the alpha channel, a float in [0,1].
- * @extends pv.Color
- */
-pv.Color.Rgb = function(r, g, b, a) {
-  pv.Color.call(this, a ? ("rgb(" + r + "," + g + "," + b + ")") : "none", a);
-
-  /**
-   * The red channel, an integer in [0, 255].
-   *
-   * @type number
-   */
-  this.r = r;
-
-  /**
-   * The green channel, an integer in [0, 255].
-   *
-   * @type number
-   */
-  this.g = g;
-
-  /**
-   * The blue channel, an integer in [0, 255].
-   *
-   * @type number
-   */
-  this.b = b;
-
-  /**
-   * The alpha channel, a float in [0, 1].
-   *
-   * @type number
-   */
-  this.a = a;
-};
-pv.Color.Rgb.prototype = pv.extend(pv.Color);
-
-/**
- * Constructs a new RGB color with the same green, blue and alpha channels as
- * this color, with the specified red channel.
- *
- * @param {number} r the red channel, an integer in [0,255].
- */
-pv.Color.Rgb.prototype.red = function(r) {
-  return pv.rgb(r, this.g, this.b, this.a);
-};
-
-/**
- * Constructs a new RGB color with the same red, blue and alpha channels as this
- * color, with the specified green channel.
- *
- * @param {number} g the green channel, an integer in [0,255].
- */
-pv.Color.Rgb.prototype.green = function(g) {
-  return pv.rgb(this.r, g, this.b, this.a);
-};
-
-/**
- * Constructs a new RGB color with the same red, green and alpha channels as
- * this color, with the specified blue channel.
- *
- * @param {number} b the blue channel, an integer in [0,255].
- */
-pv.Color.Rgb.prototype.blue = function(b) {
-  return pv.rgb(this.r, this.g, b, this.a);
-};
-
-/**
- * Constructs a new RGB color with the same red, green and blue channels as this
- * color, with the specified alpha channel.
- *
- * @param {number} a the alpha channel, a float in [0,1].
- */
-pv.Color.Rgb.prototype.alpha = function(a) {
-  return pv.rgb(this.r, this.g, this.b, a);
-};
-
-/**
- * Returns the RGB color equivalent to this color. This method is abstract and
- * must be implemented by subclasses.
- *
- * @returns {pv.Color.Rgb} an RGB color.
- * @function
- * @name pv.Color.prototype.rgb
- */
-
-/**
- * Returns this.
- *
- * @returns {pv.Color.Rgb} this.
- */
-pv.Color.Rgb.prototype.rgb = function() { return this; };
-
-/**
- * Returns a new color that is a brighter version of this color. This method
- * applies an arbitrary scale factor to each of the three RGB components of this
- * color to create a brighter version of this color. Although brighter and
- * darker are inverse operations, the results of a series of invocations of
- * these two methods might be inconsistent because of rounding errors.
- *
- * @param [k] {number} an optional scale factor; defaults to 1.
- * @see #darker
- * @returns {pv.Color.Rgb} a brighter color.
- */
-pv.Color.Rgb.prototype.brighter = function(k) {
-  k = Math.pow(0.7, arguments.length ? k : 1);
-  var r = this.r, g = this.g, b = this.b, i = 30;
-  if (!r && !g && !b) return pv.rgb(i, i, i, this.a);
-  if (r && (r < i)) r = i;
-  if (g && (g < i)) g = i;
-  if (b && (b < i)) b = i;
-  return pv.rgb(
-      Math.min(255, Math.floor(r / k)),
-      Math.min(255, Math.floor(g / k)),
-      Math.min(255, Math.floor(b / k)),
-      this.a);
-};
-
-/**
- * Returns a new color that is a darker version of this color. This method
- * applies an arbitrary scale factor to each of the three RGB components of this
- * color to create a darker version of this color. Although brighter and darker
- * are inverse operations, the results of a series of invocations of these two
- * methods might be inconsistent because of rounding errors.
- *
- * @param [k] {number} an optional scale factor; defaults to 1.
- * @see #brighter
- * @returns {pv.Color.Rgb} a darker color.
- */
-pv.Color.Rgb.prototype.darker = function(k) {
-  k = Math.pow(0.7, arguments.length ? k : 1);
-  return pv.rgb(
-      Math.max(0, Math.floor(k * this.r)),
-      Math.max(0, Math.floor(k * this.g)),
-      Math.max(0, Math.floor(k * this.b)),
-      this.a);
-};
-
-/**
- * Constructs a new HSL color with the specified values.
- *
- * @param {number} h the hue, an integer in [0, 360].
- * @param {number} s the saturation, a float in [0, 1].
- * @param {number} l the lightness, a float in [0, 1].
- * @param {number} [a] the opacity, a float in [0, 1].
- * @returns pv.Color.Hsl
- */
-pv.hsl = function(h, s, l, a) {
-  return new pv.Color.Hsl(h, s, l,  (arguments.length == 4) ? a : 1);
-};
-
-/**
- * Constructs a new HSL color with the specified values.
- *
- * @class Represents a color in HSL space.
- *
- * @param {number} h the hue, an integer in [0, 360].
- * @param {number} s the saturation, a float in [0, 1].
- * @param {number} l the lightness, a float in [0, 1].
- * @param {number} a the opacity, a float in [0, 1].
- * @extends pv.Color
- */
-pv.Color.Hsl = function(h, s, l, a) {
-  pv.Color.call(this, "hsl(" + h + "," + (s * 100) + "%," + (l * 100) + "%)", a);
-
-  /**
-   * The hue, an integer in [0, 360].
-   *
-   * @type number
-   */
-  this.h = h;
-
-  /**
-   * The saturation, a float in [0, 1].
-   *
-   * @type number
-   */
-  this.s = s;
-
-  /**
-   * The lightness, a float in [0, 1].
-   *
-   * @type number
-   */
-  this.l = l;
-
-  /**
-   * The opacity, a float in [0, 1].
-   *
-   * @type number
-   */
-  this.a = a;
-};
-pv.Color.Hsl.prototype = pv.extend(pv.Color);
-
-/**
- * Constructs a new HSL color with the same saturation, lightness and alpha as
- * this color, and the specified hue.
- *
- * @param {number} h the hue, an integer in [0, 360].
- */
-pv.Color.Hsl.prototype.hue = function(h) {
-  return pv.hsl(h, this.s, this.l, this.a);
-};
-
-/**
- * Constructs a new HSL color with the same hue, lightness and alpha as this
- * color, and the specified saturation.
- *
- * @param {number} s the saturation, a float in [0, 1].
- */
-pv.Color.Hsl.prototype.saturation = function(s) {
-  return pv.hsl(this.h, s, this.l, this.a);
-};
-
-/**
- * Constructs a new HSL color with the same hue, saturation and alpha as this
- * color, and the specified lightness.
- *
- * @param {number} l the lightness, a float in [0, 1].
- */
-pv.Color.Hsl.prototype.lightness = function(l) {
-  return pv.hsl(this.h, this.s, l, this.a);
-};
-
-/**
- * Constructs a new HSL color with the same hue, saturation and lightness as
- * this color, and the specified alpha.
- *
- * @param {number} a the opacity, a float in [0, 1].
- */
-pv.Color.Hsl.prototype.alpha = function(a) {
-  return pv.hsl(this.h, this.s, this.l, a);
-};
-
-/**
- * Returns the RGB color equivalent to this HSL color.
- *
- * @returns {pv.Color.Rgb} an RGB color.
- */
-pv.Color.Hsl.prototype.rgb = function() {
-  var h = this.h, s = this.s, l = this.l;
-
-  /* Some simple corrections for h, s and l. */
-  h = h % 360; if (h < 0) h += 360;
-  s = Math.max(0, Math.min(s, 1));
-  l = Math.max(0, Math.min(l, 1));
-
-  /* From FvD 13.37, CSS Color Module Level 3 */
-  var m2 = (l <= .5) ? (l * (1 + s)) : (l + s - l * s);
-  var m1 = 2 * l - m2;
-  function v(h) {
-    if (h > 360) h -= 360;
-    else if (h < 0) h += 360;
-    if (h < 60) return m1 + (m2 - m1) * h / 60;
-    if (h < 180) return m2;
-    if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
-    return m1;
-  }
-  function vv(h) {
-    return Math.round(v(h) * 255);
-  }
-
-  return pv.rgb(vv(h + 120), vv(h), vv(h - 120), this.a);
-};
-
-/**
- * @private SVG color keywords, per CSS Color Module Level 3.
- *
- * @see <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color
- * keywords</a>
- */
-pv.Color.names = {
-  aliceblue: "#f0f8ff",
-  antiquewhite: "#faebd7",
-  aqua: "#00ffff",
-  aquamarine: "#7fffd4",
-  azure: "#f0ffff",
-  beige: "#f5f5dc",
-  bisque: "#ffe4c4",
-  black: "#000000",
-  blanchedalmond: "#ffebcd",
-  blue: "#0000ff",
-  blueviolet: "#8a2be2",
-  brown: "#a52a2a",
-  burlywood: "#deb887",
-  cadetblue: "#5f9ea0",
-  chartreuse: "#7fff00",
-  chocolate: "#d2691e",
-  coral: "#ff7f50",
-  cornflowerblue: "#6495ed",
-  cornsilk: "#fff8dc",
-  crimson: "#dc143c",
-  cyan: "#00ffff",
-  darkblue: "#00008b",
-  darkcyan: "#008b8b",
-  darkgoldenrod: "#b8860b",
-  darkgray: "#a9a9a9",
-  darkgreen: "#006400",
-  darkgrey: "#a9a9a9",
-  darkkhaki: "#bdb76b",
-  darkmagenta: "#8b008b",
-  darkolivegreen: "#556b2f",
-  darkorange: "#ff8c00",
-  darkorchid: "#9932cc",
-  darkred: "#8b0000",
-  darksalmon: "#e9967a",
-  darkseagreen: "#8fbc8f",
-  darkslateblue: "#483d8b",
-  darkslategray: "#2f4f4f",
-  darkslategrey: "#2f4f4f",
-  darkturquoise: "#00ced1",
-  darkviolet: "#9400d3",
-  deeppink: "#ff1493",
-  deepskyblue: "#00bfff",
-  dimgray: "#696969",
-  dimgrey: "#696969",
-  dodgerblue: "#1e90ff",
-  firebrick: "#b22222",
-  floralwhite: "#fffaf0",
-  forestgreen: "#228b22",
-  fuchsia: "#ff00ff",
-  gainsboro: "#dcdcdc",
-  ghostwhite: "#f8f8ff",
-  gold: "#ffd700",
-  goldenrod: "#daa520",
-  gray: "#808080",
-  green: "#008000",
-  greenyellow: "#adff2f",
-  grey: "#808080",
-  honeydew: "#f0fff0",
-  hotpink: "#ff69b4",
-  indianred: "#cd5c5c",
-  indigo: "#4b0082",
-  ivory: "#fffff0",
-  khaki: "#f0e68c",
-  lavender: "#e6e6fa",
-  lavenderblush: "#fff0f5",
-  lawngreen: "#7cfc00",
-  lemonchiffon: "#fffacd",
-  lightblue: "#add8e6",
-  lightcoral: "#f08080",
-  lightcyan: "#e0ffff",
-  lightgoldenrodyellow: "#fafad2",
-  lightgray: "#d3d3d3",
-  lightgreen: "#90ee90",
-  lightgrey: "#d3d3d3",
-  lightpink: "#ffb6c1",
-  lightsalmon: "#ffa07a",
-  lightseagreen: "#20b2aa",
-  lightskyblue: "#87cefa",
-  lightslategray: "#778899",
-  lightslategrey: "#778899",
-  lightsteelblue: "#b0c4de",
-  lightyellow: "#ffffe0",
-  lime: "#00ff00",
-  limegreen: "#32cd32",
-  linen: "#faf0e6",
-  magenta: "#ff00ff",
-  maroon: "#800000",
-  mediumaquamarine: "#66cdaa",
-  mediumblue: "#0000cd",
-  mediumorchid: "#ba55d3",
-  mediumpurple: "#9370db",
-  mediumseagreen: "#3cb371",
-  mediumslateblue: "#7b68ee",
-  mediumspringgreen: "#00fa9a",
-  mediumturquoise: "#48d1cc",
-  mediumvioletred: "#c71585",
-  midnightblue: "#191970",
-  mintcream: "#f5fffa",
-  mistyrose: "#ffe4e1",
-  moccasin: "#ffe4b5",
-  navajowhite: "#ffdead",
-  navy: "#000080",
-  oldlace: "#fdf5e6",
-  olive: "#808000",
-  olivedrab: "#6b8e23",
-  orange: "#ffa500",
-  orangered: "#ff4500",
-  orchid: "#da70d6",
-  palegoldenrod: "#eee8aa",
-  palegreen: "#98fb98",
-  paleturquoise: "#afeeee",
-  palevioletred: "#db7093",
-  papayawhip: "#ffefd5",
-  peachpuff: "#ffdab9",
-  peru: "#cd853f",
-  pink: "#ffc0cb",
-  plum: "#dda0dd",
-  powderblue: "#b0e0e6",
-  purple: "#800080",
-  red: "#ff0000",
-  rosybrown: "#bc8f8f",
-  royalblue: "#4169e1",
-  saddlebrown: "#8b4513",
-  salmon: "#fa8072",
-  sandybrown: "#f4a460",
-  seagreen: "#2e8b57",
-  seashell: "#fff5ee",
-  sienna: "#a0522d",
-  silver: "#c0c0c0",
-  skyblue: "#87ceeb",
-  slateblue: "#6a5acd",
-  slategray: "#708090",
-  slategrey: "#708090",
-  snow: "#fffafa",
-  springgreen: "#00ff7f",
-  steelblue: "#4682b4",
-  tan: "#d2b48c",
-  teal: "#008080",
-  thistle: "#d8bfd8",
-  tomato: "#ff6347",
-  turquoise: "#40e0d0",
-  violet: "#ee82ee",
-  wheat: "#f5deb3",
-  white: "#ffffff",
-  whitesmoke: "#f5f5f5",
-  yellow: "#ffff00",
-  yellowgreen: "#9acd32"
-};

+ 0 - 135
ext/thirdparty/js/protovis/js/color/Colors.js

@@ -1,135 +0,0 @@
-/**
- * Returns a new categorical color encoding using the specified colors.  The
- * arguments to this method are an array of colors; see {@link pv.color}. For
- * example, to create a categorical color encoding using the <tt>species</tt>
- * attribute:
- *
- * <pre>pv.colors("red", "green", "blue").by(function(d) d.species)</pre>
- *
- * The result of this expression can be used as a fill- or stroke-style
- * property. This assumes that the data's <tt>species</tt> attribute is a
- * string.
- *
- * @param {string} colors... categorical colors.
- * @see pv.Scale.ordinal
- * @returns {pv.Scale.ordinal} an ordinal color scale.
- */
-pv.colors = function() {
-  var scale = pv.Scale.ordinal();
-  scale.range.apply(scale, arguments);
-  return scale;
-};
-
-/**
- * A collection of standard color palettes for categorical encoding.
- *
- * @namespace A collection of standard color palettes for categorical encoding.
- */
-pv.Colors = {};
-
-/**
- * Returns a new 10-color scheme. The arguments to this constructor are
- * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The
- * following colors are used:
- *
- * <div style="background:#1f77b4;">#1f77b4</div>
- * <div style="background:#ff7f0e;">#ff7f0e</div>
- * <div style="background:#2ca02c;">#2ca02c</div>
- * <div style="background:#d62728;">#d62728</div>
- * <div style="background:#9467bd;">#9467bd</div>
- * <div style="background:#8c564b;">#8c564b</div>
- * <div style="background:#e377c2;">#e377c2</div>
- * <div style="background:#7f7f7f;">#7f7f7f</div>
- * <div style="background:#bcbd22;">#bcbd22</div>
- * <div style="background:#17becf;">#17becf</div>
- *
- * @param {number...} domain... domain values.
- * @returns {pv.Scale.ordinal} a new ordinal color scale.
- * @see pv.color
- */
-pv.Colors.category10 = function() {
-  var scale = pv.colors(
-      "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
-      "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf");
-  scale.domain.apply(scale, arguments);
-  return scale;
-};
-
-/**
- * Returns a new 20-color scheme. The arguments to this constructor are
- * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The
- * following colors are used:
- *
- * <div style="background:#1f77b4;">#1f77b4</div>
- * <div style="background:#aec7e8;">#aec7e8</div>
- * <div style="background:#ff7f0e;">#ff7f0e</div>
- * <div style="background:#ffbb78;">#ffbb78</div>
- * <div style="background:#2ca02c;">#2ca02c</div>
- * <div style="background:#98df8a;">#98df8a</div>
- * <div style="background:#d62728;">#d62728</div>
- * <div style="background:#ff9896;">#ff9896</div>
- * <div style="background:#9467bd;">#9467bd</div>
- * <div style="background:#c5b0d5;">#c5b0d5</div>
- * <div style="background:#8c564b;">#8c564b</div>
- * <div style="background:#c49c94;">#c49c94</div>
- * <div style="background:#e377c2;">#e377c2</div>
- * <div style="background:#f7b6d2;">#f7b6d2</div>
- * <div style="background:#7f7f7f;">#7f7f7f</div>
- * <div style="background:#c7c7c7;">#c7c7c7</div>
- * <div style="background:#bcbd22;">#bcbd22</div>
- * <div style="background:#dbdb8d;">#dbdb8d</div>
- * <div style="background:#17becf;">#17becf</div>
- * <div style="background:#9edae5;">#9edae5</div>
- *
- * @param {number...} domain... domain values.
- * @returns {pv.Scale.ordinal} a new ordinal color scale.
- * @see pv.color
-*/
-pv.Colors.category20 = function() {
-  var scale = pv.colors(
-      "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c",
-      "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5",
-      "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f",
-      "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5");
-  scale.domain.apply(scale, arguments);
-  return scale;
-};
-
-/**
- * Returns a new alternative 19-color scheme. The arguments to this constructor
- * are optional, and equivalent to calling
- * {@link pv.Scale.OrdinalScale#domain}. The following colors are used:
- *
- * <div style="background:#9c9ede;">#9c9ede</div>
- * <div style="background:#7375b5;">#7375b5</div>
- * <div style="background:#4a5584;">#4a5584</div>
- * <div style="background:#cedb9c;">#cedb9c</div>
- * <div style="background:#b5cf6b;">#b5cf6b</div>
- * <div style="background:#8ca252;">#8ca252</div>
- * <div style="background:#637939;">#637939</div>
- * <div style="background:#e7cb94;">#e7cb94</div>
- * <div style="background:#e7ba52;">#e7ba52</div>
- * <div style="background:#bd9e39;">#bd9e39</div>
- * <div style="background:#8c6d31;">#8c6d31</div>
- * <div style="background:#e7969c;">#e7969c</div>
- * <div style="background:#d6616b;">#d6616b</div>
- * <div style="background:#ad494a;">#ad494a</div>
- * <div style="background:#843c39;">#843c39</div>
- * <div style="background:#de9ed6;">#de9ed6</div>
- * <div style="background:#ce6dbd;">#ce6dbd</div>
- * <div style="background:#a55194;">#a55194</div>
- * <div style="background:#7b4173;">#7b4173</div>
- *
- * @param {number...} domain... domain values.
- * @returns {pv.Scale.ordinal} a new ordinal color scale.
- * @see pv.color
- */
-pv.Colors.category19 = function() {
-  var scale = pv.colors(
-      "#9c9ede", "#7375b5", "#4a5584", "#cedb9c", "#b5cf6b",
-      "#8ca252", "#637939", "#e7cb94", "#e7ba52", "#bd9e39",
-      "#8c6d31", "#e7969c", "#d6616b", "#ad494a", "#843c39",
-      "#de9ed6", "#ce6dbd", "#a55194", "#7b4173");
-  scale.domain.apply(scale, arguments);
-  return scale;
-};

+ 0 - 15
ext/thirdparty/js/protovis/js/color/Ramp.js

@@ -1,15 +0,0 @@
-/**
- * Returns a linear color ramp from the specified <tt>start</tt> color to the
- * specified <tt>end</tt> color. The color arguments may be specified either as
- * <tt>string</tt>s or as {@link pv.Color}s.
- *
- * @param {string} start the start color; may be a <tt>pv.Color</tt>.
- * @param {string} end the end color; may be a <tt>pv.Color</tt>.
- * @returns {Function} a color ramp from <tt>start</tt> to <tt>end</tt>.
- * @see pv.Scale.linear
- */
-pv.ramp = function(start, end) {
-  var scale = pv.Scale.linear();
-  scale.range.apply(scale, arguments);
-  return scale;
-};

+ 0 - 112
ext/thirdparty/js/protovis/js/data/Flatten.js

@@ -1,112 +0,0 @@
-/**
- * Returns a {@link pv.Flatten} operator for the specified map. This is a
- * convenience factory method, equivalent to <tt>new pv.Flatten(map)</tt>.
- *
- * @see pv.Flatten
- * @param map a map to flatten.
- * @returns {pv.Flatten} a flatten operator for the specified map.
- */
-pv.flatten = function(map) {
-  return new pv.Flatten(map);
-};
-
-/**
- * Constructs a flatten operator for the specified map. This constructor should
- * not be invoked directly; use {@link pv.flatten} instead.
- *
- * @class Represents a flatten operator for the specified array. Flattening
- * allows hierarchical maps to be flattened into an array. The levels in the
- * input tree are specified by <i>key</i> functions.
- *
- * <p>For example, consider the following hierarchical data structure of Barley
- * yields, from various sites in Minnesota during 1931-2:
- *
- * <pre>{ 1931: {
- *     Manchuria: {
- *       "University Farm": 27.00,
- *       "Waseca": 48.87,
- *       "Morris": 27.43,
- *       ... },
- *     Glabron: {
- *       "University Farm": 43.07,
- *       "Waseca": 55.20,
- *       ... } },
- *   1932: {
- *     ... } }</pre>
- *
- * To facilitate visualization, it may be useful to flatten the tree into a
- * tabular array:
- *
- * <pre>var array = pv.flatten(yields)
- *     .key("year")
- *     .key("variety")
- *     .key("site")
- *     .key("yield")
- *     .array();</pre>
- *
- * This returns an array of object elements. Each element in the array has
- * attributes corresponding to this flatten operator's keys:
- *
- * <pre>{ site: "University Farm", variety: "Manchuria", year: 1931, yield: 27 },
- * { site: "Waseca", variety: "Manchuria", year: 1931, yield: 48.87 },
- * { site: "Morris", variety: "Manchuria", year: 1931, yield: 27.43 },
- * { site: "University Farm", variety: "Glabron", year: 1931, yield: 43.07 },
- * { site: "Waseca", variety: "Glabron", year: 1931, yield: 55.2 }, ...</pre>
- *
- * <p>The flatten operator is roughly the inverse of the {@link pv.Nest} and
- * {@link pv.Tree} operators.
- *
- * @param map a map to flatten.
- */
-pv.Flatten = function(map) {
-  this.map = map;
-  this.keys = [];
-};
-
-/**
- * Flattens using the specified key function. Multiple keys may be added to the
- * flatten; the tiers of the underlying tree must correspond to the specified
- * keys, in order. The order of the returned array is undefined; however, you
- * can easily sort it.
- *
- * @param {string} key the key name.
- * @param {function} [f] an optional value map function.
- * @return {pv.Nest} this.
- */
-pv.Flatten.prototype.key = function(key, f) {
-  this.keys.push({name: key, value: f});
-  return this;
-};
-
-/**
- * Returns the flattened array. Each entry in the array is an object; each
- * object has attributes corresponding to this flatten operator's keys.
- *
- * @returns an array of elements from the flattened map.
- */
-pv.Flatten.prototype.array = function() {
-  var entries = [], stack = [], keys = this.keys;
-
-  /* Recursively visits the specified value. */
-  function visit(value, i) {
-    if (i < keys.length - 1) {
-      for (var key in value) {
-        stack.push(key);
-        visit(value[key], i + 1);
-        stack.pop();
-      }
-    } else {
-      entries.push(stack.concat(value));
-    }
-  }
-
-  visit(this.map, 0);
-  return entries.map(function(stack) {
-      var m = {};
-      for (var i = 0; i < keys.length; i++) {
-        var k = keys[i], v = stack[i];
-        m[k.name] = k.value ? k.value.call(null, v) : v;
-      }
-      return m;
-    });
-};

+ 0 - 295
ext/thirdparty/js/protovis/js/data/LinearScale.js

@@ -1,295 +0,0 @@
-/**
- * Returns a linear scale for the specified domain. The arguments to this
- * constructor are optional, and equivalent to calling {@link #domain}.
- *
- * @class Represents a linear scale. <style
- * type="text/css">sub{line-height:0}</style> <img src="../linear.png"
- * width="180" height="175" align="right"> Most commonly, a linear scale
- * represents a 1-dimensional linear transformation from a numeric domain of
- * input data [<i>d<sub>0</sub></i>, <i>d<sub>1</sub></i>] to a numeric range of
- * pixels [<i>r<sub>0</sub></i>, <i>r<sub>1</sub></i>]. The equation for such a
- * scale is:
- *
- * <blockquote><i>f(x) = (x - d<sub>0</sub>) / (d<sub>1</sub> - d<sub>0</sub>) *
- * (r<sub>1</sub> - r<sub>0</sub>) + r<sub>0</sub></i></blockquote>
- *
- * For example, a linear scale from the domain [0, 100] to range [0, 640]:
- *
- * <blockquote><i>f(x) = (x - 0) / (100 - 0) * (640 - 0) + 0</i><br>
- * <i>f(x) = x / 100 * 640</i><br>
- * <i>f(x) = x * 6.4</i><br>
- * </blockquote>
- *
- * Thus, saying
- *
- * <pre>.height(function(d) d * 6.4)</pre>
- *
- * is identical to
- *
- * <pre>.height(pv.Scale.linear(0, 100).range(0, 640))</pre>
- *
- * As you can see, scales do not always make code smaller, but they should make
- * code more explicit and easier to maintain. In addition to readability, scales
- * offer several useful features:
- *
- * <p>1. The range can be expressed in colors, rather than pixels. Changing the
- * example above to
- *
- * <pre>.fillStyle(pv.Scale.linear(0, 100).range("red", "green"))</pre>
- *
- * will cause it to fill the marks "red" on an input value of 0, "green" on an
- * input value of 100, and some color in-between for intermediate values.
- *
- * <p>2. The domain and range can be subdivided for a "poly-linear"
- * transformation. For example, you may want a diverging color scale that is
- * increasingly red for negative values, and increasingly green for positive
- * values:
- *
- * <pre>.fillStyle(pv.Scale.linear(-1, 0, 1).range("red", "white", "green"))</pre>
- *
- * The domain can be specified as a series of <i>n</i> monotonically-increasing
- * values; the range must also be specified as <i>n</i> values, resulting in
- * <i>n - 1</i> contiguous linear scales.
- *
- * <p>3. Linear scales can be inverted for interaction. The {@link #invert}
- * method takes a value in the output range, and returns the corresponding value
- * in the input domain. This is frequently used to convert the mouse location
- * (see {@link pv.Mark#mouse}) to a value in the input domain. Note that
- * inversion is only supported for numeric ranges, and not colors.
- *
- * <p>4. A scale can be queried for reasonable "tick" values. The {@link #ticks}
- * method provides a convenient way to get a series of evenly-spaced rounded
- * values in the input domain. Frequently these are used in conjunction with
- * {@link pv.Rule} to display tick marks or grid lines.
- *
- * <p>5. A scale can be "niced" to extend the domain to suitable rounded
- * numbers. If the minimum and maximum of the domain are messy because they are
- * derived from data, you can use {@link #nice} to round these values down and
- * up to even numbers.
- *
- * @param {number...} domain... domain values.
- * @returns {pv.Scale.linear} a linear scale.
- */
-pv.Scale.linear = function() {
-  var d = [0, 1], r = [0, 1], i = [pv.identity], precision = 0;
-
-  /** @private */
-  function scale(x) {
-    var j = pv.search(d, x);
-    if (j < 0) j = -j - 2;
-    j = Math.max(0, Math.min(i.length - 1, j));
-    return i[j]((x - d[j]) / (d[j + 1] - d[j]));
-  }
-
-  /**
-   * Sets or gets the input domain. This method can be invoked several ways:
-   *
-   * <p>1. <tt>domain(min, ..., max)</tt>
-   *
-   * <p>Specifying the domain as a series of numbers is the most explicit and
-   * recommended approach. Most commonly, two numbers are specified: the minimum
-   * and maximum value. However, for a diverging scale, or other subdivided
-   * poly-linear scales, multiple values can be specified. Values can be derived
-   * from data using {@link pv.min} and {@link pv.max}. For example:
-   *
-   * <pre>.domain(0, pv.max(array))</pre>
-   *
-   * An alternative method for deriving minimum and maximum values from data
-   * follows.
-   *
-   * <p>2. <tt>domain(array, minf, maxf)</tt>
-   *
-   * <p>When both the minimum and maximum value are derived from data, the
-   * arguments to the <tt>domain</tt> method can be specified as the array of
-   * data, followed by zero, one or two accessor functions. For example, if the
-   * array of data is just an array of numbers:
-   *
-   * <pre>.domain(array)</pre>
-   *
-   * On the other hand, if the array elements are objects representing stock
-   * values per day, and the domain should consider the stock's daily low and
-   * daily high:
-   *
-   * <pre>.domain(array, function(d) d.low, function(d) d.high)</pre>
-   *
-   * The first method of setting the domain is preferred because it is more
-   * explicit; setting the domain using this second method should be used only
-   * if brevity is required.
-   *
-   * <p>3. <tt>domain()</tt>
-   *
-   * <p>Invoking the <tt>domain</tt> method with no arguments returns the
-   * current domain as an array of numbers.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.domain
-   * @param {number...} domain... domain values.
-   * @returns {pv.Scale.linear} <tt>this</tt>, or the current domain.
-   */
-  scale.domain = function(array, min, max) {
-    if (arguments.length) {
-      if (array instanceof Array) {
-        if (arguments.length < 2) min = pv.identity;
-        if (arguments.length < 3) max = min;
-        d = [pv.min(array, min), pv.max(array, max)];
-      } else {
-        d = Array.prototype.slice.call(arguments);
-      }
-      return this;
-    }
-    return d;
-  };
-
-  /**
-   * Sets or gets the output range. This method can be invoked several ways:
-   *
-   * <p>1. <tt>range(min, ..., max)</tt>
-   *
-   * <p>The range may be specified as a series of numbers or colors. Most
-   * commonly, two numbers are specified: the minimum and maximum pixel values.
-   * For a color scale, values may be specified as {@link pv.Color}s or
-   * equivalent strings. For a diverging scale, or other subdivided poly-linear
-   * scales, multiple values can be specified. For example:
-   *
-   * <pre>.range("red", "white", "green")</pre>
-   *
-   * <p>Currently, only numbers and colors are supported as range values. The
-   * number of range values must exactly match the number of domain values, or
-   * the behavior of the scale is undefined.
-   *
-   * <p>2. <tt>range()</tt>
-   *
-   * <p>Invoking the <tt>range</tt> method with no arguments returns the current
-   * range as an array of numbers or colors.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.range
-   * @param {...} range... range values.
-   * @returns {pv.Scale.linear} <tt>this</tt>, or the current range.
-   */
-  scale.range = function() {
-    if (arguments.length) {
-      r = Array.prototype.slice.call(arguments);
-      i = [];
-      for (var j = 0; j < r.length - 1; j++) {
-        i.push(pv.Scale.interpolator(r[j], r[j + 1]));
-      }
-      return this;
-    }
-    return r;
-  };
-
-  /**
-   * Inverts the specified value in the output range, returning the
-   * corresponding value in the input domain. This is frequently used to convert
-   * the mouse location (see {@link pv.Mark#mouse}) to a value in the input
-   * domain. Inversion is only supported for numeric ranges, and not colors.
-   *
-   * <p>Note that this method does not do any rounding or bounds checking. If
-   * the input domain is discrete (e.g., an array index), the returned value
-   * should be rounded. If the specified <tt>y</tt> value is outside the range,
-   * the returned value may be equivalently outside the input domain.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.invert
-   * @param {number} y a value in the output range (a pixel location).
-   * @returns {number} a value in the input domain.
-   */
-  scale.invert = function(y) {
-    var j = pv.search(r, y);
-    if (j < 0) j = -j - 2;
-    j = Math.max(0, Math.min(i.length - 1, j));
-    return (y - r[j]) / (r[j + 1] - r[j]) * (d[j + 1] - d[j]) + d[j];
-  };
-
-  /**
-   * Returns an array of evenly-spaced, suitably-rounded values in the input
-   * domain. This method attempts to return between 5 and 10 tick values. These
-   * values are frequently used in conjunction with {@link pv.Rule} to display
-   * tick marks or grid lines.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.ticks
-   * @returns {number[]} an array input domain values to use as ticks.
-   */
-  scale.ticks = function() {
-    var min = d[0],
-        max = d[d.length - 1],
-        span = max - min,
-        step = pv.logCeil(span / 10, 10);
-    if (span / step < 2) step /= 5;
-    else if (span / step < 5) step /= 2;
-    var start = Math.ceil(min / step) * step,
-        end = Math.floor(max / step) * step;
-    precision = Math.max(0, -Math.floor(pv.log(step, 10) + .01));
-    return pv.range(start, end + step, step);
-  };
-
-  /**
-   * Formats the specified tick value using the appropriate precision, based on
-   * the step interval between tick marks.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.tickFormat
-   * @param {number} t a tick value.
-   * @return {string} a formatted tick value.
-   */
-  scale.tickFormat = function(t) {
-    return t.toFixed(precision);
-  };
-
-  /**
-   * "Nices" this scale, extending the bounds of the input domain to
-   * evenly-rounded values. Nicing is useful if the domain is computed
-   * dynamically from data, and may be irregular. For example, given a domain of
-   * [0.20147987687960267, 0.996679553296417], a call to <tt>nice()</tt> might
-   * extend the domain to [0.2, 1].
-   *
-   * <p>This method must be invoked each time after setting the domain.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.nice
-   * @returns {pv.Scale.linear} <tt>this</tt>.
-   */
-  scale.nice = function() {
-    var min = d[0],
-        max = d[d.length - 1],
-        step = Math.pow(10, Math.round(Math.log(max - min) / Math.log(10)) - 1);
-    d = [Math.floor(min / step) * step, Math.ceil(max / step) * step];
-    return this;
-  };
-
-  /**
-   * Returns a view of this scale by the specified accessor function <tt>f</tt>.
-   * Given a scale <tt>y</tt>, <tt>y.by(function(d) d.foo)</tt> is equivalent to
-   * <tt>function(d) y(d.foo)</tt>.
-   *
-   * <p>This method is provided for convenience, such that scales can be
-   * succinctly defined inline. For example, given an array of data elements
-   * that have a <tt>score</tt> attribute with the domain [0, 1], the height
-   * property could be specified as:
-   *
-   * <pre>.height(pv.Scale.linear().range(0, 480).by(function(d) d.score))</pre>
-   *
-   * This is equivalent to:
-   *
-   * <pre>.height(function(d) d.score * 480)</pre>
-   *
-   * This method should be used judiciously; it is typically more clear to
-   * invoke the scale directly, passing in the value to be scaled.
-   *
-   * @function
-   * @name pv.Scale.linear.prototype.by
-   * @param {function} f an accessor function.
-   * @returns {pv.Scale.linear} a view of this scale by the specified accessor
-   * function.
-   */
-  scale.by = function(f) {
-    function by() { return scale(f.apply(this, arguments)); }
-    for (var method in scale) by[method] = scale[method];
-    return by;
-  };
-
-  scale.domain.apply(scale, arguments);
-  return scale;
-};

+ 0 - 316
ext/thirdparty/js/protovis/js/data/LogScale.js

@@ -1,316 +0,0 @@
-/**
- * Returns a log scale for the specified domain. The arguments to this
- * constructor are optional, and equivalent to calling {@link #domain}.
- *
- * @class Represents a log scale. <style
- * type="text/css">sub{line-height:0}</style> <img src="../log.png"
- * width="190" height="175" align="right"> Most commonly, a log scale represents
- * a 1-dimensional log transformation from a numeric domain of input data
- * [<i>d<sub>0</sub></i>, <i>d<sub>1</sub></i>] to a numeric range of pixels
- * [<i>r<sub>0</sub></i>, <i>r<sub>1</sub></i>]. The equation for such a scale
- * is:
- *
- * <blockquote><i>f(x) = (log(x) - log(d<sub>0</sub>)) / (log(d<sub>1</sub>) -
- * log(d<sub>0</sub>)) * (r<sub>1</sub> - r<sub>0</sub>) +
- * r<sub>0</sub></i></blockquote>
- *
- * where <i>log(x)</i> represents the zero-symmetric logarthim of <i>x</i> using
- * the scale's associated base (default: 10, see {@link pv.logSymmetric}). For
- * example, a log scale from the domain [1, 100] to range [0, 640]:
- *
- * <blockquote><i>f(x) = (log(x) - log(1)) / (log(100) - log(1)) * (640 - 0) + 0</i><br>
- * <i>f(x) = log(x) / 2 * 640</i><br>
- * <i>f(x) = log(x) * 320</i><br>
- * </blockquote>
- *
- * Thus, saying
- *
- * <pre>.height(function(d) Math.log(d) * 138.974)</pre>
- *
- * is equivalent to
- *
- * <pre>.height(pv.Scale.log(1, 100).range(0, 640))</pre>
- *
- * As you can see, scales do not always make code smaller, but they should make
- * code more explicit and easier to maintain. In addition to readability, scales
- * offer several useful features:
- *
- * <p>1. The range can be expressed in colors, rather than pixels. Changing the
- * example above to
- *
- * <pre>.fillStyle(pv.Scale.log(1, 100).range("red", "green"))</pre>
- *
- * will cause it to fill the marks "red" on an input value of 1, "green" on an
- * input value of 100, and some color in-between for intermediate values.
- *
- * <p>2. The domain and range can be subdivided for a "poly-log"
- * transformation. For example, you may want a diverging color scale that is
- * increasingly red for small values, and increasingly green for large values:
- *
- * <pre>.fillStyle(pv.Scale.log(1, 10, 100).range("red", "white", "green"))</pre>
- *
- * The domain can be specified as a series of <i>n</i> monotonically-increasing
- * values; the range must also be specified as <i>n</i> values, resulting in
- * <i>n - 1</i> contiguous log scales.
- *
- * <p>3. Log scales can be inverted for interaction. The {@link #invert} method
- * takes a value in the output range, and returns the corresponding value in the
- * input domain. This is frequently used to convert the mouse location (see
- * {@link pv.Mark#mouse}) to a value in the input domain. Note that inversion is
- * only supported for numeric ranges, and not colors.
- *
- * <p>4. A scale can be queried for reasonable "tick" values. The {@link #ticks}
- * method provides a convenient way to get a series of evenly-spaced rounded
- * values in the input domain. Frequently these are used in conjunction with
- * {@link pv.Rule} to display tick marks or grid lines.
- *
- * <p>5. A scale can be "niced" to extend the domain to suitable rounded
- * numbers. If the minimum and maximum of the domain are messy because they are
- * derived from data, you can use {@link #nice} to round these values down and
- * up to even numbers.
- *
- * @param {number...} domain... domain values.
- * @returns {pv.Scale.log} a log scale.
- */
-pv.Scale.log = function() {
-  var d = [1, 10], l = [0, 1], b = 10, r = [0, 1], i = [pv.identity];
-
-  /** @private */
-  function scale(x) {
-    var j = pv.search(d, x);
-    if (j < 0) j = -j - 2;
-    j = Math.max(0, Math.min(i.length - 1, j));
-    return i[j]((log(x) - l[j]) / (l[j + 1] - l[j]));
-  }
-
-  /** @private */
-  function log(x) {
-    return pv.logSymmetric(x, b);
-  }
-
-  /**
-   * Sets or gets the input domain. This method can be invoked several ways:
-   *
-   * <p>1. <tt>domain(min, ..., max)</tt>
-   *
-   * <p>Specifying the domain as a series of numbers is the most explicit and
-   * recommended approach. Most commonly, two numbers are specified: the minimum
-   * and maximum value. However, for a diverging scale, or other subdivided
-   * poly-log scales, multiple values can be specified. Values can be derived
-   * from data using {@link pv.min} and {@link pv.max}. For example:
-   *
-   * <pre>.domain(1, pv.max(array))</pre>
-   *
-   * An alternative method for deriving minimum and maximum values from data
-   * follows.
-   *
-   * <p>2. <tt>domain(array, minf, maxf)</tt>
-   *
-   * <p>When both the minimum and maximum value are derived from data, the
-   * arguments to the <tt>domain</tt> method can be specified as the array of
-   * data, followed by zero, one or two accessor functions. For example, if the
-   * array of data is just an array of numbers:
-   *
-   * <pre>.domain(array)</pre>
-   *
-   * On the other hand, if the array elements are objects representing stock
-   * values per day, and the domain should consider the stock's daily low and
-   * daily high:
-   *
-   * <pre>.domain(array, function(d) d.low, function(d) d.high)</pre>
-   *
-   * The first method of setting the domain is preferred because it is more
-   * explicit; setting the domain using this second method should be used only
-   * if brevity is required.
-   *
-   * <p>3. <tt>domain()</tt>
-   *
-   * <p>Invoking the <tt>domain</tt> method with no arguments returns the
-   * current domain as an array of numbers.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.domain
-   * @param {number...} domain... domain values.
-   * @returns {pv.Scale.log} <tt>this</tt>, or the current domain.
-   */
-  scale.domain = function(array, min, max) {
-    if (arguments.length) {
-      if (array instanceof Array) {
-        if (arguments.length < 2) min = pv.identity;
-        if (arguments.length < 3) max = min;
-        d = [pv.min(array, min), pv.max(array, max)];
-      } else {
-        d = Array.prototype.slice.call(arguments);
-      }
-      l = d.map(log);
-      return this;
-    }
-    return d;
-  };
-
-  /**
-   * @function
-   * @name pv.Scale.log.prototype.range
-   * @param {...} range... range values.
-   * @returns {pv.Scale.log} <tt>this</tt>.
-   */
-  scale.range = function() {
-    if (arguments.length) {
-      r = Array.prototype.slice.call(arguments);
-      i = [];
-      for (var j = 0; j < r.length - 1; j++) {
-        i.push(pv.Scale.interpolator(r[j], r[j + 1]));
-      }
-      return this;
-    }
-    return r;
-  };
-
-  /**
-   * Sets or gets the output range. This method can be invoked several ways:
-   *
-   * <p>1. <tt>range(min, ..., max)</tt>
-   *
-   * <p>The range may be specified as a series of numbers or colors. Most
-   * commonly, two numbers are specified: the minimum and maximum pixel values.
-   * For a color scale, values may be specified as {@link pv.Color}s or
-   * equivalent strings. For a diverging scale, or other subdivided poly-log
-   * scales, multiple values can be specified. For example:
-   *
-   * <pre>.range("red", "white", "green")</pre>
-   *
-   * <p>Currently, only numbers and colors are supported as range values. The
-   * number of range values must exactly match the number of domain values, or
-   * the behavior of the scale is undefined.
-   *
-   * <p>2. <tt>range()</tt>
-   *
-   * <p>Invoking the <tt>range</tt> method with no arguments returns the current
-   * range as an array of numbers or colors.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.invert
-   * @param {...} range... range values.
-   * @returns {pv.Scale.log} <tt>this</tt>, or the current range.
-   */
-  scale.invert = function(y) {
-    var j = pv.search(r, y);
-    if (j < 0) j = -j - 2;
-    j = Math.max(0, Math.min(i.length - 1, j));
-    var t = l[j] + (y - r[j]) / (r[j + 1] - r[j]) * (l[j + 1] - l[j]);
-    return (d[j] < 0) ? -Math.pow(b, -t) : Math.pow(b, t);
-  };
-
-  /**
-   * Returns an array of evenly-spaced, suitably-rounded values in the input
-   * domain. These values are frequently used in conjunction with {@link
-   * pv.Rule} to display tick marks or grid lines.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.ticks
-   * @returns {number[]} an array input domain values to use as ticks.
-   */
-  scale.ticks = function() {
-    // TODO: support multiple domains
-    var start = Math.floor(l[0]),
-        end = Math.ceil(l[1]),
-        ticks = [];
-    for (var i = start; i < end; i++) {
-      var x = Math.pow(b, i);
-      if (d[0] < 0) x = -x;
-      for (var j = 1; j < b; j++) {
-        ticks.push(x * j);
-      }
-    }
-    ticks.push(Math.pow(b, end));
-    if (ticks[0] < d[0]) ticks.shift();
-    if (ticks[ticks.length - 1] > d[1]) ticks.pop();
-    return ticks;
-  };
-
-  /**
-   * Formats the specified tick value using the appropriate precision, assuming
-   * base 10.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.tickFormat
-   * @param {number} t a tick value.
-   * @return {string} a formatted tick value.
-   */
-  scale.tickFormat = function(t) {
-    return t.toPrecision(1);
-  };
-
-  /**
-   * "Nices" this scale, extending the bounds of the input domain to
-   * evenly-rounded values. This method uses {@link pv.logFloor} and {@link
-   * pv.logCeil}. Nicing is useful if the domain is computed dynamically from
-   * data, and may be irregular. For example, given a domain of
-   * [0.20147987687960267, 0.996679553296417], a call to <tt>nice()</tt> might
-   * extend the domain to [0.1, 1].
-   *
-   * <p>This method must be invoked each time after setting the domain (and
-   * base).
-   *
-   * @function
-   * @name pv.Scale.log.prototype.nice
-   * @returns {pv.Scale.log} <tt>this</tt>.
-   */
-  scale.nice = function() {
-    // TODO: support multiple domains
-    d = [pv.logFloor(d[0], b), pv.logCeil(d[1], b)];
-    l = d.map(log);
-    return this;
-  };
-
-  /**
-   * Sets or gets the logarithm base. Defaults to 10.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.base
-   * @param {number} [v] the new base.
-   * @returns {pv.Scale.log} <tt>this</tt>, or the current base.
-   */
-  scale.base = function(v) {
-    if (arguments.length) {
-      b = v;
-      l = d.map(log);
-      return this;
-    }
-    return b;
-  };
-
-  /**
-   * Returns a view of this scale by the specified accessor function <tt>f</tt>.
-   * Given a scale <tt>y</tt>, <tt>y.by(function(d) d.foo)</tt> is equivalent to
-   * <tt>function(d) y(d.foo)</tt>.
-   *
-   * <p>This method is provided for convenience, such that scales can be
-   * succinctly defined inline. For example, given an array of data elements
-   * that have a <tt>score</tt> attribute with the domain [0, 1], the height
-   * property could be specified as:
-   *
-   * <pre>.height(pv.Scale.log().range(0, 480).by(function(d) d.score))</pre>
-   *
-   * This is equivalent to:
-   *
-   * <pre>.height(function(d) d.score * 480)</pre>
-   *
-   * This method should be used judiciously; it is typically more clear to
-   * invoke the scale directly, passing in the value to be scaled.
-   *
-   * @function
-   * @name pv.Scale.log.prototype.by
-   * @param {function} f an accessor function.
-   * @returns {pv.Scale.log} a view of this scale by the specified accessor
-   * function.
-   */
-  scale.by = function(f) {
-    function by() { return scale(f.apply(this, arguments)); }
-    for (var method in scale) by[method] = scale[method];
-    return by;
-  };
-
-  scale.domain.apply(scale, arguments);
-  return scale;
-};

+ 0 - 257
ext/thirdparty/js/protovis/js/data/Nest.js

@@ -1,257 +0,0 @@
-/**
- * Returns a {@link pv.Nest} operator for the specified array. This is a
- * convenience factory method, equivalent to <tt>new pv.Nest(array)</tt>.
- *
- * @see pv.Nest
- * @param {array} array an array of elements to nest.
- * @returns {pv.Nest} a nest operator for the specified array.
- */
-pv.nest = function(array) {
-  return new pv.Nest(array);
-};
-
-/**
- * Constructs a nest operator for the specified array. This constructor should
- * not be invoked directly; use {@link pv.nest} instead.
- *
- * @class Represents a {@link Nest} operator for the specified array. Nesting
- * allows elements in an array to be grouped into a hierarchical tree
- * structure. The levels in the tree are specified by <i>key</i> functions. The
- * leaf nodes of the tree can be sorted by value, while the internal nodes can
- * be sorted by key. Finally, the tree can be returned either has a
- * multidimensional array via {@link #entries}, or as a hierarchical map via
- * {@link #map}. The {@link #rollup} routine similarly returns a map, collapsing
- * the elements in each leaf node using a summary function.
- *
- * <p>For example, consider the following tabular data structure of Barley
- * yields, from various sites in Minnesota during 1931-2:
- *
- * <pre>{ yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- * { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- * { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" }, ...</pre>
- *
- * To facilitate visualization, it may be useful to nest the elements first by
- * year, and then by variety, as follows:
- *
- * <pre>var nest = pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .entries();</pre>
- *
- * This returns a nested array. Each element of the outer array is a key-values
- * pair, listing the values for each distinct key:
- *
- * <pre>{ key: 1931, values: [
- *   { key: "Manchuria", values: [
- *       { yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- *       { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- *       { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" },
- *       ...
- *     ] },
- *   { key: "Glabron", values: [
- *       { yield: 43.07, variety: "Glabron", year: 1931, site: "University Farm" },
- *       { yield: 55.20, variety: "Glabron", year: 1931, site: "Waseca" },
- *       ...
- *     ] },
- *   ] },
- * { key: 1932, values: ... }</pre>
- *
- * Further details, including sorting and rollup, is provided below on the
- * corresponding methods.
- *
- * @param {array} array an array of elements to nest.
- */
-pv.Nest = function(array) {
-  this.array = array;
-  this.keys = [];
-};
-
-/**
- * Nests using the specified key function. Multiple keys may be added to the
- * nest; the array elements will be nested in the order keys are specified.
- *
- * @param {function} key a key function; must return a string or suitable map
- * key.
- * @return {pv.Nest} this.
- */
-pv.Nest.prototype.key = function(key) {
-  this.keys.push(key);
-  return this;
-};
-
-/**
- * Sorts the previously-added keys. The natural sort order is used by default
- * (see {@link pv.naturalOrder}); if an alternative order is desired,
- * <tt>order</tt> should be a comparator function. If this method is not called
- * (i.e., keys are <i>unsorted</i>), keys will appear in the order they appear
- * in the underlying elements array. For example,
- *
- * <pre>pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortKeys()
- *     .entries()</pre>
- *
- * groups yield data by year, then variety, and sorts the variety groups
- * lexicographically (since the variety attribute is a string).
- *
- * <p>Key sort order is only used in conjunction with {@link #entries}, which
- * returns an array of key-values pairs. If the nest is used to construct a
- * {@link #map} instead, keys are unsorted.
- *
- * @param {function} [order] an optional comparator function.
- * @returns {pv.Nest} this.
- */
-pv.Nest.prototype.sortKeys = function(order) {
-  this.keys[this.keys.length - 1].order = order || pv.naturalOrder;
-  return this;
-};
-
-/**
- * Sorts the leaf values. The natural sort order is used by default (see
- * {@link pv.naturalOrder}); if an alternative order is desired, <tt>order</tt>
- * should be a comparator function. If this method is not called (i.e., values
- * are <i>unsorted</i>), values will appear in the order they appear in the
- * underlying elements array. For example,
- *
- * <pre>pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortValues(function(a, b) a.yield - b.yield)
- *     .entries()</pre>
- *
- * groups yield data by year, then variety, and sorts the values for each
- * variety group by yield.
- *
- * <p>Value sort order, unlike keys, applies to both {@link #entries} and
- * {@link #map}. It has no effect on {@link #rollup}.
- *
- * @param {function} [order] an optional comparator function.
- * @return {pv.Nest} this.
- */
-pv.Nest.prototype.sortValues = function(order) {
-  this.order = order || pv.naturalOrder;
-  return this;
-};
-
-/**
- * Returns a hierarchical map of values. Each key adds one level to the
- * hierarchy. With only a single key, the returned map will have a key for each
- * distinct value of the key function; the correspond value with be an array of
- * elements with that key value. If a second key is added, this will be a nested
- * map. For example:
- *
- * <pre>pv.nest(yields)
- *     .key(function(d) d.variety)
- *     .key(function(d) d.site)
- *     .map()</pre>
- *
- * returns a map <tt>m</tt> such that <tt>m[variety][site]</tt> is an array, a subset of
- * <tt>yields</tt>, with each element having the given variety and site.
- *
- * @returns a hierarchical map of values.
- */
-pv.Nest.prototype.map = function() {
-  var map = {}, values = [];
-
-  /* Build the map. */
-  for (var i, j = 0; j < this.array.length; j++) {
-    var x = this.array[j];
-    var m = map;
-    for (i = 0; i < this.keys.length - 1; i++) {
-      var k = this.keys[i](x);
-      if (!m[k]) m[k] = {};
-      m = m[k];
-    }
-    k = this.keys[i](x);
-    if (!m[k]) {
-      var a = [];
-      values.push(a);
-      m[k] = a;
-    }
-    m[k].push(x);
-  }
-
-  /* Sort each leaf array. */
-  if (this.order) {
-    for (var i = 0; i < values.length; i++) {
-      values[i].sort(this.order);
-    }
-  }
-
-  return map;
-};
-
-/**
- * Returns a hierarchical nested array. This method is similar to
- * {@link pv.entries}, but works recursively on the entire hierarchy. Rather
- * than returning a map like {@link #map}, this method returns a nested
- * array. Each element of the array has a <tt>key</tt> and <tt>values</tt>
- * field. For leaf nodes, the <tt>values</tt> array will be a subset of the
- * underlying elements array; for non-leaf nodes, the <tt>values</tt> array will
- * contain more key-values pairs.
- *
- * <p>For an example usage, see the {@link Nest} constructor.
- *
- * @returns a hierarchical nested array.
- */
-pv.Nest.prototype.entries = function() {
-
-  /** Recursively extracts the entries for the given map. */
-  function entries(map) {
-    var array = [];
-    for (var k in map) {
-      var v = map[k];
-      array.push({ key: k, values: (v instanceof Array) ? v : entries(v) });
-    };
-    return array;
-  }
-
-  /** Recursively sorts the values for the given key-values array. */
-  function sort(array, i) {
-    var o = this.keys[i].order;
-    if (o) array.sort(function(a, b) { return o(a.key, b.key); });
-    if (++i < this.keys.length) {
-      for (var j = 0; j < array.length; j++) {
-        sort.call(this, array[j].values, i);
-      }
-    }
-    return array;
-  }
-
-  return sort.call(this, entries(this.map()), 0);
-};
-
-/**
- * Returns a rollup map. The behavior of this method is the same as
- * {@link #map}, except that the leaf values are replaced with the return value
- * of the specified rollup function <tt>f</tt>. For example,
- *
- * <pre>pv.nest(yields)
- *      .key(function(d) d.site)
- *      .rollup(function(v) pv.median(v, function(d) d.yield))</pre>
- *
- * first groups yield data by site, and then returns a map from site to median
- * yield for the given site.
- *
- * @see #map
- * @param {function} f a rollup function.
- * @returns a hierarchical map, with the leaf values computed by <tt>f</tt>.
- */
-pv.Nest.prototype.rollup = function(f) {
-
-  /** Recursively descends to the leaf nodes (arrays) and does rollup. */
-  function rollup(map) {
-    for (var key in map) {
-      var value = map[key];
-      if (value instanceof Array) {
-        map[key] = f(value);
-      } else {
-        rollup(value);
-      }
-    }
-    return map;
-  }
-
-  return rollup(this.map());
-};

+ 0 - 267
ext/thirdparty/js/protovis/js/data/OrdinalScale.js

@@ -1,267 +0,0 @@
-/**
- * Returns an ordinal scale for the specified domain. The arguments to this
- * constructor are optional, and equivalent to calling {@link #domain}.
- *
- * @class Represents an ordinal scale. <style
- * type="text/css">sub{line-height:0}</style> An ordinal scale represents a
- * pairwise mapping from <i>n</i> discrete values in the input domain to
- * <i>n</i> discrete values in the output range. For example, an ordinal scale
- * might map a domain of species ["setosa", "versicolor", "virginica"] to colors
- * ["red", "green", "blue"]. Thus, saying
- *
- * <pre>.fillStyle(function(d) {
- *     switch (d.species) {
- *       case "setosa": return "red";
- *       case "versicolor": return "green";
- *       case "virginica": return "blue";
- *     }
- *   })</pre>
- *
- * is equivalent to
- *
- * <pre>.fillStyle(pv.Scale.ordinal("setosa", "versicolor", "virginica")
- *     .range("red", "green", "blue")
- *     .by(function(d) d.species))</pre>
- *
- * If the mapping from species to color does not need to be specified
- * explicitly, the domain can be omitted. In this case it will be inferred
- * lazily from the data:
- *
- * <pre>.fillStyle(pv.colors("red", "green", "blue")
- *     .by(function(d) d.species))</pre>
- *
- * When the domain is inferred, the first time the scale is invoked, the first
- * element from the range will be returned. Subsequent calls with unique values
- * will return subsequent elements from the range. If the inferred domain grows
- * larger than the range, range values will be reused. However, it is strongly
- * recommended that the domain and the range contain the same number of
- * elements.
- *
- * <p>A range can be discretized from a continuous interval (e.g., for pixel
- * positioning) by using {@link #split}, {@link #splitFlush} or
- * {@link #splitBanded} after the domain has been set. For example, if
- * <tt>states</tt> is an array of the fifty U.S. state names, the state name can
- * be encoded in the left position:
- *
- * <pre>.left(pv.Scale.ordinal(states)
- *     .split(0, 640)
- *     .by(function(d) d.state))</pre>
- *
- * <p>N.B.: ordinal scales are not invertible (at least not yet), since the
- * domain and range and discontinuous. A workaround is to use a linear scale.
- *
- * @param {...} domain... domain values.
- * @returns {pv.Scale.ordinal} an ordinal scale.
- * @see pv.colors
- */
-pv.Scale.ordinal = function() {
-  var d = [], i = {}, r = [], band = 0;
-
-  /** @private */
-  function scale(x) {
-    if (!(x in i)) i[x] = d.push(x) - 1;
-    return r[i[x] % r.length];
-  }
-
-  /**
-   * Sets or gets the input domain. This method can be invoked several ways:
-   *
-   * <p>1. <tt>domain(values...)</tt>
-   *
-   * <p>Specifying the domain as a series of values is the most explicit and
-   * recommended approach. However, if the domain values are derived from data,
-   * you may find the second method more appropriate.
-   *
-   * <p>2. <tt>domain(array, f)</tt>
-   *
-   * <p>Rather than enumerating the domain values as explicit arguments to this
-   * method, you can specify a single argument of an array. In addition, you can
-   * specify an optional accessor function to extract the domain values from the
-   * array.
-   *
-   * <p>3. <tt>domain()</tt>
-   *
-   * <p>Invoking the <tt>domain</tt> method with no arguments returns the
-   * current domain as an array.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.domain
-   * @param {...} domain... domain values.
-   * @returns {pv.Scale.ordinal} <tt>this</tt>, or the current domain.
-   */
-  scale.domain = function(array, f) {
-    if (arguments.length) {
-      array = (array instanceof Array)
-          ? ((arguments.length > 1) ? map(array, f) : array)
-          : Array.prototype.slice.call(arguments);
-
-      /* Filter the specified ordinals to their unique values. */
-      d = [];
-      var seen = {};
-      for (var j = 0; j < array.length; j++) {
-        var o = array[j];
-        if (!(o in seen)) {
-          seen[o] = true;
-          d.push(o);
-        }
-      }
-
-      i = pv.numerate(d);
-      return this;
-    }
-    return d;
-  };
-
-  /**
-   * Sets or gets the output range. This method can be invoked several ways:
-   *
-   * <p>1. <tt>range(values...)</tt>
-   *
-   * <p>Specifying the range as a series of values is the most explicit and
-   * recommended approach. However, if the range values are derived from data,
-   * you may find the second method more appropriate.
-   *
-   * <p>2. <tt>range(array, f)</tt>
-   *
-   * <p>Rather than enumerating the range values as explicit arguments to this
-   * method, you can specify a single argument of an array. In addition, you can
-   * specify an optional accessor function to extract the range values from the
-   * array.
-   *
-   * <p>3. <tt>range()</tt>
-   *
-   * <p>Invoking the <tt>range</tt> method with no arguments returns the
-   * current range as an array.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.range
-   * @param {...} range... range values.
-   * @returns {pv.Scale.ordinal} <tt>this</tt>, or the current range.
-   */
-  scale.range = function(array, f) {
-    if (arguments.length) {
-      r = (array instanceof Array)
-          ? ((arguments.length > 1) ? map(array, f) : array)
-          : Array.prototype.slice.call(arguments);
-      if (typeof r[0] == "string") r = r.map(pv.color);
-      return this;
-    }
-    return r;
-  };
-
-  /**
-   * Sets the range from the given continuous interval. The interval
-   * [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced points,
-   * where <i>n</i> is the number of (unique) values in the domain. The first
-   * and last point are offset from the edge of the range by half the distance
-   * between points.
-   *
-   * <p>This method must be called <i>after</i> the domain is set.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.split
-   * @param {number} min minimum value of the output range.
-   * @param {number} max maximum value of the output range.
-   * @returns {pv.Scale.ordinal} <tt>this</tt>.
-   * @see #splitFlush
-   * @see #splitBanded
-   */
-  scale.split = function(min, max) {
-    var step = (max - min) / this.domain().length;
-    r = pv.range(min + step / 2, max, step);
-    return this;
-  };
-
-  /**
-   * Sets the range from the given continuous interval. The interval
-   * [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced points,
-   * where <i>n</i> is the number of (unique) values in the domain. The first
-   * and last point are exactly on the edge of the range.
-   *
-   * <p>This method must be called <i>after</i> the domain is set.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.splitFlush
-   * @param {number} min minimum value of the output range.
-   * @param {number} max maximum value of the output range.
-   * @returns {pv.Scale.ordinal} <tt>this</tt>.
-   * @see #split
-   */
-  scale.splitFlush = function(min, max) {
-    var n = this.domain().length, step = (max - min) / (n - 1);
-    r = (n == 1) ? [(min + max) / 2]
-        : pv.range(min, max + step / 2, step);
-    return this;
-  };
-
-  /**
-   * Sets the range from the given continuous interval. The interval
-   * [<i>min</i>, <i>max</i>] is subdivided into <i>n</i> equispaced bands,
-   * where <i>n</i> is the number of (unique) values in the domain. The first
-   * and last band are offset from the edge of the range by the distance between
-   * bands.
-   *
-   * <p>The band width argument, <tt>band</tt>, is typically in the range [0, 1]
-   * and defaults to 1. This fraction corresponds to the amount of space in the
-   * range to allocate to the bands, as opposed to padding. A value of 0.5 means
-   * that the band width will be equal to the padding width. The computed
-   * absolute band width can be retrieved from the range as
-   * <tt>scale.range().band</tt>.
-   *
-   * <p>If the band width argument is negative, this method will allocate bands
-   * of a <i>fixed</i> width <tt>-band</tt>, rather than a relative fraction of
-   * the available space.
-   *
-   * <p>Tip: to inset the bands by a fixed amount <tt>p</tt>, specify a minimum
-   * value of <tt>min + p</tt> (or simply <tt>p</tt>, if <tt>min</tt> is
-   * 0). Then set the mark width to <tt>scale.range().band - p</tt>.
-   *
-   * <p>This method must be called <i>after</i> the domain is set.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.splitBanded
-   * @param {number} min minimum value of the output range.
-   * @param {number} max maximum value of the output range.
-   * @param {number} [band] the fractional band width in [0, 1]; defaults to 1.
-   * @returns {pv.Scale.ordinal} <tt>this</tt>.
-   * @see #split
-   */
-  scale.splitBanded = function(min, max, band) {
-    if (arguments.length < 3) band = 1;
-    if (band < 0) {
-      var n = this.domain().length,
-          total = -band * n,
-          remaining = max - min - total,
-          padding = remaining / (n + 1);
-      r = pv.range(min + padding, max, padding - band);
-      r.band = -band;
-    } else {
-      var step = (max - min) / (this.domain().length + (1 - band));
-      r = pv.range(min + step * (1 - band), max, step);
-      r.band = step * band;
-    }
-    return this;
-  };
-
-  /**
-   * Returns a view of this scale by the specified accessor function <tt>f</tt>.
-   * Given a scale <tt>y</tt>, <tt>y.by(function(d) d.foo)</tt> is equivalent to
-   * <tt>function(d) y(d.foo)</tt>. This method should be used judiciously; it
-   * is typically more clear to invoke the scale directly, passing in the value
-   * to be scaled.
-   *
-   * @function
-   * @name pv.Scale.ordinal.prototype.by
-   * @param {function} f an accessor function.
-   * @returns {pv.Scale.ordinal} a view of this scale by the specified accessor
-   * function.
-   */
-  scale.by = function(f) {
-    function by() { return scale(f.apply(this, arguments)); }
-    for (var method in scale) by[method] = scale[method];
-    return by;
-  };
-
-  scale.domain.apply(scale, arguments);
-  return scale;
-};

+ 0 - 36
ext/thirdparty/js/protovis/js/data/Scale.js

@@ -1,36 +0,0 @@
-// TODO code-sharing between scales
-
-/**
- * @ignore
- * @class
- */
-pv.Scale = function() {};
-
-/**
- * @private Returns a function that interpolators from the start value to the
- * end value, given a parameter <i>t</i> in [0, 1].
- *
- * @param start the start value.
- * @param end the end value.
- */
-pv.Scale.interpolator = function(start, end) {
-  if (typeof start == "number") {
-    return function(t) {
-      return t * (end - start) + start;
-    };
-  }
-
-  /* For now, assume color. */
-  start = pv.color(start).rgb();
-  end = pv.color(end).rgb();
-  return function(t) {
-    var a = start.a * (1 - t) + end.a * t;
-    if (a < 1e-5) a = 0; // avoid scientific notation
-    return (start.a == 0) ? pv.rgb(end.r, end.g, end.b, a)
-        : ((end.a == 0) ? pv.rgb(start.r, start.g, start.b, a)
-        : pv.rgb(
-            Math.round(start.r * (1 - t) + end.r * t),
-            Math.round(start.g * (1 - t) + end.g * t),
-            Math.round(start.b * (1 - t) + end.b * t), a));
-  };
-};

+ 0 - 124
ext/thirdparty/js/protovis/js/data/Tree.js

@@ -1,124 +0,0 @@
-/**
- * Returns a {@link pv.Tree} operator for the specified array. This is a
- * convenience factory method, equivalent to <tt>new pv.Tree(array)</tt>.
- *
- * @see pv.Tree
- * @param {array} array an array from which to construct a tree.
- * @returns {pv.Tree} a tree operator for the specified array.
- */
-pv.tree = function(array) {
-  return new pv.Tree(array);
-};
-
-/**
- * Constructs a tree operator for the specified array. This constructor should
- * not be invoked directly; use {@link pv.tree} instead.
- *
- * @class Represents a tree operator for the specified array. The tree operator
- * allows a hierarchical map to be constructed from an array; it is similar to
- * the {@link pv.Nest} operator, except the hierarchy is derived dynamically
- * from the array elements.
- *
- * <p>For example, given an array of size information for ActionScript classes:
- *
- * <pre>{ name: "flare.flex.FlareVis", size: 4116 },
- * { name: "flare.physics.DragForce", size: 1082 },
- * { name: "flare.physics.GravityForce", size: 1336 }, ...</pre>
- *
- * To facilitate visualization, it may be useful to nest the elements by their
- * package hierarchy:
- *
- * <pre>var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .map();</pre>
- *
- * The resulting tree is:
- *
- * <pre>{ flare: {
- *     flex: {
- *       FlareVis: {
- *         name: "flare.flex.FlareVis",
- *         size: 4116 } },
- *     physics: {
- *       DragForce: {
- *         name: "flare.physics.DragForce",
- *         size: 1082 },
- *       GravityForce: {
- *         name: "flare.physics.GravityForce",
- *         size: 1336 } },
- *     ... } }</pre>
- *
- * By specifying a value function,
- *
- * <pre>var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .value(function(d) d.size)
- *     .map();</pre>
- *
- * we can further eliminate redundant data:
- *
- * <pre>{ flare: {
- *     flex: {
- *       FlareVis: 4116 },
- *     physics: {
- *       DragForce: 1082,
- *       GravityForce: 1336 },
- *   ... } }</pre>
- *
- * For visualizations with large data sets, performance improvements may be seen
- * by storing the data in a tree format, and then flattening it into an array at
- * runtime with {@link pv.Flatten}.
- *
- * @param {array} array an array from which to construct a tree.
- */
-pv.Tree = function(array) {
-  this.array = array;
-};
-
-/**
- * Assigns a <i>keys</i> function to this operator; required. The keys function
- * returns an array of <tt>string</tt>s for each element in the associated
- * array; these keys determine how the elements are nested in the tree. The
- * returned keys should be unique for each element in the array; otherwise, the
- * behavior of this operator is undefined.
- *
- * @param {function} k the keys function.
- * @returns {pv.Tree} this.
- */
-pv.Tree.prototype.keys = function(k) {
-  this.k = k;
-  return this;
-};
-
-/**
- * Assigns a <i>value</i> function to this operator; optional. The value
- * function specifies an optional transformation of the element in the array
- * before it is inserted into the map. If no value function is specified, it is
- * equivalent to using the identity function.
- *
- * @param {function} k the value function.
- * @returns {pv.Tree} this.
- */
-pv.Tree.prototype.value = function(v) {
-  this.v = v;
-  return this;
-};
-
-/**
- * Returns a hierarchical map of values. The hierarchy is determined by the keys
- * function; the values in the map are determined by the value function.
- *
- * @returns a hierarchical map of values.
- */
-pv.Tree.prototype.map = function() {
-  var map = {}, o = {};
-  for (var i = 0; i < this.array.length; i++) {
-    o.index = i;
-    var value = this.array[i], keys = this.k.call(o, value), node = map;
-    for (var j = 0; j < keys.length - 1; j++) {
-      node = node[keys[j]] || (node[keys[j]] = {});
-    }
-    node[keys[j]] = this.v ? this.v.call(o, value) : value;
-  }
-  return map;
-};

+ 0 - 115
ext/thirdparty/js/protovis/js/data/Vector.js

@@ -1,115 +0,0 @@
-/**
- * Returns a {@link pv.Vector} for the specified <i>x</i> and <i>y</i>
- * coordinate. This is a convenience factory method, equivalent to <tt>new
- * pv.Vector(x, y)</tt>.
- *
- * @see pv.Vector
- * @param {number} x the <i>x</i> coordinate.
- * @param {number} y the <i>y</i> coordinate.
- * @returns {pv.Vector} a vector for the specified coordinates.
- */
-pv.vector = function(x, y) {
-  return new pv.Vector(x, y);
-};
-
-/**
- * Constructs a {@link pv.Vector} for the specified <i>x</i> and <i>y</i>
- * coordinate. This constructor should not be invoked directly; use
- * {@link pv.vector} instead.
- *
- * @class Represents a two-dimensional vector; a 2-tuple <i>&#x27e8;x,
- * y&#x27e9;</i>.
- *
- * @param {number} x the <i>x</i> coordinate.
- * @param {number} y the <i>y</i> coordinate.
- */
-pv.Vector = function(x, y) {
-  this.x = x;
-  this.y = y;
-};
-
-/**
- * Returns a vector perpendicular to this vector: <i>&#x27e8;-y, x&#x27e9;</i>.
- *
- * @returns {pv.Vector} a perpendicular vector.
- */
-pv.Vector.prototype.perp = function() {
-  return new pv.Vector(-this.y, this.x);
-};
-
-/**
- * Returns a normalized copy of this vector: a vector with the same direction,
- * but unit length. If this vector has zero length this method returns a copy of
- * this vector.
- *
- * @returns {pv.Vector} a unit vector.
- */
-pv.Vector.prototype.norm = function() {
-  var l = this.length();
-  return this.times(l ? (1 / l) : 1);
-};
-
-/**
- * Returns the magnitude of this vector, defined as <i>sqrt(x * x + y * y)</i>.
- *
- * @returns {number} a length.
- */
-pv.Vector.prototype.length = function() {
-  return Math.sqrt(this.x * this.x + this.y * this.y);
-};
-
-/**
- * Returns a scaled copy of this vector: <i>&#x27e8;x * k, y * k&#x27e9;</i>.
- * To perform the equivalent divide operation, use <i>1 / k</i>.
- *
- * @param {number} k the scale factor.
- * @returns {pv.Vector} a scaled vector.
- */
-pv.Vector.prototype.times = function(k) {
-  return new pv.Vector(this.x * k, this.y * k);
-};
-
-/**
- * Returns this vector plus the vector <i>v</i>: <i>&#x27e8;x + v.x, y +
- * v.y&#x27e9;</i>. If only one argument is specified, it is interpreted as the
- * vector <i>v</i>.
- *
- * @param {number} x the <i>x</i> coordinate to add.
- * @param {number} y the <i>y</i> coordinate to add.
- * @returns {pv.Vector} a new vector.
- */
-pv.Vector.prototype.plus = function(x, y) {
-  return (arguments.length == 1)
-      ? new pv.Vector(this.x + x.x, this.y + x.y)
-      : new pv.Vector(this.x + x, this.y + y);
-};
-
-/**
- * Returns this vector minus the vector <i>v</i>: <i>&#x27e8;x - v.x, y -
- * v.y&#x27e9;</i>. If only one argument is specified, it is interpreted as the
- * vector <i>v</i>.
- *
- * @param {number} x the <i>x</i> coordinate to subtract.
- * @param {number} y the <i>y</i> coordinate to subtract.
- * @returns {pv.Vector} a new vector.
- */
-pv.Vector.prototype.minus = function(x, y) {
-  return (arguments.length == 1)
-      ? new pv.Vector(this.x - x.x, this.y - x.y)
-      : new pv.Vector(this.x - x, this.y - y);
-};
-
-/**
- * Returns the dot product of this vector and the vector <i>v</i>: <i>x * v.x +
- * y * v.y</i>. If only one argument is specified, it is interpreted as the
- * vector <i>v</i>.
- *
- * @param {number} x the <i>x</i> coordinate to dot.
- * @param {number} y the <i>y</i> coordinate to dot.
- * @returns {number} a dot product.
- */
-pv.Vector.prototype.dot = function(x, y) {
-  return (arguments.length == 1)
-      ? this.x * x.x + this.y * x.y
-      : this.x * x + this.y * y;
-};

+ 0 - 112
ext/thirdparty/js/protovis/js/lang/Array.js

@@ -1,112 +0,0 @@
-/**
- * @class The built-in Array class.
- * @name Array
- */
-
-if (!Array.prototype.map) {
-  /**
-   * Creates a new array with the results of calling a provided function on
-   * every element in this array. Implemented in Javascript 1.6.
-   *
-   * @see <a
-   * href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/Map">map</a>
-   * documentation.
-   * @param {function} f function that produces an element of the new Array from
-   * an element of the current one.
-   * @param [o] object to use as <tt>this</tt> when executing <tt>f</tt>.
-   */
-  Array.prototype.map = function(f, o) {
-      var n = this.length;
-      var result = new Array(n);
-      for (var i = 0; i < n; i++) {
-        if (i in this) {
-          result[i] = f.call(o, this[i], i, this);
-        }
-      }
-      return result;
-    };
-}
-
-if (!Array.prototype.filter) {
-  /**
-   * Creates a new array with all elements that pass the test implemented by the
-   * provided function. Implemented in Javascript 1.6.
-   *
-   * @see <a
-   * href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/filter">filter</a>
-   * documentation.
-   * @param {function} f function to test each element of the array.
-   * @param [o] object to use as <tt>this</tt> when executing <tt>f</tt>.
-   */
-  Array.prototype.filter = function(f, o) {
-      var n = this.length;
-      var result = new Array();
-      for (var i = 0; i < n; i++) {
-        if (i in this) {
-          var v = this[i];
-          if (f.call(o, v, i, this)) result.push(v);
-        }
-      }
-      return result;
-    };
-}
-
-if (!Array.prototype.forEach) {
-  /**
-   * Executes a provided function once per array element. Implemented in
-   * Javascript 1.6.
-   *
-   * @see <a
-   * href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/ForEach">forEach</a>
-   * documentation.
-   * @param {function} f function to execute for each element.
-   * @param [o] object to use as <tt>this</tt> when executing <tt>f</tt>.
-   */
-  Array.prototype.forEach = function(f, o) {
-      var n = this.length >>> 0;
-      for (var i = 0; i < n; i++) {
-        if (i in this) f.call(o, this[i], i, this);
-      }
-    };
-}
-
-if (!Array.prototype.reduce) {
-  /**
-   * Apply a function against an accumulator and each value of the array (from
-   * left-to-right) as to reduce it to a single value. Implemented in Javascript
-   * 1.8.
-   *
-   * @see <a
-   * href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/Reduce">reduce</a>
-   * documentation.
-   * @param {function} f function to execute on each value in the array.
-   * @param [v] object to use as the first argument to the first call of
-   * <tt>t</tt>.
-   */
-  Array.prototype.reduce = function(f, v) {
-      var len = this.length;
-      if (!len && (arguments.length == 1)) {
-        throw new Error("reduce: empty array, no initial value");
-      }
-
-      var i = 0;
-      if (arguments.length < 2) {
-        while (true) {
-          if (i in this) {
-            v = this[i++];
-            break;
-          }
-          if (++i >= len) {
-            throw new Error("reduce: no values, no initial value");
-          }
-        }
-      }
-
-      for (; i < len; i++) {
-        if (i in this) {
-          v = f(v, this[i], i, this);
-        }
-      }
-      return v;
-    };
-}

+ 0 - 277
ext/thirdparty/js/protovis/js/lang/Date.js

@@ -1,277 +0,0 @@
-/**
- * @class The built-in Date class.
- * @name Date
- */
-
-Date.__parse__ = Date.parse;
-
-/**
- * Parses a date from a string, optionally using the specified formatting. If
- * only a single argument is specified (i.e., <tt>format</tt> is not specified),
- * this method invokes the native implementation to guarantee
- * backwards-compatibility.
- *
- * <p>The format string is in the same format expected by the <tt>strptime</tt>
- * function in C. The following conversion specifications are supported:<ul>
- *
- * <li>%b - abbreviated month names.</li>
- * <li>%B - full month names.</li>
- * <li>%h - same as %b.</li>
- * <li>%d - day of month [1,31].</li>
- * <li>%e - same as %d.</li>
- * <li>%H - hour (24-hour clock) [0,23].</li>
- * <li>%m - month number [1,12].</li>
- * <li>%M - minute [0,59].</li>
- * <li>%S - second [0,61].</li>
- * <li>%y - year with century [0,99].</li>
- * <li>%Y - year including century.</li>
- * <li>%% - %.</li>
- *
- * </ul>The following conversion specifications are <i>unsupported</i> (for now):<ul>
- *
- * <li>%a - day of week, either abbreviated or full name.</li>
- * <li>%A - same as %a.</li>
- * <li>%c - locale's appropriate date and time.</li>
- * <li>%C - century number.</li>
- * <li>%D - same as %m/%d/%y.</li>
- * <li>%I - hour (12-hour clock) [1,12].</li>
- * <li>%j - day number [1,366].</li>
- * <li>%n - any white space.</li>
- * <li>%p - locale's equivalent of a.m. or p.m.</li>
- * <li>%r - same as %I:%M:%S %p.</li>
- * <li>%R - same as %H:%M.</li>
- * <li>%t - same as %n.</li>
- * <li>%T - same as %H:%M:%S.</li>
- * <li>%U - week number [0,53].</li>
- * <li>%w - weekday [0,6].</li>
- * <li>%W - week number [0,53].</li>
- * <li>%x - locale's equivalent to %m/%d/%y.</li>
- * <li>%X - locale's equivalent to %I:%M:%S %p.</li>
- *
- * </ul>
- *
- * @see <a
- * href="http://www.opengroup.org/onlinepubs/007908799/xsh/strptime.html">strptime</a>
- * documentation.
- * @param {string} s the string to parse as a date.
- * @param {string} [format] an optional format string.
- * @returns {Date} the parsed date.
- */
-Date.parse = function(s, format) {
-  if (arguments.length == 1) {
-    return Date.__parse__(s);
-  }
-
-  var year = 1970, month = 0, date = 1, hour = 0, minute = 0, second = 0;
-  var fields = [function() {}];
-  format = format.replace(/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g, "\\$&");
-  format = format.replace(/%[a-zA-Z0-9]/g, function(s) {
-      switch (s) {
-        // TODO %a: day of week, either abbreviated or full name
-        // TODO %A: same as %a
-        case '%b': {
-          fields.push(function(x) { month = {
-                Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7,
-                Sep: 8, Oct: 9, Nov: 10, Dec: 11
-              }[x]; });
-          return "([A-Za-z]+)";
-        }
-        case '%h':
-        case '%B': {
-          fields.push(function(x) { month = {
-                January: 0, February: 1, March: 2, April: 3, May: 4, June: 5,
-                July: 6, August: 7, September: 8, October: 9, November: 10,
-                December: 11
-              }[x]; });
-          return "([A-Za-z]+)";
-        }
-        // TODO %c: locale's appropriate date and time
-        // TODO %C: century number[0,99]
-        case '%e':
-        case '%d': {
-          fields.push(function(x) { date = x; });
-          return "([0-9]+)";
-        }
-        // TODO %D: same as %m/%d/%y
-        case '%H': {
-          fields.push(function(x) { hour = x; });
-          return "([0-9]+)";
-        }
-        // TODO %I: hour (12-hour clock) [1,12]
-        // TODO %j: day number [1,366]
-        case '%m': {
-          fields.push(function(x) { month = x - 1; });
-          return "([0-9]+)";
-        }
-        case '%M': {
-          fields.push(function(x) { minute = x; });
-          return "([0-9]+)";
-        }
-        // TODO %n: any white space
-        // TODO %p: locale's equivalent of a.m. or p.m.
-        // TODO %r: %I:%M:%S %p
-        // TODO %R: %H:%M
-        case '%S': {
-          fields.push(function(x) { second = x; });
-          return "([0-9]+)";
-        }
-        // TODO %t: any white space
-        // TODO %T: %H:%M:%S
-        // TODO %U: week number [00,53]
-        // TODO %w: weekday [0,6]
-        // TODO %W: week number [00, 53]
-        // TODO %x: locale date (%m/%d/%y)
-        // TODO %X: locale time (%I:%M:%S %p)
-        case '%y': {
-          fields.push(function(x) {
-              x = Number(x);
-              year = x + (((0 <= x) && (x < 69)) ? 2000
-                  : (((x >= 69) && (x < 100) ? 1900 : 0)));
-            });
-          return "([0-9]+)";
-        }
-        case '%Y': {
-          fields.push(function(x) { year = x; });
-          return "([0-9]+)";
-        }
-        case '%%': {
-          fields.push(function() {});
-          return "%";
-        }
-      }
-      return s;
-    });
-
-  var match = s.match(format);
-  if (match) match.forEach(function(m, i) { fields[i](m); });
-  return new Date(year, month, date, hour, minute, second);
-};
-
-if (Date.prototype.toLocaleFormat) {
-  Date.prototype.format = Date.prototype.toLocaleFormat;
-} else {
-
-/**
- * Converts a date to a string using the specified formatting. If the
- * <tt>Date</tt> object already supports the <tt>toLocaleFormat</tt> method, as
- * in Firefox, this is simply an alias to the built-in method.
- *
- * <p>The format string is in the same format expected by the <tt>strftime</tt>
- * function in C. The following conversion specifications are supported:<ul>
- *
- * <li>%a - abbreviated weekday name.</li>
- * <li>%A - full weekday name.</li>
- * <li>%b - abbreviated month names.</li>
- * <li>%B - full month names.</li>
- * <li>%c - locale's appropriate date and time.</li>
- * <li>%C - century number.</li>
- * <li>%d - day of month [01,31] (zero padded).</li>
- * <li>%D - same as %m/%d/%y.</li>
- * <li>%e - day of month [ 1,31] (space padded).</li>
- * <li>%h - same as %b.</li>
- * <li>%H - hour (24-hour clock) [00,23] (zero padded).</li>
- * <li>%I - hour (12-hour clock) [01,12] (zero padded).</li>
- * <li>%m - month number [01,12] (zero padded).</li>
- * <li>%M - minute [0,59] (zero padded).</li>
- * <li>%n - newline character.</li>
- * <li>%p - locale's equivalent of a.m. or p.m.</li>
- * <li>%r - same as %I:%M:%S %p.</li>
- * <li>%R - same as %H:%M.</li>
- * <li>%S - second [00,61] (zero padded).</li>
- * <li>%t - tab character.</li>
- * <li>%T - same as %H:%M:%S.</li>
- * <li>%x - same as %m/%d/%y.</li>
- * <li>%X - same as %I:%M:%S %p.</li>
- * <li>%y - year with century [00,99] (zero padded).</li>
- * <li>%Y - year including century.</li>
- * <li>%% - %.</li>
- *
- * </ul>The following conversion specifications are <i>unsupported</i> (for now):<ul>
- *
- * <li>%j - day number [1,366].</li>
- * <li>%u - weekday number [1,7].</li>
- * <li>%U - week number [00,53].</li>
- * <li>%V - week number [01,53].</li>
- * <li>%w - weekday number [0,6].</li>
- * <li>%W - week number [00,53].</li>
- * <li>%Z - timezone name or abbreviation.</li>
- *
- * </ul>
- *
- * @see <a
- * href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/toLocaleFormat">Date.toLocaleFormat</a>
- * documentation.
- * @see <a
- * href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html">strftime</a>
- * documentation.
- * @param {string} format a format string.
- * @returns {string} the formatted date.
- */
-Date.prototype.format = function(format) {
-  function pad(n, p) { return (n < 10) ? (p || "0") + n : n; }
-  var d = this;
-  return format.replace(/%[a-zA-Z0-9]/g, function(s) {
-      switch (s) {
-        case '%a': return [
-            "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-          ][d.getDay()];
-        case '%A': return [
-            "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
-            "Saturday"
-          ][d.getDay()];
-        case '%h':
-        case '%b': return [
-            "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
-            "Oct", "Nov", "Dec"
-          ][d.getMonth()];
-        case '%B': return [
-            "January", "February", "March", "April", "May", "June", "July",
-            "August", "September", "October", "November", "December"
-          ][d.getMonth()];
-        case '%c': return d.toLocaleString();
-        case '%C': return pad(Math.floor(d.getFullYear() / 100) % 100);
-        case '%d': return pad(d.getDate());
-        case '%x':
-        case '%D': return pad(d.getMonth() + 1)
-                  + "/" + pad(d.getDate())
-                  + "/" + pad(d.getFullYear() % 100);
-        case '%e': return pad(d.getDate(), " ");
-        case '%H': return pad(d.getHours());
-        case '%I': {
-          var h = d.getHours() % 12;
-          return h ? pad(h) : 12;
-        }
-        // TODO %j: day of year as a decimal number [001,366]
-        case '%m': return pad(d.getMonth() + 1);
-        case '%M': return pad(d.getMinutes());
-        case '%n': return "\n";
-        case '%p': return d.getHours() < 12 ? "AM" : "PM";
-        case '%T':
-        case '%X':
-        case '%r': {
-          var h = d.getHours() % 12;
-          return (h ? pad(h) : 12)
-                  + ":" + pad(d.getMinutes())
-                  + ":" + pad(d.getSeconds())
-                  + " " + (d.getHours() < 12 ? "AM" : "PM");
-        }
-        case '%R': return pad(d.getHours()) + ":" + pad(d.getMinutes());
-        case '%S': return pad(d.getSeconds());
-        case '%t': return "\t";
-        case '%u': {
-          var w = d.getDay();
-          return w ? w : 1;
-        }
-        // TODO %U: week number (sunday first day) [00,53]
-        // TODO %V: week number (monday first day) [01,53] ... with weirdness
-        case '%w': return d.getDay();
-        // TODO %W: week number (monday first day) [00,53] ... with weirdness
-        case '%y': return pad(d.getFullYear() % 100);
-        case '%Y': return d.getFullYear();
-        // TODO %Z: timezone name or abbreviation
-        case '%%': return "%";
-      }
-      return s;
-    });
-  };
-}

+ 0 - 21
ext/thirdparty/js/protovis/js/lang/init.js

@@ -1,21 +0,0 @@
-/*
- * Parses the Protovis specifications on load, allowing the use of JavaScript
- * 1.8 function expressions on browsers that only support JavaScript 1.6.
- *
- * @see pv.parse
- */
-pv.listen(window, "load", function() {
-    var scripts = document.getElementsByTagName("script");
-    for (var i = 0; i < scripts.length; i++) {
-      var s = scripts[i];
-      if (s.type == "text/javascript+protovis") {
-        try {
-          pv.Panel.$dom = s;
-          window.eval(pv.parse(s.textContent || s.innerHTML)); // IE
-        } catch (e) {
-          pv.error(e);
-        }
-        delete pv.Panel.$dom;
-      }
-    }
-  });

+ 0 - 49
ext/thirdparty/js/protovis/js/layout/Grid.js

@@ -1,49 +0,0 @@
-/**
- * Returns a new grid layout.
- *
- * @class A grid layout with regularly-sized rows and columns. <img
- * src="../grid.png" width="160" height="160" align="right"> The number of rows
- * and columns are determined from the array, which should be in row-major
- * order. For example, the 2&times;3 array:
- *
- * <pre>1 2 3
- * 4 5 6</pre>
- *
- * should be represented as:
- *
- * <pre>[[1, 2, 3], [4, 5, 6]]</pre>
- *
- * If your data is in column-major order, you can use {@link pv.transpose} to
- * transpose it.
- *
- * <p>This layout defines left, top, width, height and data properties. The data
- * property will be the associated element in the array. For example, if the
- * array is a two-dimensional array of values in the range [0,1], a simple
- * heatmap can be generated as:
- *
- * <pre>.add(pv.Bar)
- *   .extend(pv.Layout.grid(array))
- *   .fillStyle(pv.ramp("white", "black"))</pre>
- *
- * By default, the grid fills the full width and height of the parent panel.
- *
- * @param {array[]} arrays an array of arrays.
- * @returns {pv.Layout.grid} a grid layout.
- */
-pv.Layout.grid = function(arrays) {
-  var rows = arrays.length, cols = arrays[0].length;
-
-  /** @private */
-  function w() { return this.parent.width() / cols; }
-
-  /** @private */
-  function h() { return this.parent.height() / rows; }
-
-  /* A dummy mark, like an anchor, which the caller extends. */
-  return new pv.Mark()
-      .data(pv.blend(arrays))
-      .left(function() { return w.call(this) * (this.index % cols); })
-      .top(function() { return h.call(this) * Math.floor(this.index / cols); })
-      .width(w)
-      .height(h);
-};

+ 0 - 200
ext/thirdparty/js/protovis/js/layout/Icicle.js

@@ -1,200 +0,0 @@
-// TODO share code with Treemap
-// TODO vertical / horizontal orientation?
-
-/**
- * Returns a new icicle tree layout.
- *
- * @class A tree layout in the form of an icicle. <img src="../icicle.png"
- * width="160" height="160" align="right"> The first row corresponds to the root
- * of the tree; subsequent rows correspond to each tier. Rows are subdivided
- * into cells based on the size of nodes, per {@link #size}. Within a row, cells
- * are sorted by size.
- *
- * <p>This tree layout is intended to be extended (see {@link pv.Mark#extend})
- * by a {@link pv.Bar}. The data property returns an array of nodes for use by
- * other property functions. The following node attributes are supported:
- *
- * <ul>
- * <li><tt>left</tt> - the cell left position.
- * <li><tt>top</tt> - the cell top position.
- * <li><tt>width</tt> - the cell width.
- * <li><tt>height</tt> - the cell height.
- * <li><tt>depth</tt> - the node depth (tier; the root is 0).
- * <li><tt>keys</tt> - an array of string keys for the node.
- * <li><tt>size</tt> - the aggregate node size.
- * <li><tt>children</tt> - child nodes, if any.
- * <li><tt>data</tt> - the associated tree element, for leaf nodes.
- * </ul>
- *
- * To produce a default icicle layout, say:
- *
- * <pre>.add(pv.Bar)
- *   .extend(pv.Layout.icicle(tree))</pre>
- *
- * To customize the tree to highlight leaf nodes bigger than 10,000 (1E4), you
- * might say:
- *
- * <pre>.add(pv.Bar)
- *   .extend(pv.Layout.icicle(tree))
- *   .fillStyle(function(n) n.data > 1e4 ? "#ff0" : "#fff")</pre>
- *
- * The format of the <tt>tree</tt> argument is any hierarchical object whose
- * leaf nodes are numbers corresponding to their size. For an example, and
- * information on how to convert tabular data into such a tree, see
- * {@link pv.Tree}. If the leaf nodes are not numbers, a {@link #size} function
- * can be specified to override how the tree is interpreted. This size function
- * can also be used to transform the data.
- *
- * <p>By default, the icicle fills the full width and height of the parent
- * panel. An optional root key can be specified using {@link #root} for
- * convenience.
- *
- * @param tree a tree (an object) who leaf attributes have sizes.
- * @returns {pv.Layout.icicle} a tree layout.
- */
-pv.Layout.icicle = function(tree) {
-  var keys = [], sizeof = Number;
-
-  /** @private */
-  function accumulate(map) {
-    var node = {size: 0, children: [], keys: keys.slice()};
-    for (var key in map) {
-      var child = map[key], size = sizeof(child);
-      keys.push(key);
-      if (isNaN(size)) {
-        child = accumulate(child);
-      } else {
-        child = {size: size, data: child, keys: keys.slice()};
-      }
-      node.children.push(child);
-      node.size += child.size;
-      keys.pop();
-    }
-    node.children.sort(function(a, b) { return b.size - a.size; });
-    return node;
-  }
-
-  /** @private */
-  function scale(node, k) {
-    node.size *= k;
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        scale(node.children[i], k);
-      }
-    }
-  }
-
-  /** @private */
-  function depth(node, i) {
-    i = i ? (i + 1) : 1;
-    return node.children
-        ? pv.max(node.children, function(n) { return depth(n, i); })
-        : i;
-  }
-
-  /** @private */
-  function layout(node) {
-    if (node.children) {
-      icify(node);
-      for (var i = 0; i < node.children.length; i++) {
-        layout(node.children[i]);
-      }
-    }
-  }
-
-  /** @private */
-  function icify(node) {
-    var left = node.left;
-    for (var i = 0; i < node.children.length; i++) {
-      var child = node.children[i], width = (child.size / node.size) * node.width;
-      child.left = left;
-      child.top = node.top + node.height;
-      child.width = width;
-      child.height = node.height;
-      child.depth = node.depth + 1;
-      left += width;
-      if (child.children) {
-        icify(child);
-      }
-    }
-  }
-
-  /** @private */
-  function flatten(node, array) {
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        flatten(node.children[i], array);
-      }
-    }
-    array.push(node)
-    return array;
-  }
-
-  /** @private */
-  function data() {
-    var root = accumulate(tree);
-    root.top = 0;
-    root.left = 0;
-    root.width = this.parent.width();
-    root.height = this.parent.height() / depth(root);
-    root.depth = 0;
-    layout(root);
-    return flatten(root, []).reverse();
-  }
-
-  /* A dummy mark, like an anchor, which the caller extends. */
-  var mark = new pv.Mark()
-      .data(data)
-      .left(function(n) { return n.left; })
-      .top(function(n) { return n.top; })
-      .width(function(n) { return n.width; })
-      .height(function(n) { return n.height; });
-
-  /**
-   * Specifies the root key; optional. The root key is prepended to the
-   * <tt>keys</tt> attribute for all generated nodes. This method is provided
-   * for convenience and does not affect layout.
-   *
-   * @param {string} v the root key.
-   * @function
-   * @name pv.Layout.icicle.prototype.root
-   * @returns {pv.Layout.icicle} this.
-   */
-  mark.root = function(v) {
-    keys = [v];
-    return this;
-  };
-
-  /**
-   * Specifies the sizing function. By default, the sizing function is
-   * <tt>Number</tt>. The sizing function is invoked for each node in the tree
-   * (passed to the constructor): the sizing function must return
-   * <tt>undefined</tt> or <tt>NaN</tt> for internal nodes, and a number for
-   * leaf nodes. The aggregate sizes of internal nodes will be automatically
-   * computed by the layout.
-   *
-   * <p>For example, if the tree data structure represents a file system, with
-   * files as leaf nodes, and each file has a <tt>bytes</tt> attribute, you can
-   * specify a size function as:
-   *
-   * <pre>.size(function(d) d.bytes)</pre>
-   *
-   * This function will return <tt>undefined</tt> for internal nodes (since
-   * these do not have a <tt>bytes</tt> attribute), and a number for leaf nodes.
-   *
-   * <p>Note that the built-in <tt>Math.sqrt</tt> and <tt>Math.log</tt> methods
-   * can also be used as sizing functions. These function similarly to
-   * <tt>Number</tt>, except perform a root and log scale, respectively.
-   *
-   * @param {function} f the new sizing function.
-   * @function
-   * @name pv.Layout.icicle.prototype.size
-   * @returns {pv.Layout.icicle} this.
-   */
-  mark.size = function(f) {
-    sizeof = f;
-    return this;
-  };
-
-  return mark;
-};

+ 0 - 5
ext/thirdparty/js/protovis/js/layout/Layout.js

@@ -1,5 +0,0 @@
-/**
- * @ignore
- * @namespace
- */
-pv.Layout = {};

+ 0 - 80
ext/thirdparty/js/protovis/js/layout/Stack.js

@@ -1,80 +0,0 @@
-/**
- * Returns a new stack layout.
- *
- * @class A layout for stacking marks vertically or horizontally, using the
- * <i>cousin</i> instance. This layout is designed to be used for one of the
- * four positional properties in the box model, and changes behavior depending
- * on the property being evaluated:<ul>
- *
- * <li>bottom: cousin.bottom + cousin.height
- * <li>top: cousin.top + cousin.height
- * <li>left: cousin.left + cousin.width
- * <li>right: cousin.right + cousin.width
- *
- * </ul>If no cousin instance is available (for example, for first instance),
- * the specified offset is used. If no offset is specified, zero is used. For
- * example,
- *
- * <pre>new pv.Panel()
- *     .width(150).height(150)
- *   .add(pv.Panel)
- *     .data([[1, 1.2, 1.7, 1.5, 1.7],
- *            [.5, 1, .8, 1.1, 1.3],
- *            [.2, .5, .8, .9, 1]])
- *   .add(pv.Area)
- *     .data(function(d) d)
- *     .bottom(pv.Layout.stack())
- *     .height(function(d) d * 40)
- *     .left(function() this.index * 35)
- *   .root.render();</pre>
- *
- * specifies a vertically-stacked area chart.
- *
- * @returns {pv.Layout.stack} a stack property function.
- * @see pv.Mark#cousin
- */
-pv.Layout.stack = function() {
-  /** @private */
-  var offset = function() { return 0; };
-
-  /** @private */
-  function layout() {
-
-    /* Find the previous visible parent instance. */
-    var i = this.parent.index, p, c;
-    while ((i-- > 0) && !c) {
-      p = this.parent.scene[i];
-      if (p.visible) c = p.children[this.childIndex][this.index];
-    }
-
-    if (c) {
-      switch (property) {
-        case "bottom": return c.bottom + c.height;
-        case "top": return c.top + c.height;
-        case "left": return c.left + c.width;
-        case "right": return c.right + c.width;
-      }
-    }
-
-    return offset.apply(this, arguments);
-  }
-
-  /**
-   * Sets the offset for this stack layout. The offset can either be specified
-   * as a function or as a constant. If a function, the function is invoked in
-   * the same context as a normal property function: <tt>this</tt> refers to the
-   * mark, and the arguments are the full data stack. By default the offset is
-   * zero.
-   *
-   * @function
-   * @name pv.Layout.stack.prototype.offset
-   * @param {function} f offset function, or constant value.
-   * @returns {pv.Layout.stack} this.
-   */
-  layout.offset = function(f) {
-      offset = (f instanceof Function) ? f : function() { return f; };
-      return this;
-    };
-
-  return layout;
-};

+ 0 - 213
ext/thirdparty/js/protovis/js/layout/Sunburst.js

@@ -1,213 +0,0 @@
-// TODO share code with Treemap
-// TODO inspect parent panel dimensions to set inner and outer radii
-
-/**
- * Returns a new sunburst tree layout.
- *
- * @class A tree layout in the form of a sunburst. <img
- * src="../sunburst.png" width="160" height="160" align="right"> The
- * center circle corresponds to the root of the tree; subsequent rings
- * correspond to each tier. Rings are subdivided into wedges based on the size
- * of nodes, per {@link #size}. Within a ring, wedges are sorted by size.
- *
- * <p>The tree layout is intended to be extended (see {@link pv.Mark#extend} by
- * a {@link pv.Wedge}. The data property returns an array of nodes for use by
- * other property functions. The following node attributes are supported:
- *
- * <ul>
- * <li><tt>left</tt> - the wedge left position.
- * <li><tt>top</tt> - the wedge top position.
- * <li><tt>innerRadius</tt> - the wedge inner radius.
- * <li><tt>outerRadius</tt> - the wedge outer radius.
- * <li><tt>startAngle</tt> - the wedge start angle.
- * <li><tt>endAngle</tt> - the wedge end angle.
- * <li><tt>angle</tt> - the wedge angle.
- * <li><tt>depth</tt> - the node depth (tier; the root is 0).
- * <li><tt>keys</tt> - an array of string keys for the node.
- * <li><tt>size</tt> - the aggregate node size.
- * <li><tt>children</tt> - child nodes, if any.
- * <li><tt>data</tt> - the associated tree element, for leaf nodes.
- * </ul>
- *
- * <p>To produce a default sunburst layout, say:
- *
- * <pre>.add(pv.Wedge)
- *   .extend(pv.Layout.sunburst(tree))</pre>
- *
- * To only show nodes at a depth of two or greater, you might say:
- *
- * <pre>.add(pv.Wedge)
- *   .extend(pv.Layout.sunburst(tree))
- *   .visible(function(n) n.depth > 1)</pre>
- *
- * The format of the <tt>tree</tt> argument is a hierarchical object whose leaf
- * nodes are numbers corresponding to their size. For an example, and
- * information on how to convert tabular data into such a tree, see
- * {@link pv.Tree}. If the leaf nodes are not numbers, a {@link #size} function
- * can be specified to override how the tree is interpreted. This size function
- * can also be used to transform the data.
- *
- * <p>By default, the sunburst fills the full width and height of the parent
- * panel. An optional root key can be specified using {@link #root} for
- * convenience.
- *
- * @param tree a tree (an object) who leaf attributes have sizes.
- * @returns {pv.Layout.sunburst} a tree layout.
- */
-pv.Layout.sunburst = function(tree) {
-  var keys = [], sizeof = Number, w, h, r;
-
-  /** @private */
-  function accumulate(map) {
-    var node = {size: 0, children: [], keys: keys.slice()};
-    for (var key in map) {
-      var child = map[key], size = sizeof(child);
-      keys.push(key);
-      if (isNaN(size)) {
-        child = accumulate(child);
-      } else {
-        child = {size: size, data: child, keys: keys.slice()};
-      }
-      node.children.push(child);
-      node.size += child.size;
-      keys.pop();
-    }
-    node.children.sort(function(a, b) { return b.size - a.size; });
-    return node;
-  }
-
-  /** @private */
-  function scale(node, k) {
-    node.size *= k;
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        scale(node.children[i], k);
-      }
-    }
-  }
-
-  /** @private */
-  function depth(node, i) {
-    i = i ? (i + 1) : 1;
-    return node.children
-        ? pv.max(node.children, function(n) { return depth(n, i); })
-        : i;
-  }
-
-  /** @private */
-  function layout(node) {
-    if (node.children) {
-      wedgify(node);
-      for (var i = 0; i < node.children.length; i++) {
-        layout(node.children[i]);
-      }
-    }
-  }
-
-  /** @private */
-  function wedgify(node) {
-    var startAngle = node.startAngle;
-    for (var i = 0; i < node.children.length; i++) {
-      var child = node.children[i], angle = (child.size / node.size) * node.angle;
-      child.startAngle = startAngle;
-      child.angle = angle;
-      child.endAngle = startAngle + angle;
-      child.depth = node.depth + 1;
-      child.left = w / 2;
-      child.top = h / 2;
-      child.innerRadius = Math.max(0, child.depth - .5) * r;
-      child.outerRadius = (child.depth + .5) * r;
-      startAngle += angle;
-      if (child.children) {
-        wedgify(child);
-      }
-    }
-  }
-
-  /** @private */
-  function flatten(node, array) {
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        flatten(node.children[i], array);
-      }
-    }
-    array.push(node)
-    return array;
-  }
-
-  /** @private */
-  function data() {
-    var root = accumulate(tree);
-    w = this.parent.width();
-    h = this.parent.height();
-    r = Math.min(w, h) / 2 / (depth(root) - .5);
-    root.left = w / 2;
-    root.top = h / 2;
-    root.startAngle = 0;
-    root.angle = 2 * Math.PI;
-    root.endAngle = 2 * Math.PI;
-    root.innerRadius = 0;
-    root.outerRadius = r;
-    root.depth = 0;
-    layout(root);
-    return flatten(root, []).reverse();
-  }
-
-  /* A dummy mark, like an anchor, which the caller extends. */
-  var mark = new pv.Mark()
-      .data(data)
-      .left(function(n) { return n.left; })
-      .top(function(n) { return n.top; })
-      .startAngle(function(n) { return n.startAngle; })
-      .angle(function(n) { return n.angle; })
-      .innerRadius(function(n) { return n.innerRadius; })
-      .outerRadius(function(n) { return n.outerRadius; });
-
-  /**
-   * Specifies the root key; optional. The root key is prepended to the
-   * <tt>keys</tt> attribute for all generated nodes. This method is provided
-   * for convenience and does not affect layout.
-   *
-   * @param {string} v the root key.
-   * @function
-   * @name pv.Layout.sunburst.prototype.root
-   * @returns {pv.Layout.sunburst} this.
-   */
-  mark.root = function(v) {
-    keys = [v];
-    return this;
-  };
-
-  /**
-   * Specifies the sizing function. By default, the sizing function is
-   * <tt>Number</tt>. The sizing function is invoked for each node in the tree
-   * (passed to the constructor): the sizing function must return
-   * <tt>undefined</tt> or <tt>NaN</tt> for internal nodes, and a number for
-   * leaf nodes. The aggregate sizes of internal nodes will be automatically
-   * computed by the layout.
-   *
-   * <p>For example, if the tree data structure represents a file system, with
-   * files as leaf nodes, and each file has a <tt>bytes</tt> attribute, you can
-   * specify a size function as:
-   *
-   * <pre>.size(function(d) d.bytes)</pre>
-   *
-   * This function will return <tt>undefined</tt> for internal nodes (since
-   * these do not have a <tt>bytes</tt> attribute), and a number for leaf nodes.
-   *
-   * <p>Note that the built-in <tt>Math.sqrt</tt> and <tt>Math.log</tt> methods
-   * can be used as sizing functions. These function similarly to
-   * <tt>Number</tt>, except perform a root and log scale, respectively.
-   *
-   * @param {function} f the new sizing function.
-   * @function
-   * @name pv.Layout.sunburst.prototype.size
-   * @returns {pv.Layout.sunburst} this.
-   */
-  mark.size = function(f) {
-    sizeof = f;
-    return this;
-  };
-
-  return mark;
-};

+ 0 - 319
ext/thirdparty/js/protovis/js/layout/Treemap.js

@@ -1,319 +0,0 @@
-// TODO add `by` function for determining size (and children?)
-
-/**
- * Returns a new treemap tree layout.
- *
- * @class A tree layout in the form of an treemap. <img
- * src="../treemap.png" width="160" height="160" align="right"> Treemaps
- * are a form of space-filling layout that represents nodes as boxes, with child
- * nodes placed within parent boxes. The size of each box is proportional to the
- * size of the node in the tree.
- *
- * <p>This particular algorithm is taken from Bruls, D.M., C. Huizing, and
- * J.J. van Wijk, <a href="http://www.win.tue.nl/~vanwijk/stm.pdf">"Squarified
- * Treemaps"</a> in <i>Data Visualization 2000, Proceedings of the Joint
- * Eurographics and IEEE TCVG Sumposium on Visualization</i>, 2000,
- * pp. 33-42.
- *
- * <p>This tree layout is intended to be extended (see {@link pv.Mark#extend})
- * by a {@link pv.Bar}. The data property returns an array of nodes for use by
- * other property functions. The following node attributes are supported:
- *
- * <ul>
- * <li><tt>left</tt> - the cell left position.
- * <li><tt>top</tt> - the cell top position.
- * <li><tt>width</tt> - the cell width.
- * <li><tt>height</tt> - the cell height.
- * <li><tt>depth</tt> - the node depth (tier; the root is 0).
- * <li><tt>keys</tt> - an array of string keys for the node.
- * <li><tt>size</tt> - the aggregate node size.
- * <li><tt>children</tt> - child nodes, if any.
- * <li><tt>data</tt> - the associated tree element, for leaf nodes.
- * </ul>
- *
- * To produce a default treemap layout, say:
- *
- * <pre>.add(pv.Bar)
- *   .extend(pv.Layout.treemap(tree))</pre>
- *
- * To display internal nodes, and color by depth, say:
- *
- * <pre>.add(pv.Bar)
- *   .extend(pv.Layout.treemap(tree).inset(10))
- *   .fillStyle(pv.Colors.category19().by(function(n) n.depth))</pre>
- *
- * The format of the <tt>tree</tt> argument is a hierarchical object whose leaf
- * nodes are numbers corresponding to their size. For an example, and
- * information on how to convert tabular data into such a tree, see
- * {@link pv.Tree}. If the leaf nodes are not numbers, a {@link #size} function
- * can be specified to override how the tree is interpreted. This size function
- * can also be used to transform the data.
- *
- * <p>By default, the treemap fills the full width and height of the parent
- * panel, and only leaf nodes are rendered. If an {@link #inset} is specified,
- * internal nodes will be rendered, each inset from their parent by the
- * specified margins. Rounding can be enabled using {@link #round}. Finally, an
- * optional root key can be specified using {@link #root} for convenience.
- *
- * @param tree a tree (an object) who leaf attributes have sizes.
- * @returns {pv.Layout.treemap} a tree layout.
- */
-pv.Layout.treemap = function(tree) {
-  var keys = [], round, inset, sizeof = Number;
-
-  /** @private */
-  function rnd(i) {
-    return round ? Math.round(i) : i;
-  }
-
-  /** @private */
-  function accumulate(map) {
-    var node = {size: 0, children: [], keys: keys.slice()};
-    for (var key in map) {
-      var child = map[key], size = sizeof(child);
-      keys.push(key);
-      if (isNaN(size)) {
-        child = accumulate(child);
-      } else {
-        child = {size: size, data: child, keys: keys.slice()};
-      }
-      node.children.push(child);
-      node.size += child.size;
-      keys.pop();
-    }
-    node.children.sort(function(a, b) { return a.size - b.size; });
-    return node;
-  }
-
-  /** @private */
-  function scale(node, k) {
-    node.size *= k;
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        scale(node.children[i], k);
-      }
-    }
-  }
-
-  /** @private */
-  function ratio(row, l) {
-    var rmax = -Infinity, rmin = Infinity, s = 0;
-    for (var i = 0; i < row.length; i++) {
-      var r = row[i].size;
-      if (r < rmin) rmin = r;
-      if (r > rmax) rmax = r;
-      s += r;
-    }
-    s = s * s;
-    l = l * l;
-    return Math.max(l * rmax / s, s / (l * rmin));
-  }
-
-  /** @private */
-  function squarify(node) {
-    var row = [], mink = Infinity;
-    var x = node.left + (inset ? inset.left : 0),
-        y = node.top + (inset ? inset.top : 0),
-        w = node.width - (inset ? inset.left + inset.right : 0),
-        h = node.height - (inset ? inset.top + inset.bottom : 0),
-        l = Math.min(w, h);
-
-    scale(node, w * h / node.size);
-
-    function position(row) {
-      var s = pv.sum(row, function(node) { return node.size; }),
-          hh = (l == 0) ? 0 : rnd(s / l);
-
-      for (var i = 0, d = 0; i < row.length; i++) {
-        var n = row[i], nw = rnd(n.size / hh);
-        if (w == l) {
-          n.left = x + d;
-          n.top = y;
-          n.width = nw;
-          n.height = hh;
-        } else {
-          n.left = x;
-          n.top = y + d;
-          n.width = hh;
-          n.height = nw;
-        }
-        d += nw;
-      }
-
-      if (w == l) {
-        if (n) n.width += w - d; // correct rounding error
-        y += hh;
-        h -= hh;
-      } else {
-        if (n) n.height += h - d; // correct rounding error
-        x += hh;
-        w -= hh;
-      }
-      l = Math.min(w, h);
-    }
-
-    var children = node.children.slice(); // copy
-    while (children.length > 0) {
-      var child = children[children.length - 1];
-      if (child.size <= 0) {
-        children.pop();
-        continue;
-      }
-      row.push(child);
-
-      var k = ratio(row, l);
-      if (k <= mink) {
-        children.pop();
-        mink = k;
-      } else {
-        row.pop();
-        position(row);
-        row.length = 0;
-        mink = Infinity;
-      }
-    }
-
-    if (row.length > 0) {
-      position(row);
-    }
-
-    /* correct rounding error */
-    if (w == l) {
-      for (var i = 0; i < row.length; i++) {
-        row[i].width += w;
-      }
-    } else {
-      for (var i = 0; i < row.length; i++) {
-        row[i].height += h;
-      }
-    }
-  }
-
-  /** @private */
-  function layout(node) {
-    if (node.children) {
-      squarify(node);
-      for (var i = 0; i < node.children.length; i++) {
-        var child = node.children[i];
-        child.depth = node.depth + 1;
-        layout(child);
-      }
-    }
-  }
-
-  /** @private */
-  function flatten(node, array) {
-    if (node.children) {
-      for (var i = 0; i < node.children.length; i++) {
-        flatten(node.children[i], array);
-      }
-    }
-    if (inset || !node.children) {
-      array.push(node)
-    }
-    return array;
-  }
-
-  /** @private */
-  function data() {
-    var root = accumulate(tree);
-    root.left = 0;
-    root.top = 0;
-    root.width = this.parent.width();
-    root.height = this.parent.height();
-    root.depth = 0;
-    layout(root);
-    return flatten(root, []).reverse();
-  }
-
-  /* A dummy mark, like an anchor, which the caller extends. */
-  var mark = new pv.Mark()
-      .data(data)
-      .left(function(n) { return n.left; })
-      .top(function(n) { return n.top; })
-      .width(function(n) { return n.width; })
-      .height(function(n) { return n.height; });
-
-  /**
-   * Enables or disables rounding. When rounding is enabled, the left, top,
-   * width and height properties will be rounded to integer pixel values. The
-   * rounding algorithm uses error accumulation to ensure an exact fit.
-   *
-   * @param {boolean} v whether rounding should be enabled.
-   * @function
-   * @name pv.Layout.treemap.prototype.round
-   * @returns {pv.Layout.treemap} this.
-   */
-  mark.round = function(v) {
-    round = v;
-    return this;
-  };
-
-  /**
-   * Specifies the margins to inset child nodes from their parents; as a side
-   * effect, this also enables the display of internal nodes, which are hidden
-   * by default. If only a single argument is specified, this value is used to
-   * inset all four sides.
-   *
-   * @param {number} top the top margin.
-   * @param {number} [right] the right margin.
-   * @param {number} [bottom] the bottom margin.
-   * @param {number} [left] the left margin.
-   * @function
-   * @name pv.Layout.treemap.prototype.inset
-   * @returns {pv.Layout.treemap} this.
-   */
-  mark.inset = function(top, right, bottom, left) {
-    if (arguments.length == 1) right = bottom = left = top;
-    inset = {top:top, right:right, bottom:bottom, left:left};
-    return this;
-  };
-
-  /**
-   * Specifies the root key; optional. The root key is prepended to the
-   * <tt>keys</tt> attribute for all generated nodes. This method is provided
-   * for convenience and does not affect layout.
-   *
-   * @param {string} v the root key.
-   * @function
-   * @name pv.Layout.treemap.prototype.root
-   * @returns {pv.Layout.treemap} this.
-   */
-  mark.root = function(v) {
-    keys = [v];
-    return this;
-  };
-
-  /**
-   * Specifies the sizing function. By default, the sizing function is
-   * <tt>Number</tt>. The sizing function is invoked for each node in the tree
-   * (passed to the constructor): the sizing function must return
-   * <tt>undefined</tt> or <tt>NaN</tt> for internal nodes, and a number for
-   * leaf nodes. The aggregate sizes of internal nodes will be automatically
-   * computed by the layout.
-   *
-   * <p>For example, if the tree data structure represents a file system, with
-   * files as leaf nodes, and each file has a <tt>bytes</tt> attribute, you can
-   * specify a size function as:
-   *
-   * <pre>.size(function(d) d.bytes)</pre>
-   *
-   * This function will return <tt>undefined</tt> for internal nodes (since
-   * these do not have a <tt>bytes</tt> attribute), and a number for leaf nodes.
-   *
-   * <p>Note that the built-in <tt>Math.sqrt</tt> and <tt>Math.log</tt> methods
-   * can be used as sizing functions. These function similarly to
-   * <tt>Number</tt>, except perform a root and log scale, respectively.
-   *
-   * @param {function} f the new sizing function.
-   * @function
-   * @name pv.Layout.treemap.prototype.size
-   * @returns {pv.Layout.treemap} this.
-   */
-  mark.size = function(f) {
-    sizeof = f;
-    return this;
-  };
-
-  return mark;
-};

+ 0 - 45
ext/thirdparty/js/protovis/js/mark/Anchor.js

@@ -1,45 +0,0 @@
-/**
- * Constructs a new mark anchor with default properties.
- *
- * @class Represents an anchor on a given mark. An anchor is itself a mark, but
- * without a visual representation. It serves only to provide useful default
- * properties that can be inherited by other marks. Each type of mark can define
- * any number of named anchors for convenience. If the concrete mark type does
- * not define an anchor implementation specifically, one will be inherited from
- * the mark's parent class.
- *
- * <p>For example, the bar mark provides anchors for its four sides: left,
- * right, top and bottom. Adding a label to the top anchor of a bar,
- *
- * <pre>bar.anchor("top").add(pv.Label);</pre>
- *
- * will render a text label on the top edge of the bar; the top anchor defines
- * the appropriate position properties (top and left), as well as text-rendering
- * properties for convenience (textAlign and textBaseline).
- *
- * @extends pv.Mark
- */
-pv.Anchor = function() {
-  pv.Mark.call(this);
-};
-
-pv.Anchor.prototype = pv.extend(pv.Mark)
-    .property("name");
-
-/**
- * The anchor name. The set of supported anchor names is dependent on the
- * concrete mark type; see the mark type for details. For example, bars support
- * left, right, top and bottom anchors.
- *
- * <p>While anchor names are typically constants, the anchor name is a true
- * property, which means you can specify a function to compute the anchor name
- * dynamically. For instance, if you wanted to alternate top and bottom anchors,
- * saying
- *
- * <pre>m.anchor(function() (this.index % 2) ? "top" : "bottom").add(pv.Dot);</pre>
- *
- * would have the desired effect.
- *
- * @type string
- * @name pv.Anchor.prototype.name
- */

+ 0 - 253
ext/thirdparty/js/protovis/js/mark/Area.js

@@ -1,253 +0,0 @@
-/**
- * Constructs a new area mark with default properties. Areas are not typically
- * constructed directly, but by adding to a panel or an existing mark via
- * {@link pv.Mark#add}.
- *
- * @class Represents an area mark: the solid area between two series of
- * connected line segments. Unsurprisingly, areas are used most frequently for
- * area charts.
- *
- * <p>Just as a line represents a polyline, the <tt>Area</tt> mark type
- * represents a <i>polygon</i>. However, an area is not an arbitrary polygon;
- * vertices are paired either horizontally or vertically into parallel
- * <i>spans</i>, and each span corresponds to an associated datum. Either the
- * width or the height must be specified, but not both; this determines whether
- * the area is horizontally-oriented or vertically-oriented.  Like lines, areas
- * can be stroked and filled with arbitrary colors.
- *
- * <p>See also the <a href="../../api/Area.html">Area guide</a>.
- *
- * @extends pv.Mark
- */
-pv.Area = function() {
-  pv.Mark.call(this);
-};
-
-pv.Area.prototype = pv.extend(pv.Mark)
-    .property("width")
-    .property("height")
-    .property("lineWidth")
-    .property("strokeStyle")
-    .property("fillStyle")
-    .property("segmented")
-    .property("interpolate");
-
-pv.Area.prototype.type = "area";
-
-/**
- * The width of a given span, in pixels; used for horizontal spans. If the width
- * is specified, the height property should be 0 (the default). Either the top
- * or bottom property should be used to space the spans vertically, typically as
- * a multiple of the index.
- *
- * @type number
- * @name pv.Area.prototype.width
- */
-
-/**
- * The height of a given span, in pixels; used for vertical spans. If the height
- * is specified, the width property should be 0 (the default). Either the left
- * or right property should be used to space the spans horizontally, typically
- * as a multiple of the index.
- *
- * @type number
- * @name pv.Area.prototype.height
- */
-
-/**
- * The width of stroked lines, in pixels; used in conjunction with
- * <tt>strokeStyle</tt> to stroke the perimeter of the area. Unlike the
- * {@link Line} mark type, the entire perimeter is stroked, rather than just one
- * edge. The default value of this property is 1.5, but since the default stroke
- * style is null, area marks are not stroked by default.
- *
- * <p>This property is <i>fixed</i> for non-segmented areas. See
- * {@link pv.Mark}.
- *
- * @type number
- * @name pv.Area.prototype.lineWidth
- */
-
-/**
- * The style of stroked lines; used in conjunction with <tt>lineWidth</tt> to
- * stroke the perimeter of the area. Unlike the {@link Line} mark type, the
- * entire perimeter is stroked, rather than just one edge. The default value of
- * this property is null, meaning areas are not stroked by default.
- *
- * <p>This property is <i>fixed</i> for non-segmented areas. See
- * {@link pv.Mark}.
- *
- * @type string
- * @name pv.Area.prototype.strokeStyle
- * @see pv.color
- */
-
-/**
- * The area fill style; if non-null, the interior of the polygon forming the
- * area is filled with the specified color. The default value of this property
- * is a categorical color.
- *
- * <p>This property is <i>fixed</i> for non-segmented areas. See
- * {@link pv.Mark}.
- *
- * @type string
- * @name pv.Area.prototype.fillStyle
- * @see pv.color
- */
-
-/**
- * Whether the area is segmented; whether variations in fill style, stroke
- * style, and the other properties are treated as fixed. Rendering segmented
- * areas is noticeably slower than non-segmented areas.
- *
- * <p>This property is <i>fixed</i>. See {@link pv.Mark}.
- *
- * @type boolean
- * @name pv.Area.prototype.segmented
- */
-
-/**
- * How to interpolate between values. Linear interpolation ("linear") is the
- * default, producing a straight line between points. For piecewise constant
- * functions (i.e., step functions), either "step-before" or "step-after" can be
- * specified.
- *
- * <p>Note: this property is currently supported only on non-segmented areas.
- *
- * <p>This property is <i>fixed</i>. See {@link pv.Mark}.
- *
- * @type string
- * @name pv.Area.prototype.interpolate
- */
-
-/**
- * Default properties for areas. By default, there is no stroke and the fill
- * style is a categorical color.
- *
- * @type pv.Area
- */
-pv.Area.prototype.defaults = new pv.Area()
-    .extend(pv.Mark.prototype.defaults)
-    .lineWidth(1.5)
-    .fillStyle(defaultFillStyle)
-    .interpolate("linear");
-
-/**
- * Constructs a new area anchor with default properties. Areas support five
- * different anchors:<ul>
- *
- * <li>top
- * <li>left
- * <li>center
- * <li>bottom
- * <li>right
- *
- * </ul>In addition to positioning properties (left, right, top bottom), the
- * anchors support text rendering properties (text-align, text-baseline). Text is
- * rendered to appear inside the area polygon.
- *
- * <p>To facilitate stacking of areas, the anchors are defined in terms of their
- * opposite edge. For example, the top anchor defines the bottom property, such
- * that the area grows upwards; the bottom anchor instead defines the top
- * property, such that the area grows downwards. Of course, in general it is
- * more robust to use panels and the cousin accessor to define stacked area
- * marks; see {@link pv.Mark#scene} for an example.
- *
- * @param {string} name the anchor name; either a string or a property function.
- * @returns {pv.Anchor}
- */
-pv.Area.prototype.anchor = function(name) {
-  var area = this;
-  return pv.Mark.prototype.anchor.call(this, name)
-    .left(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return area.left() + area.width() / 2;
-          case "right": return area.left() + area.width();
-        }
-        return null;
-      })
-    .right(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return area.right() + area.width() / 2;
-          case "left": return area.right() + area.width();
-        }
-        return null;
-      })
-    .top(function() {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return area.top() + area.height() / 2;
-          case "bottom": return area.top() + area.height();
-        }
-        return null;
-      })
-    .bottom(function() {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return area.bottom() + area.height() / 2;
-          case "top": return area.bottom() + area.height();
-        }
-        return null;
-      })
-    .textAlign(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return "center";
-          case "right": return "right";
-        }
-        return "left";
-      })
-    .textBaseline(function() {
-        switch (this.name()) {
-          case "right":
-          case "left":
-          case "center": return "middle";
-          case "top": return "top";
-        }
-        return "bottom";
-      });
-};
-
-/**
- * @private Overrides the default behavior of {@link pv.Mark.buildImplied} such
- * that the width and height are set to zero if null.
- *
- * @param s a node in the scene graph; the instance of the mark to build.
- */
-pv.Area.prototype.buildImplied = function(s) {
-  if (s.height == null) s.height = 0;
-  if (s.width == null) s.width = 0;
-  pv.Mark.prototype.buildImplied.call(this, s);
-};
-
-/** @private */
-var pv_Area_specials = {left:1, top:1, right:1, bottom:1, width:1, height:1, name:1};
-
-/** @private */
-pv.Area.prototype.bind = function() {
-  pv.Mark.prototype.bind.call(this);
-  var binds = this.binds,
-      properties = binds.properties,
-      specials = binds.specials = [];
-  for (var i = 0, n = properties.length; i < n; i++) {
-    var p = properties[i];
-    if (p.name in pv_Area_specials) specials.push(p);
-  }
-};
-
-/** @private */
-pv.Area.prototype.buildInstance = function(s) {
-  if (this.index && !this.scene[0].segmented) {
-    this.buildProperties(s, this.binds.specials);
-    this.buildImplied(s);
-  } else {
-    pv.Mark.prototype.buildInstance.call(this, s);
-  }
-};

+ 0 - 182
ext/thirdparty/js/protovis/js/mark/Bar.js

@@ -1,182 +0,0 @@
-/**
- * Constructs a new bar mark with default properties. Bars are not typically
- * constructed directly, but by adding to a panel or an existing mark via
- * {@link pv.Mark#add}.
- *
- * @class Represents a bar: an axis-aligned rectangle that can be stroked and
- * filled. Bars are used for many chart types, including bar charts, histograms
- * and Gantt charts. Bars can also be used as decorations, for example to draw a
- * frame border around a panel; in fact, a panel is a special type (a subclass)
- * of bar.
- *
- * <p>Bars can be positioned in several ways. Most commonly, one of the four
- * corners is fixed using two margins, and then the width and height properties
- * determine the extent of the bar relative to this fixed location. For example,
- * using the bottom and left properties fixes the bottom-left corner; the width
- * then extends to the right, while the height extends to the top. As an
- * alternative to the four corners, a bar can be positioned exclusively using
- * margins; this is convenient as an inset from the containing panel, for
- * example. See {@link pv.Mark} for details on the prioritization of redundant
- * positioning properties.
- *
- * <p>See also the <a href="../../api/Bar.html">Bar guide</a>.
- *
- * @extends pv.Mark
- */
-pv.Bar = function() {
-  pv.Mark.call(this);
-};
-
-pv.Bar.prototype = pv.extend(pv.Mark)
-    .property("width")
-    .property("height")
-    .property("lineWidth")
-    .property("strokeStyle")
-    .property("fillStyle");
-
-pv.Bar.prototype.type = "bar";
-
-/**
- * The width of the bar, in pixels. If the left position is specified, the bar
- * extends rightward from the left edge; if the right position is specified, the
- * bar extends leftward from the right edge.
- *
- * @type number
- * @name pv.Bar.prototype.width
- */
-
-/**
- * The height of the bar, in pixels. If the bottom position is specified, the
- * bar extends upward from the bottom edge; if the top position is specified,
- * the bar extends downward from the top edge.
- *
- * @type number
- * @name pv.Bar.prototype.height
- */
-
-/**
- * The width of stroked lines, in pixels; used in conjunction with
- * <tt>strokeStyle</tt> to stroke the bar's border.
- *
- * @type number
- * @name pv.Bar.prototype.lineWidth
- */
-
-/**
- * The style of stroked lines; used in conjunction with <tt>lineWidth</tt> to
- * stroke the bar's border. The default value of this property is null, meaning
- * bars are not stroked by default.
- *
- * @type string
- * @name pv.Bar.prototype.strokeStyle
- * @see pv.color
- */
-
-/**
- * The bar fill style; if non-null, the interior of the bar is filled with the
- * specified color. The default value of this property is a categorical color.
- *
- * @type string
- * @name pv.Bar.prototype.fillStyle
- * @see pv.color
- */
-
-/**
- * Default properties for bars. By default, there is no stroke and the fill
- * style is a categorical color.
- *
- * @type pv.Bar
- */
-pv.Bar.prototype.defaults = new pv.Bar()
-    .extend(pv.Mark.prototype.defaults)
-    .lineWidth(1.5)
-    .fillStyle(defaultFillStyle);
-
-/**
- * Constructs a new bar anchor with default properties. Bars support five
- * different anchors:<ul>
- *
- * <li>top
- * <li>left
- * <li>center
- * <li>bottom
- * <li>right
- *
- * </ul>In addition to positioning properties (left, right, top bottom), the
- * anchors support text rendering properties (text-align, text-baseline). Text
- * is rendered to appear inside the bar.
- *
- * <p>To facilitate stacking of bars, the anchors are defined in terms of their
- * opposite edge. For example, the top anchor defines the bottom property, such
- * that the bar grows upwards; the bottom anchor instead defines the top
- * property, such that the bar grows downwards. Of course, in general it is more
- * robust to use panels and the cousin accessor to define stacked bars; see
- * {@link pv.Mark#scene} for an example.
- *
- * <p>Bar anchors also "smartly" specify position properties based on whether
- * the derived mark type supports the width and height properties. If the
- * derived mark type does not support these properties (e.g., dots), the
- * position will be centered on the corresponding edge. Otherwise (e.g., bars),
- * the position will be in the opposite side.
- *
- * @param {string} name the anchor name; either a string or a property function.
- * @returns {pv.Anchor}
- */
-pv.Bar.prototype.anchor = function(name) {
-  var bar = this;
-  return pv.Mark.prototype.anchor.call(this, name)
-    .left(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return bar.left() + (this.properties.width ? 0 : (bar.width() / 2));
-          case "right": return bar.left() + bar.width();
-        }
-        return null;
-      })
-    .right(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return bar.right() + (this.properties.width ? 0 : (bar.width() / 2));
-          case "left": return bar.right() + bar.width();
-        }
-        return null;
-      })
-    .top(function() {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return bar.top() + (this.properties.height ? 0 : (bar.height() / 2));
-          case "bottom": return bar.top() + bar.height();
-        }
-        return null;
-      })
-    .bottom(function() {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return bar.bottom() + (this.properties.height ? 0 : (bar.height() / 2));
-          case "top": return bar.bottom() + bar.height();
-        }
-        return null;
-      })
-    .textAlign(function() {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return "center";
-          case "right": return "right";
-        }
-        return "left";
-      })
-    .textBaseline(function() {
-        switch (this.name()) {
-          case "right":
-          case "left":
-          case "center": return "middle";
-          case "top": return "top";
-        }
-        return "bottom";
-      });
-};

+ 0 - 203
ext/thirdparty/js/protovis/js/mark/Dot.js

@@ -1,203 +0,0 @@
-/**
- * Constructs a new dot mark with default properties. Dots are not typically
- * constructed directly, but by adding to a panel or an existing mark via
- * {@link pv.Mark#add}.
- *
- * @class Represents a dot; a dot is simply a sized glyph centered at a given
- * point that can also be stroked and filled. The <tt>size</tt> property is
- * proportional to the area of the rendered glyph to encourage meaningful visual
- * encodings. Dots can visually encode up to eight dimensions of data, though
- * this may be unwise due to integrality. See {@link pv.Mark} for details on the
- * prioritization of redundant positioning properties.
- *
- * <p>See also the <a href="../../api/Dot.html">Dot guide</a>.
- *
- * @extends pv.Mark
- */
-pv.Dot = function() {
-  pv.Mark.call(this);
-};
-
-pv.Dot.prototype = pv.extend(pv.Mark)
-    .property("size")
-    .property("shape")
-    .property("angle")
-    .property("lineWidth")
-    .property("strokeStyle")
-    .property("fillStyle");
-
-pv.Dot.prototype.type = "dot";
-
-/**
- * The size of the dot, in square pixels. Square pixels are used such that the
- * area of the dot is linearly proportional to the value of the size property,
- * facilitating representative encodings.
- *
- * @see #radius
- * @type number
- * @name pv.Dot.prototype.size
- */
-
-/**
- * The shape name. Several shapes are supported:<ul>
- *
- * <li>cross
- * <li>triangle
- * <li>diamond
- * <li>square
- * <li>tick
- * <li>circle
- *
- * </ul>These shapes can be further changed using the {@link #angle} property;
- * for instance, a cross can be turned into a plus by rotating. Similarly, the
- * tick, which is vertical by default, can be rotated horizontally. Note that
- * some shapes (cross and tick) do not have interior areas, and thus do not
- * support fill style meaningfully.
- *
- * <p>Note: it may be more natural to use the {@link pv.Rule} mark for
- * horizontal and vertical ticks. The tick shape is only necessary if angled
- * ticks are needed.
- *
- * @type string
- * @name pv.Dot.prototype.shape
- */
-
-/**
- * The rotation angle, in radians. Used to rotate shapes, such as to turn a
- * cross into a plus.
- *
- * @type number
- * @name pv.Dot.prototype.angle
- */
-
-/**
- * The width of stroked lines, in pixels; used in conjunction with
- * <tt>strokeStyle</tt> to stroke the dot's shape.
- *
- * @type number
- * @name pv.Dot.prototype.lineWidth
- */
-
-/**
- * The style of stroked lines; used in conjunction with <tt>lineWidth</tt> to
- * stroke the dot's shape. The default value of this property is a categorical
- * color.
- *
- * @type string
- * @name pv.Dot.prototype.strokeStyle
- * @see pv.color
- */
-
-/**
- * The fill style; if non-null, the interior of the dot is filled with the
- * specified color. The default value of this property is null, meaning dots are
- * not filled by default.
- *
- * @type string
- * @name pv.Dot.prototype.fillStyle
- * @see pv.color
- */
-
-/**
- * Default properties for dots. By default, there is no fill and the stroke
- * style is a categorical color. The default shape is "circle" with size 20.
- *
- * @type pv.Dot
- */
-pv.Dot.prototype.defaults = new pv.Dot()
-    .extend(pv.Mark.prototype.defaults)
-    .size(20)
-    .shape("circle")
-    .lineWidth(1.5)
-    .strokeStyle(defaultStrokeStyle);
-
-/**
- * Constructs a new dot anchor with default properties. Dots support five
- * different anchors:<ul>
- *
- * <li>top
- * <li>left
- * <li>center
- * <li>bottom
- * <li>right
- *
- * </ul>In addition to positioning properties (left, right, top bottom), the
- * anchors support text rendering properties (text-align, text-baseline). Text is
- * rendered to appear outside the dot. Note that this behavior is different from
- * other mark anchors, which default to rendering text <i>inside</i> the mark.
- *
- * <p>For consistency with the other mark types, the anchor positions are
- * defined in terms of their opposite edge. For example, the top anchor defines
- * the bottom property, such that a bar added to the top anchor grows upward.
- *
- * @param {string} name the anchor name; either a string or a property function.
- * @returns {pv.Anchor}
- */
-pv.Dot.prototype.anchor = function(name) {
-  var dot = this;
-  return pv.Mark.prototype.anchor.call(this, name)
-    .left(function(d) {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return dot.left();
-          case "right": return dot.left() + dot.radius();
-        }
-        return null;
-      })
-    .right(function(d) {
-        switch (this.name()) {
-          case "bottom":
-          case "top":
-          case "center": return dot.right();
-          case "left": return dot.right() + dot.radius();
-        }
-        return null;
-      })
-    .top(function(d) {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return dot.top();
-          case "bottom": return dot.top() + dot.radius();
-        }
-        return null;
-      })
-    .bottom(function(d) {
-        switch (this.name()) {
-          case "left":
-          case "right":
-          case "center": return dot.bottom();
-          case "top": return dot.bottom() + dot.radius();
-        }
-        return null;
-      })
-    .textAlign(function(d) {
-        switch (this.name()) {
-          case "left": return "right";
-          case "bottom":
-          case "top":
-          case "center": return "center";
-        }
-        return "left";
-      })
-    .textBaseline(function(d) {
-        switch (this.name()) {
-          case "right":
-          case "left":
-          case "center": return "middle";
-          case "bottom": return "top";
-        }
-        return "bottom";
-      });
-};
-
-/**
- * Returns the radius of the dot, which is defined to be the square root of the
- * {@link #size} property.
- *
- * @returns {number} the radius.
- */
-pv.Dot.prototype.radius = function() {
-  return Math.sqrt(this.size());
-};

+ 0 - 48
ext/thirdparty/js/protovis/js/mark/Image.js

@@ -1,48 +0,0 @@
-/**
- * Constructs a new dot mark with default properties. Images are not typically
- * constructed directly, but by adding to a panel or an existing mark via
- * {@link pv.Mark#add}.
- *
- * @class Represents an image. Images share the same layout and style properties as
- * bars, in conjunction with an external image such as PNG or JPEG. The image is
- * specified via the {@link #url} property. The fill, if specified, appears
- * beneath the image, while the optional stroke appears above the image.
- *
- * <p>TODO Restore support for dynamic images (such as heatmaps). These were
- * supported in the canvas implementation using the pixel buffer API; although
- * SVG does not support pixel manipulation, it is possible to embed a canvas
- * element in SVG using foreign objects.
- *
- * <p>TODO Allow different modes of image placement: "scale" -- scale and
- * preserve aspect ratio, "tile" -- repeat the image, "center" -- center the
- * image, "fill" -- scale without preserving aspect ratio.
- *
- * <p>See {@link pv.Bar} for details on positioning properties.
- *
- * @extends pv.Bar
- */
-pv.Image = function() {
-  pv.Bar.call(this);
-};
-
-pv.Image.prototype = pv.extend(pv.Bar)
-    .property("url");
-
-pv.Image.prototype.type = "image";
-
-/**
- * The URL of the image to display. The set of supported image types is
- * browser-dependent; PNG and JPEG are recommended.
- *
- * @type string
- * @name pv.Image.prototype.url
- */
-
-/**
- * Default properties for images. By default, there is no stroke or fill style.
- *
- * @type pv.Image
- */
-pv.Image.prototype.defaults = new pv.Image()
-    .extend(pv.Bar.prototype.defaults)
-    .fillStyle(null);

+ 0 - 144
ext/thirdparty/js/protovis/js/mark/Label.js

@@ -1,144 +0,0 @@
-/**
- * Constructs a new label mark with default properties. Labels are not typically
- * constructed directly, but by adding to a panel or an existing mark via
- * {@link pv.Mark#add}.
- *
- * @class Represents a text label, allowing textual annotation of other marks or
- * arbitrary text within the visualization. The character data must be plain
- * text (unicode), though the text can be styled using the {@link #font}
- * property. If rich text is needed, external HTML elements can be overlaid on
- * the canvas by hand.
- *
- * <p>Labels are positioned using the box model, similarly to {@link Dot}. Thus,
- * a label has no width or height, but merely a text anchor location. The text
- * is positioned relative to this anchor location based on the
- * {@link #textAlign}, {@link #textBaseline} and {@link #textMargin} properties.
- * Furthermore, the text may be rotated using {@link #textAngle}.
- *
- * <p>Labels ignore events, so as to not interfere with event handlers on
- * underlying marks, such as bars. In the future, we may support event handlers
- * on labels.
- *
- * <p>See also the <a href="../../api/Label.html">Label guide</a>.
- *
- * @extends pv.Mark
- */
-pv.Label = function() {
-  pv.Mark.call(this);
-};
-
-pv.Label.prototype = pv.extend(pv.Mark)
-    .property("text")
-    .property("font")
-    .property("textAngle")
-    .property("textStyle")
-    .property("textAlign")
-    .property("textBaseline")
-    .property("textMargin")
-    .property("textShadow");
-
-pv.Label.prototype.type = "label";
-
-/**
- * The character data to render; a string. The default value of the text
- * property is the identity function, meaning the label's associated datum will
- * be rendered using its <tt>toString</tt>.
- *
- * @type string
- * @name pv.Label.prototype.text
- */
-
-/**
- * The font format, per the CSS Level 2 specification. The default font is "10px
- * sans-serif", for consistency with the HTML 5 canvas element specification.
- * Note that since text is not wrapped, any line-height property will be
- * ignored. The other font-style, font-variant, font-weight, font-size and
- * font-family properties are supported.
- *
- * @see <a href="http://www.w3.org/TR/CSS2/fonts.html#font-shorthand">CSS2 fonts</a>
- * @type string
- * @name pv.Label.prototype.font
- */
-
-/**
- * The rotation angle, in radians. Text is rotated clockwise relative to the
- * anchor location. For example, with the default left alignment, an angle of
- * Math.PI / 2 causes text to proceed downwards. The default angle is zero.
- *
- * @type number
- * @name pv.Label.prototype.textAngle
- */
-
-/**
- * The text color. The name "textStyle" is used for consistency with "fillStyle"
- * and "strokeStyle", although it might be better to rename this property (and
- * perhaps use the same name as "strokeStyle"). The default color is black.
- *
- * @type string
- * @name pv.Label.prototype.textStyle
- * @see pv.color
- */
-
-/**
- * The horizontal text alignment. One of:<ul>
- *
- * <li>left
- * <li>center
- * <li>right
- *
- * </ul>The default horizontal alignment is left.
- *
- * @type string
- * @name pv.Label.prototype.textAlign
- */
-
-/**
- * The vertical text alignment. One of:<ul>
- *
- * <li>top
- * <li>middle
- * <li>bottom
- *
- * </ul>The default vertical alignment is bottom.
- *
- * @type string
- * @name pv.Label.prototype.textBaseline
- */
-
-/**
- * The text margin; may be specified in pixels, or in font-dependent units (such
- * as ".1ex"). The margin can be used to pad text away from its anchor location,
- * in a direction dependent on the horizontal and vertical alignment
- * properties. For example, if the text is left- and middle-aligned, the margin
- * shifts the text to the right. The default margin is 3 pixels.
- *
- * @type number
- * @name pv.Label.prototype.textMargin
- */
-
-/**
- * A list of shadow effects to be applied to text, per the CSS Text Level 3
- * text-shadow property. An example specification is "0.1em 0.1em 0.1em
- * rgba(0,0,0,.5)"; the first length is the horizontal offset, the second the
- * vertical offset, and the third the blur radius.
- *
- * @see <a href="http://www.w3.org/TR/css3-text/#text-shadow">CSS3 text</a>
- * @type string
- * @name pv.Label.prototype.textShadow
- */
-
-/**
- * Default properties for labels. See the individual properties for the default
- * values.
- *
- * @type pv.Label
- */
-pv.Label.prototype.defaults = new pv.Label()
-    .extend(pv.Mark.prototype.defaults)
-    .text(pv.identity)
-    .font("10px sans-serif")
-    .textAngle(0)
-    .textStyle("black")
-    .textAlign("left")
-    .textBaseline("bottom")
-    .textMargin(3);

Some files were not shown because too many files changed in this diff