reportbuilder 1.2.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.txt +6 -0
  3. data/Manifest.txt +377 -0
  4. data/data/flot/API.txt +1024 -0
  5. data/data/flot/FAQ.txt +71 -0
  6. data/data/flot/LICENSE.txt +22 -0
  7. data/data/flot/Makefile +15 -0
  8. data/data/flot/NEWS.txt +340 -0
  9. data/data/flot/PLUGINS.txt +105 -0
  10. data/data/flot/README.txt +81 -0
  11. data/data/flot/examples/ajax.html +143 -0
  12. data/data/flot/examples/annotating.html +75 -0
  13. data/data/flot/examples/arrow-down.gif +0 -0
  14. data/data/flot/examples/arrow-left.gif +0 -0
  15. data/data/flot/examples/arrow-right.gif +0 -0
  16. data/data/flot/examples/arrow-up.gif +0 -0
  17. data/data/flot/examples/basic.html +38 -0
  18. data/data/flot/examples/data-eu-gdp-growth-1.json +4 -0
  19. data/data/flot/examples/data-eu-gdp-growth-2.json +4 -0
  20. data/data/flot/examples/data-eu-gdp-growth-3.json +4 -0
  21. data/data/flot/examples/data-eu-gdp-growth-4.json +4 -0
  22. data/data/flot/examples/data-eu-gdp-growth-5.json +4 -0
  23. data/data/flot/examples/data-eu-gdp-growth.json +4 -0
  24. data/data/flot/examples/data-japan-gdp-growth.json +4 -0
  25. data/data/flot/examples/data-usa-gdp-growth.json +4 -0
  26. data/data/flot/examples/dual-axis.html +39 -0
  27. data/data/flot/examples/graph-types.html +75 -0
  28. data/data/flot/examples/hs-2004-27-a-large_web.jpg +0 -0
  29. data/data/flot/examples/image.html +45 -0
  30. data/data/flot/examples/index.html +43 -0
  31. data/data/flot/examples/interacting.html +93 -0
  32. data/data/flot/examples/layout.css +6 -0
  33. data/data/flot/examples/navigate.html +118 -0
  34. data/data/flot/examples/selection.html +114 -0
  35. data/data/flot/examples/setting-options.html +65 -0
  36. data/data/flot/examples/stacking.html +77 -0
  37. data/data/flot/examples/thresholding.html +54 -0
  38. data/data/flot/examples/time.html +71 -0
  39. data/data/flot/examples/tracking.html +95 -0
  40. data/data/flot/examples/turning-series.html +98 -0
  41. data/data/flot/examples/visitors.html +90 -0
  42. data/data/flot/examples/zooming.html +98 -0
  43. data/data/flot/excanvas.js +1427 -0
  44. data/data/flot/excanvas.min.js +1 -0
  45. data/data/flot/jquery.colorhelpers.js +174 -0
  46. data/data/flot/jquery.colorhelpers.min.js +1 -0
  47. data/data/flot/jquery.flot.crosshair.js +156 -0
  48. data/data/flot/jquery.flot.crosshair.min.js +1 -0
  49. data/data/flot/jquery.flot.image.js +237 -0
  50. data/data/flot/jquery.flot.image.min.js +1 -0
  51. data/data/flot/jquery.flot.js +2119 -0
  52. data/data/flot/jquery.flot.min.js +1 -0
  53. data/data/flot/jquery.flot.navigate.js +272 -0
  54. data/data/flot/jquery.flot.navigate.min.js +1 -0
  55. data/data/flot/jquery.flot.selection.js +299 -0
  56. data/data/flot/jquery.flot.selection.min.js +1 -0
  57. data/data/flot/jquery.flot.stack.js +152 -0
  58. data/data/flot/jquery.flot.stack.min.js +1 -0
  59. data/data/flot/jquery.flot.threshold.js +103 -0
  60. data/data/flot/jquery.flot.threshold.min.js +1 -0
  61. data/data/flot/jquery.js +4376 -0
  62. data/data/flot/jquery.min.js +19 -0
  63. data/data/jqplot/MIT-LICENSE.txt +21 -0
  64. data/data/jqplot/README.txt +73 -0
  65. data/data/jqplot/changes.txt +261 -0
  66. data/data/jqplot/copyright.txt +33 -0
  67. data/data/jqplot/docs/files/MIT-LICENSE-txt.html +39 -0
  68. data/data/jqplot/docs/files/changes-txt.html +39 -0
  69. data/data/jqplot/docs/files/gpl-2-0-txt.html +39 -0
  70. data/data/jqplot/docs/files/images/background.jpg +0 -0
  71. data/data/jqplot/docs/files/images/basicline.png +0 -0
  72. data/data/jqplot/docs/files/images/basiclogaxis.png +0 -0
  73. data/data/jqplot/docs/files/images/basiclogoptions.png +0 -0
  74. data/data/jqplot/docs/files/images/basicoptions.png +0 -0
  75. data/data/jqplot/docs/files/images/dualaxis.png +0 -0
  76. data/data/jqplot/docs/files/images/logo.jpg +0 -0
  77. data/data/jqplot/docs/files/images/navdocs.png +0 -0
  78. data/data/jqplot/docs/files/images/navdocsover.png +0 -0
  79. data/data/jqplot/docs/files/images/navdownload.png +0 -0
  80. data/data/jqplot/docs/files/images/navdownloadover.png +0 -0
  81. data/data/jqplot/docs/files/images/navexamples.png +0 -0
  82. data/data/jqplot/docs/files/images/navexamplesover.png +0 -0
  83. data/data/jqplot/docs/files/images/navhome.png +0 -0
  84. data/data/jqplot/docs/files/images/navhomeover.png +0 -0
  85. data/data/jqplot/docs/files/images/new.png +0 -0
  86. data/data/jqplot/docs/files/images/sample3.png +0 -0
  87. data/data/jqplot/docs/files/images/samplesm.png +0 -0
  88. data/data/jqplot/docs/files/jqPlotCssStyling-txt.html +39 -0
  89. data/data/jqplot/docs/files/jqPlotOptions-txt.html +292 -0
  90. data/data/jqplot/docs/files/jqplot-axisLabelRenderer-js.html +47 -0
  91. data/data/jqplot/docs/files/jqplot-axisTickRenderer-js.html +69 -0
  92. data/data/jqplot/docs/files/jqplot-canvasGridRenderer-js.html +39 -0
  93. data/data/jqplot/docs/files/jqplot-core-js.html +353 -0
  94. data/data/jqplot/docs/files/jqplot-divTitleRenderer-js.html +39 -0
  95. data/data/jqplot/docs/files/jqplot-lineRenderer-js.html +53 -0
  96. data/data/jqplot/docs/files/jqplot-linearAxisRenderer-js.html +39 -0
  97. data/data/jqplot/docs/files/jqplot-markerRenderer-js.html +65 -0
  98. data/data/jqplot/docs/files/jqplot-shadowRenderer-js.html +61 -0
  99. data/data/jqplot/docs/files/jqplot-shapeRenderer-js.html +63 -0
  100. data/data/jqplot/docs/files/jqplot-themeEngine-js.html +190 -0
  101. data/data/jqplot/docs/files/optionsTutorial-txt.html +119 -0
  102. data/data/jqplot/docs/files/plugins/jqplot-BezierCurveRenderer-js.html +45 -0
  103. data/data/jqplot/docs/files/plugins/jqplot-barRenderer-js.html +67 -0
  104. data/data/jqplot/docs/files/plugins/jqplot-blockRenderer-js.html +53 -0
  105. data/data/jqplot/docs/files/plugins/jqplot-bubbleRenderer-js.html +71 -0
  106. data/data/jqplot/docs/files/plugins/jqplot-canvasAxisLabelRenderer-js.html +63 -0
  107. data/data/jqplot/docs/files/plugins/jqplot-canvasAxisTickRenderer-js.html +79 -0
  108. data/data/jqplot/docs/files/plugins/jqplot-categoryAxisRenderer-js.html +46 -0
  109. data/data/jqplot/docs/files/plugins/jqplot-cursor-js.html +91 -0
  110. data/data/jqplot/docs/files/plugins/jqplot-dateAxisRenderer-js.html +93 -0
  111. data/data/jqplot/docs/files/plugins/jqplot-donutRenderer-js.html +98 -0
  112. data/data/jqplot/docs/files/plugins/jqplot-dragable-js.html +45 -0
  113. data/data/jqplot/docs/files/plugins/jqplot-enhancedLegendRenderer-js.html +49 -0
  114. data/data/jqplot/docs/files/plugins/jqplot-funnelRenderer-js.html +87 -0
  115. data/data/jqplot/docs/files/plugins/jqplot-highlighter-js.html +80 -0
  116. data/data/jqplot/docs/files/plugins/jqplot-logAxisRenderer-js.html +45 -0
  117. data/data/jqplot/docs/files/plugins/jqplot-mekkoAxisRenderer-js.html +49 -0
  118. data/data/jqplot/docs/files/plugins/jqplot-mekkoRenderer-js.html +62 -0
  119. data/data/jqplot/docs/files/plugins/jqplot-meterGaugeRenderer-js.html +103 -0
  120. data/data/jqplot/docs/files/plugins/jqplot-ohlcRenderer-js.html +65 -0
  121. data/data/jqplot/docs/files/plugins/jqplot-pieRenderer-js.html +93 -0
  122. data/data/jqplot/docs/files/plugins/jqplot-pointLabels-js.html +72 -0
  123. data/data/jqplot/docs/files/plugins/jqplot-trendline-js.html +67 -0
  124. data/data/jqplot/docs/files/usage-txt.html +58 -0
  125. data/data/jqplot/docs/index.html +1 -0
  126. data/data/jqplot/docs/index/Classes.html +58 -0
  127. data/data/jqplot/docs/index/Files.html +34 -0
  128. data/data/jqplot/docs/index/Functions.html +66 -0
  129. data/data/jqplot/docs/index/General.html +46 -0
  130. data/data/jqplot/docs/index/General2.html +46 -0
  131. data/data/jqplot/docs/index/General3.html +46 -0
  132. data/data/jqplot/docs/index/General4.html +50 -0
  133. data/data/jqplot/docs/index/General5.html +34 -0
  134. data/data/jqplot/docs/index/General6.html +58 -0
  135. data/data/jqplot/docs/index/Hooks.html +46 -0
  136. data/data/jqplot/docs/index/Properties.html +50 -0
  137. data/data/jqplot/docs/index/Properties2.html +50 -0
  138. data/data/jqplot/docs/index/Properties3.html +50 -0
  139. data/data/jqplot/docs/index/Properties4.html +34 -0
  140. data/data/jqplot/docs/index/Properties5.html +58 -0
  141. data/data/jqplot/docs/javascript/main.js +836 -0
  142. data/data/jqplot/docs/javascript/searchdata.js +182 -0
  143. data/data/jqplot/docs/search/ClassesA.html +20 -0
  144. data/data/jqplot/docs/search/ClassesG.html +20 -0
  145. data/data/jqplot/docs/search/ClassesJ.html +20 -0
  146. data/data/jqplot/docs/search/ClassesL.html +20 -0
  147. data/data/jqplot/docs/search/ClassesS.html +20 -0
  148. data/data/jqplot/docs/search/ClassesSymbols.html +20 -0
  149. data/data/jqplot/docs/search/ClassesT.html +20 -0
  150. data/data/jqplot/docs/search/FilesJ.html +20 -0
  151. data/data/jqplot/docs/search/FunctionsC.html +20 -0
  152. data/data/jqplot/docs/search/FunctionsD.html +20 -0
  153. data/data/jqplot/docs/search/FunctionsG.html +20 -0
  154. data/data/jqplot/docs/search/FunctionsI.html +20 -0
  155. data/data/jqplot/docs/search/FunctionsM.html +20 -0
  156. data/data/jqplot/docs/search/FunctionsN.html +20 -0
  157. data/data/jqplot/docs/search/FunctionsR.html +20 -0
  158. data/data/jqplot/docs/search/FunctionsS.html +20 -0
  159. data/data/jqplot/docs/search/FunctionsZ.html +20 -0
  160. data/data/jqplot/docs/search/GeneralA.html +20 -0
  161. data/data/jqplot/docs/search/GeneralB.html +20 -0
  162. data/data/jqplot/docs/search/GeneralC.html +20 -0
  163. data/data/jqplot/docs/search/GeneralD.html +20 -0
  164. data/data/jqplot/docs/search/GeneralE.html +20 -0
  165. data/data/jqplot/docs/search/GeneralF.html +20 -0
  166. data/data/jqplot/docs/search/GeneralG.html +20 -0
  167. data/data/jqplot/docs/search/GeneralH.html +20 -0
  168. data/data/jqplot/docs/search/GeneralI.html +20 -0
  169. data/data/jqplot/docs/search/GeneralJ.html +20 -0
  170. data/data/jqplot/docs/search/GeneralL.html +20 -0
  171. data/data/jqplot/docs/search/GeneralM.html +20 -0
  172. data/data/jqplot/docs/search/GeneralN.html +20 -0
  173. data/data/jqplot/docs/search/GeneralO.html +20 -0
  174. data/data/jqplot/docs/search/GeneralP.html +20 -0
  175. data/data/jqplot/docs/search/GeneralR.html +20 -0
  176. data/data/jqplot/docs/search/GeneralS.html +20 -0
  177. data/data/jqplot/docs/search/GeneralSymbols.html +20 -0
  178. data/data/jqplot/docs/search/GeneralT.html +20 -0
  179. data/data/jqplot/docs/search/GeneralU.html +20 -0
  180. data/data/jqplot/docs/search/GeneralV.html +20 -0
  181. data/data/jqplot/docs/search/GeneralW.html +20 -0
  182. data/data/jqplot/docs/search/GeneralX.html +20 -0
  183. data/data/jqplot/docs/search/GeneralY.html +20 -0
  184. data/data/jqplot/docs/search/GeneralZ.html +20 -0
  185. data/data/jqplot/docs/search/HooksA.html +20 -0
  186. data/data/jqplot/docs/search/HooksE.html +20 -0
  187. data/data/jqplot/docs/search/HooksJ.html +20 -0
  188. data/data/jqplot/docs/search/HooksP.html +20 -0
  189. data/data/jqplot/docs/search/NoResults.html +15 -0
  190. data/data/jqplot/docs/search/PropertiesA.html +20 -0
  191. data/data/jqplot/docs/search/PropertiesB.html +20 -0
  192. data/data/jqplot/docs/search/PropertiesC.html +20 -0
  193. data/data/jqplot/docs/search/PropertiesD.html +20 -0
  194. data/data/jqplot/docs/search/PropertiesE.html +20 -0
  195. data/data/jqplot/docs/search/PropertiesF.html +20 -0
  196. data/data/jqplot/docs/search/PropertiesG.html +20 -0
  197. data/data/jqplot/docs/search/PropertiesH.html +20 -0
  198. data/data/jqplot/docs/search/PropertiesI.html +20 -0
  199. data/data/jqplot/docs/search/PropertiesL.html +20 -0
  200. data/data/jqplot/docs/search/PropertiesM.html +20 -0
  201. data/data/jqplot/docs/search/PropertiesN.html +20 -0
  202. data/data/jqplot/docs/search/PropertiesO.html +20 -0
  203. data/data/jqplot/docs/search/PropertiesP.html +20 -0
  204. data/data/jqplot/docs/search/PropertiesR.html +20 -0
  205. data/data/jqplot/docs/search/PropertiesS.html +20 -0
  206. data/data/jqplot/docs/search/PropertiesT.html +20 -0
  207. data/data/jqplot/docs/search/PropertiesU.html +20 -0
  208. data/data/jqplot/docs/search/PropertiesV.html +20 -0
  209. data/data/jqplot/docs/search/PropertiesW.html +20 -0
  210. data/data/jqplot/docs/search/PropertiesX.html +20 -0
  211. data/data/jqplot/docs/search/PropertiesY.html +20 -0
  212. data/data/jqplot/docs/search/PropertiesZ.html +20 -0
  213. data/data/jqplot/docs/styles/1.css +767 -0
  214. data/data/jqplot/docs/styles/2.css +174 -0
  215. data/data/jqplot/docs/styles/main.css +2 -0
  216. data/data/jqplot/examples/.htaccess +1 -0
  217. data/data/jqplot/examples/OHLC.html +333 -0
  218. data/data/jqplot/examples/OHLC2.html +193 -0
  219. data/data/jqplot/examples/area.html +107 -0
  220. data/data/jqplot/examples/axisLabel.html +117 -0
  221. data/data/jqplot/examples/axisLabelsRotatedText.html +131 -0
  222. data/data/jqplot/examples/axisLabelsRotatedText2.html +155 -0
  223. data/data/jqplot/examples/barLinePieStack.html +198 -0
  224. data/data/jqplot/examples/barMissingValues.html +64 -0
  225. data/data/jqplot/examples/barTest.html +283 -0
  226. data/data/jqplot/examples/barTest2.html +74 -0
  227. data/data/jqplot/examples/bezierCurve.html +96 -0
  228. data/data/jqplot/examples/blockPlot.html +149 -0
  229. data/data/jqplot/examples/bubbleChart2.html +253 -0
  230. data/data/jqplot/examples/bubblechart.html +69 -0
  231. data/data/jqplot/examples/catchError.html +53 -0
  232. data/data/jqplot/examples/categoryHorizontalBar.html +81 -0
  233. data/data/jqplot/examples/categoryVsLinearAxes.html +74 -0
  234. data/data/jqplot/examples/chartInTable.html +33 -0
  235. data/data/jqplot/examples/customHighlighterCursorTrendline.html +72 -0
  236. data/data/jqplot/examples/customPieTests.html +73 -0
  237. data/data/jqplot/examples/dataLabels.html +192 -0
  238. data/data/jqplot/examples/dataTracking.html +91 -0
  239. data/data/jqplot/examples/donutTest.html +89 -0
  240. data/data/jqplot/examples/donutTest.js +96 -0
  241. data/data/jqplot/examples/examples.css +19 -0
  242. data/data/jqplot/examples/fillToZero.html +126 -0
  243. data/data/jqplot/examples/filledLine.html +78 -0
  244. data/data/jqplot/examples/filledLineCategoryAxis.html +80 -0
  245. data/data/jqplot/examples/funnelTest.html +82 -0
  246. data/data/jqplot/examples/funnelTest.js +74 -0
  247. data/data/jqplot/examples/gridCustomization.html +56 -0
  248. data/data/jqplot/examples/hiddenPlot.html +216 -0
  249. data/data/jqplot/examples/highlighter.html +95 -0
  250. data/data/jqplot/examples/highlighter2.html +63 -0
  251. data/data/jqplot/examples/horizontalLine.html +51 -0
  252. data/data/jqplot/examples/intticks.html +178 -0
  253. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  254. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  255. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  256. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  257. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  258. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  259. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  260. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  261. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  262. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  263. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  264. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  265. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  266. data/data/jqplot/examples/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  267. data/data/jqplot/examples/jquery-ui/css/ui-lightness/jquery-ui-1.8.1.custom.css +486 -0
  268. data/data/jqplot/examples/jquery-ui/js/jquery-1.4.2.min.js +154 -0
  269. data/data/jqplot/examples/jquery-ui/js/jquery-ui-1.8.1.custom.min.js +756 -0
  270. data/data/jqplot/examples/legendLabels.html +205 -0
  271. data/data/jqplot/examples/legendLabels2.html +228 -0
  272. data/data/jqplot/examples/liz.zip +0 -0
  273. data/data/jqplot/examples/markerStyles.html +44 -0
  274. data/data/jqplot/examples/mekkoChart.html +217 -0
  275. data/data/jqplot/examples/meterGauge.html +132 -0
  276. data/data/jqplot/examples/meterGauge2.html +158 -0
  277. data/data/jqplot/examples/minMaxLines.html +61 -0
  278. data/data/jqplot/examples/missingValues.html +119 -0
  279. data/data/jqplot/examples/multiAxesRotatedText.html +70 -0
  280. data/data/jqplot/examples/multipleBarColors.html +149 -0
  281. data/data/jqplot/examples/multipleLines.html +47 -0
  282. data/data/jqplot/examples/multipleYAxes.html +85 -0
  283. data/data/jqplot/examples/nav.inc +35 -0
  284. data/data/jqplot/examples/pieTest.html +77 -0
  285. data/data/jqplot/examples/pieTest2.html +87 -0
  286. data/data/jqplot/examples/pieTest2.js +80 -0
  287. data/data/jqplot/examples/pieTest3.html +100 -0
  288. data/data/jqplot/examples/pointLabels.html +94 -0
  289. data/data/jqplot/examples/pointLabels2.html +47 -0
  290. data/data/jqplot/examples/prefix.html +90 -0
  291. data/data/jqplot/examples/resizablePlot.html +150 -0
  292. data/data/jqplot/examples/rotatedTickLabels.html +61 -0
  293. data/data/jqplot/examples/rotatedTickLabelsZoom.html +68 -0
  294. data/data/jqplot/examples/seriesCanvasReorder.html +93 -0
  295. data/data/jqplot/examples/seriesUpdate.html +123 -0
  296. data/data/jqplot/examples/shadowTests.html +133 -0
  297. data/data/jqplot/examples/singlePoint.html +70 -0
  298. data/data/jqplot/examples/sparkLine.html +48 -0
  299. data/data/jqplot/examples/stackedBar2.html +104 -0
  300. data/data/jqplot/examples/stackedBar3.html +76 -0
  301. data/data/jqplot/examples/stackedBarCategoryVsLinearAxes.html +121 -0
  302. data/data/jqplot/examples/stackedCategoryAxis.html +89 -0
  303. data/data/jqplot/examples/stackedFilledLine.html +77 -0
  304. data/data/jqplot/examples/stackedLine.html +56 -0
  305. data/data/jqplot/examples/test2.html +64 -0
  306. data/data/jqplot/examples/theming.html +483 -0
  307. data/data/jqplot/examples/trendlineDragableCustomization.html +79 -0
  308. data/data/jqplot/examples/verticalLine.html +52 -0
  309. data/data/jqplot/examples/waterfall.html +135 -0
  310. data/data/jqplot/examples/zoom1.html +125 -0
  311. data/data/jqplot/examples/zoom2.html +73 -0
  312. data/data/jqplot/examples/zoom3.html +69 -0
  313. data/data/jqplot/examples/zoomOptions.html +101 -0
  314. data/data/jqplot/examples/zoomProxy.html +108 -0
  315. data/data/jqplot/excanvas.js +1416 -0
  316. data/data/jqplot/excanvas.min.js +35 -0
  317. data/data/jqplot/gpl-2.0.txt +280 -0
  318. data/data/jqplot/jqPlotCssStyling.txt +53 -0
  319. data/data/jqplot/jqPlotOptions.txt +276 -0
  320. data/data/jqplot/jquery-1.4.1.min.js +152 -0
  321. data/data/jqplot/jquery-1.4.2.min.js +154 -0
  322. data/data/jqplot/jquery.jqplot.css +212 -0
  323. data/data/jqplot/jquery.jqplot.js +7004 -0
  324. data/data/jqplot/jquery.jqplot.min.css +1 -0
  325. data/data/jqplot/jquery.jqplot.min.js +34 -0
  326. data/data/jqplot/optionsTutorial.txt +239 -0
  327. data/data/jqplot/plugins/jqplot.BezierCurveRenderer.js +300 -0
  328. data/data/jqplot/plugins/jqplot.BezierCurveRenderer.min.js +34 -0
  329. data/data/jqplot/plugins/jqplot.barRenderer.js +629 -0
  330. data/data/jqplot/plugins/jqplot.barRenderer.min.js +34 -0
  331. data/data/jqplot/plugins/jqplot.blockRenderer.js +221 -0
  332. data/data/jqplot/plugins/jqplot.blockRenderer.min.js +34 -0
  333. data/data/jqplot/plugins/jqplot.bubbleRenderer.js +724 -0
  334. data/data/jqplot/plugins/jqplot.bubbleRenderer.min.js +34 -0
  335. data/data/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js +187 -0
  336. data/data/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js +34 -0
  337. data/data/jqplot/plugins/jqplot.canvasAxisTickRenderer.js +226 -0
  338. data/data/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js +34 -0
  339. data/data/jqplot/plugins/jqplot.canvasTextRenderer.js +408 -0
  340. data/data/jqplot/plugins/jqplot.canvasTextRenderer.min.js +34 -0
  341. data/data/jqplot/plugins/jqplot.categoryAxisRenderer.js +630 -0
  342. data/data/jqplot/plugins/jqplot.categoryAxisRenderer.min.js +34 -0
  343. data/data/jqplot/plugins/jqplot.cursor.js +952 -0
  344. data/data/jqplot/plugins/jqplot.cursor.min.js +34 -0
  345. data/data/jqplot/plugins/jqplot.dateAxisRenderer.js +313 -0
  346. data/data/jqplot/plugins/jqplot.dateAxisRenderer.min.js +34 -0
  347. data/data/jqplot/plugins/jqplot.donutRenderer.js +876 -0
  348. data/data/jqplot/plugins/jqplot.donutRenderer.min.js +34 -0
  349. data/data/jqplot/plugins/jqplot.dragable.js +206 -0
  350. data/data/jqplot/plugins/jqplot.dragable.min.js +34 -0
  351. data/data/jqplot/plugins/jqplot.enhancedLegendRenderer.js +186 -0
  352. data/data/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js +34 -0
  353. data/data/jqplot/plugins/jqplot.funnelRenderer.js +918 -0
  354. data/data/jqplot/plugins/jqplot.funnelRenderer.min.js +34 -0
  355. data/data/jqplot/plugins/jqplot.highlighter.js +374 -0
  356. data/data/jqplot/plugins/jqplot.highlighter.min.js +34 -0
  357. data/data/jqplot/plugins/jqplot.logAxisRenderer.js +434 -0
  358. data/data/jqplot/plugins/jqplot.logAxisRenderer.min.js +34 -0
  359. data/data/jqplot/plugins/jqplot.mekkoAxisRenderer.js +595 -0
  360. data/data/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js +34 -0
  361. data/data/jqplot/plugins/jqplot.mekkoRenderer.js +419 -0
  362. data/data/jqplot/plugins/jqplot.mekkoRenderer.min.js +34 -0
  363. data/data/jqplot/plugins/jqplot.meterGaugeRenderer.js +1112 -0
  364. data/data/jqplot/plugins/jqplot.meterGaugeRenderer.min.js +34 -0
  365. data/data/jqplot/plugins/jqplot.ohlcRenderer.js +343 -0
  366. data/data/jqplot/plugins/jqplot.ohlcRenderer.min.js +34 -0
  367. data/data/jqplot/plugins/jqplot.pieRenderer.js +749 -0
  368. data/data/jqplot/plugins/jqplot.pieRenderer.min.js +34 -0
  369. data/data/jqplot/plugins/jqplot.pointLabels.js +325 -0
  370. data/data/jqplot/plugins/jqplot.pointLabels.min.js +34 -0
  371. data/data/jqplot/plugins/jqplot.trendline.js +208 -0
  372. data/data/jqplot/plugins/jqplot.trendline.min.js +34 -0
  373. data/data/jqplot/usage.txt +119 -0
  374. data/examples/graph.rb +17 -0
  375. data/lib/reportbuilder.rb +21 -2
  376. data/lib/reportbuilder/builder.rb +31 -3
  377. data/lib/reportbuilder/builder/html.rb +39 -5
  378. data/lib/reportbuilder/graph.rb +252 -0
  379. data/lib/reportbuilder/graph/html_flot.rb +149 -0
  380. data/lib/reportbuilder/graph/html_jqplot.rb +145 -0
  381. data/lib/reportbuilder/image.rb +178 -78
  382. data/lib/reportbuilder/table/rtfbuilder.rb +2 -2
  383. data/test/helper_test.rb +6 -7
  384. data/test/test_graph.rb +44 -0
  385. data/test/test_graph_html_flot.rb +36 -0
  386. data/test/test_graph_html_jqplot.rb +36 -0
  387. data/test/test_html.rb +4 -7
  388. data/test/test_image.rb +35 -7
  389. data/test/test_reportbuilder.rb +4 -6
  390. data/test/test_table.rb +0 -2
  391. metadata +402 -7
  392. metadata.gz.sig +4 -2
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) 2009 - 2010 Chris Leonello
3
+ * jqPlot is currently available for use in all personal or commercial projects
4
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
5
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
6
+ * choose the license that best suits your project and use it accordingly.
7
+ *
8
+ * Although not required, the author would appreciate an email letting him
9
+ * know of any substantial use of jqPlot. You can reach the author at:
10
+ * chris at jqplot or see http://www.jqplot.com/info.php .
11
+ *
12
+ * If you are feeling kind and generous, consider supporting the project by
13
+ * making a donation at: http://www.jqplot.com/donate.php .
14
+ *
15
+ * jqPlot includes date instance methods and printf/sprintf functions by other authors:
16
+ *
17
+ * Date instance methods contained in jqplot.dateMethods.js:
18
+ *
19
+ * author Ken Snyder (ken d snyder at gmail dot com)
20
+ * date 2008-09-10
21
+ * version 2.0.2 (http://kendsnyder.com/sandbox/date/)
22
+ * license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
23
+ *
24
+ * JavaScript printf/sprintf functions contained in jqplot.sprintf.js:
25
+ *
26
+ * version 2007.04.27
27
+ * author Ash Searle
28
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
29
+ * http://hexmen.com/js/sprintf.js
30
+ * The author (Ash Searle) has placed this code in the public domain:
31
+ * "This code is unrestricted: you are free to use it however you like."
32
+ *
33
+ */
34
+ (function(b){b.jqplot.BezierCurveRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.BezierCurveRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.BezierCurveRenderer.prototype.constructor=b.jqplot.BezierCurveRenderer;b.jqplot.BezierCurveRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var g=this._yaxis.series_u2p;var f=this.data;this.gridData=[];this._prevGridData=[];var d=this.index;if(f.length==2){if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,f[1][4]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,c[1][4]),g.call(this._yaxis,c[1][5])],[e.call(this._xaxis,c[1][2]),g.call(this._yaxis,c[1][3]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}else{if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,f[3][1]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,c[3][0]),g.call(this._yaxis,c[3][1])],[e.call(this._xaxis,c[2][0]),g.call(this._yaxis,c[2][1]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}};b.jqplot.BezierCurveRenderer.prototype.makeGridData=function(g,i){var f=this._xaxis.series_u2p;var h=this._yaxis.series_u2p;var e=[];var j=[];var d=this.index;if(g.length==2){if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,g[1][4]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,c[1][4]),h.call(this._yaxis,c[1][5])],[f.call(this._xaxis,c[1][2]),h.call(this._yaxis,c[1][3]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}else{if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,g[3][1]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,c[3][0]),h.call(this._yaxis,c[3][1])],[f.call(this._xaxis,c[2][0]),h.call(this._yaxis,c[2][1]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}return e};b.jqplot.BezierCurveRenderer.prototype.draw=function(c,g,d){var e;c.save();if(g.length){if(this.showLine){c.save();var f=(d!=null)?d:{};c.fillStyle=f.fillStyle||this.color;c.beginPath();c.moveTo(g[0][0],g[0][1]);c.bezierCurveTo(g[1][0],g[1][1],g[1][2],g[1][3],g[1][4],g[1][5]);c.lineTo(g[2][0],g[2][1]);if(g[3].length==2){c.lineTo(g[3][0],g[3][1])}else{c.bezierCurveTo(g[3][0],g[3][1],g[3][2],g[3][3],g[3][4],g[3][5])}c.closePath();c.fill();c.restore()}}c.restore()};b.jqplot.BezierCurveRenderer.prototype.drawShadow=function(c,e,d){};b.jqplot.BezierAxisRenderer=function(){b.jqplot.LinearAxisRenderer.call(this)};b.jqplot.BezierAxisRenderer.prototype=new b.jqplot.LinearAxisRenderer();b.jqplot.BezierAxisRenderer.prototype.constructor=b.jqplot.BezierAxisRenderer;b.jqplot.BezierAxisRenderer.prototype.init=function(f){b.extend(true,this,f);var c=this._dataBounds;for(var g=0;g<this._series.length;g++){var h=this._series[g];var k=h.data;if(k.length==4){for(var e=0;e<k.length;e++){if(this.name=="xaxis"||this.name=="x2axis"){if(k[e][0]<c.min||c.min==null){c.min=k[e][0]}if(k[e][0]>c.max||c.max==null){c.max=k[e][0]}}else{if(k[e][1]<c.min||c.min==null){c.min=k[e][1]}if(k[e][1]>c.max||c.max==null){c.max=k[e][1]}}}}else{if(this.name=="xaxis"||this.name=="x2axis"){if(k[0][0]<c.min||c.min==null){c.min=k[0][0]}if(k[0][0]>c.max||c.max==null){c.max=k[0][0]}for(var e=0;e<5;e+=2){if(k[1][e]<c.min||c.min==null){c.min=k[1][e]}if(k[1][e]>c.max||c.max==null){c.max=k[1][e]}}}else{if(k[0][1]<c.min||c.min==null){c.min=k[0][1]}if(k[0][1]>c.max||c.max==null){c.max=k[0][1]}for(var e=1;e<6;e+=2){if(k[1][e]<c.min||c.min==null){c.min=k[1][e]}if(k[1][e]>c.max||c.max==null){c.max=k[1][e]}}}}}};function a(g,f,d){d=d||{};d.axesDefaults=b.extend(true,{pad:0},d.axesDefaults);d.legend=b.extend(true,{placement:"outside"},d.legend);var c=false;if(d.seriesDefaults.renderer==b.jqplot.BezierCurveRenderer){c=true}else{if(d.series){for(var e=0;e<d.series.length;e++){if(d.series[e].renderer==b.jqplot.BezierCurveRenderer){c=true}}}}if(c){d.axesDefaults.renderer=b.jqplot.BezierAxisRenderer}}b.jqplot.preInitHooks.push(a)})(jQuery);
@@ -0,0 +1,629 @@
1
+ /**
2
+ * Copyright (c) 2009 - 2010 Chris Leonello
3
+ * jqPlot is currently available for use in all personal or commercial projects
4
+ * under both the MIT and GPL version 2.0 licenses. This means that you can
5
+ * choose the license that best suits your project and use it accordingly.
6
+ *
7
+ * The author would appreciate an email letting him know of any substantial
8
+ * use of jqPlot. You can reach the author at: chris at jqplot dot com
9
+ * or see http://www.jqplot.com/info.php . This is, of course,
10
+ * not required.
11
+ *
12
+ * If you are feeling kind and generous, consider supporting the project by
13
+ * making a donation at: http://www.jqplot.com/donate.php .
14
+ *
15
+ * Thanks for using jqPlot!
16
+ *
17
+ */
18
+ (function($) {
19
+
20
+ // Class: $.jqplot.BarRenderer
21
+ // A plugin renderer for jqPlot to draw a bar plot.
22
+ // Draws series as a line.
23
+
24
+ $.jqplot.BarRenderer = function(){
25
+ $.jqplot.LineRenderer.call(this);
26
+ };
27
+
28
+ $.jqplot.BarRenderer.prototype = new $.jqplot.LineRenderer();
29
+ $.jqplot.BarRenderer.prototype.constructor = $.jqplot.BarRenderer;
30
+
31
+ // called with scope of series.
32
+ $.jqplot.BarRenderer.prototype.init = function(options, plot) {
33
+ // Group: Properties
34
+ //
35
+ // prop: barPadding
36
+ // Number of pixels between adjacent bars at the same axis value.
37
+ this.barPadding = 8;
38
+ // prop: barMargin
39
+ // Number of pixels between groups of bars at adjacent axis values.
40
+ this.barMargin = 10;
41
+ // prop: barDirection
42
+ // 'vertical' = up and down bars, 'horizontal' = side to side bars
43
+ this.barDirection = 'vertical';
44
+ // prop: barWidth
45
+ // Width of the bar in pixels (auto by devaul). null = calculated automatically.
46
+ this.barWidth = null;
47
+ // prop: shadowOffset
48
+ // offset of the shadow from the slice and offset of
49
+ // each succesive stroke of the shadow from the last.
50
+ this.shadowOffset = 2;
51
+ // prop: shadowDepth
52
+ // number of strokes to apply to the shadow,
53
+ // each stroke offset shadowOffset from the last.
54
+ this.shadowDepth = 5;
55
+ // prop: shadowAlpha
56
+ // transparency of the shadow (0 = transparent, 1 = opaque)
57
+ this.shadowAlpha = 0.08;
58
+ // prop: waterfall
59
+ // true to enable waterfall plot.
60
+ this.waterfall = false;
61
+ // prop: groups
62
+ // group bars into this many groups
63
+ this.groups = 1;
64
+ // prop: varyBarColor
65
+ // true to color each bar of a series separately rather than
66
+ // have every bar of a given series the same color.
67
+ // If used for non-stacked multiple series bar plots, user should
68
+ // specify a separate 'seriesColors' array for each series.
69
+ // Otherwise, each series will set their bars to the same color array.
70
+ // This option has no Effect for stacked bar charts and is disabled.
71
+ this.varyBarColor = false;
72
+ // prop: highlightMouseOver
73
+ // True to highlight slice when moused over.
74
+ // This must be false to enable highlightMouseDown to highlight when clicking on a slice.
75
+ this.highlightMouseOver = true;
76
+ // prop: highlightMouseDown
77
+ // True to highlight when a mouse button is pressed over a slice.
78
+ // This will be disabled if highlightMouseOver is true.
79
+ this.highlightMouseDown = false;
80
+ // prop: highlightColors
81
+ // an array of colors to use when highlighting a bar.
82
+ this.highlightColors = [];
83
+
84
+ // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver
85
+ if (options.highlightMouseDown && options.highlightMouseOver == null) {
86
+ options.highlightMouseOver = false;
87
+ }
88
+
89
+ $.extend(true, this, options);
90
+ // fill is still needed to properly draw the legend.
91
+ // bars have to be filled.
92
+ this.fill = true;
93
+
94
+ if (this.waterfall) {
95
+ this.fillToZero = false;
96
+ this.disableStack = true;
97
+ }
98
+
99
+ if (this.barDirection == 'vertical' ) {
100
+ this._primaryAxis = '_xaxis';
101
+ this._stackAxis = 'y';
102
+ this.fillAxis = 'y';
103
+ }
104
+ else {
105
+ this._primaryAxis = '_yaxis';
106
+ this._stackAxis = 'x';
107
+ this.fillAxis = 'x';
108
+ }
109
+ // index of the currenty highlighted point, if any
110
+ this._highlightedPoint = null;
111
+ // total number of values for all bar series, total number of bar series, and position of this series
112
+ this._plotSeriesInfo = null;
113
+ // Array of actual data colors used for each data point.
114
+ this._dataColors = [];
115
+ this._barPoints = [];
116
+
117
+ // set the shape renderer options
118
+ var opts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, strokeStyle:this.color, fillStyle:this.color, closePath:this.fill};
119
+ this.renderer.shapeRenderer.init(opts);
120
+ // set the shadow renderer options
121
+ var sopts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, closePath:this.fill};
122
+ this.renderer.shadowRenderer.init(sopts);
123
+
124
+ plot.postInitHooks.addOnce(postInit);
125
+ plot.postDrawHooks.addOnce(postPlotDraw);
126
+ plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove);
127
+ plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown);
128
+ plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp);
129
+ plot.eventListenerHooks.addOnce('jqplotClick', handleClick);
130
+ plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick);
131
+ };
132
+
133
+ // called with scope of series
134
+ function barPreInit(target, data, seriesDefaults, options) {
135
+ if (this.rendererOptions.barDirection == 'horizontal') {
136
+ this._stackAxis = 'x';
137
+ this._primaryAxis = '_yaxis';
138
+ }
139
+ if (this.rendererOptions.waterfall == true) {
140
+ this._data = $.extend(true, [], this.data);
141
+ var sum = 0;
142
+ var pos = (!this.rendererOptions.barDirection || this.rendererOptions.barDirection == 'vertical') ? 1 : 0;
143
+ for(var i=0; i<this.data.length; i++) {
144
+ sum += this.data[i][pos];
145
+ if (i>0) {
146
+ this.data[i][pos] += this.data[i-1][pos];
147
+ }
148
+ }
149
+ this.data[this.data.length] = (pos == 1) ? [this.data.length+1, sum] : [sum, this.data.length+1];
150
+ this._data[this._data.length] = (pos == 1) ? [this._data.length+1, sum] : [sum, this._data.length+1];
151
+ }
152
+ if (this.rendererOptions.groups > 1) {
153
+ this.breakOnNull = true;
154
+ var l = this.data.length;
155
+ var skip = parseInt(l/this.rendererOptions.groups, 10);
156
+ var count = 0;
157
+ for (var i=skip; i<l; i+=skip) {
158
+ this.data.splice(i+count, 0, [null, null]);
159
+ count++;
160
+ }
161
+ for (i=0; i<this.data.length; i++) {
162
+ if (this._primaryAxis == '_xaxis') {
163
+ this.data[i][0] = i+1;
164
+ }
165
+ else {
166
+ this.data[i][1] = i+1;
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ $.jqplot.preSeriesInitHooks.push(barPreInit);
173
+
174
+ // needs to be called with scope of series, not renderer.
175
+ $.jqplot.BarRenderer.prototype.calcSeriesNumbers = function() {
176
+ var nvals = 0;
177
+ var nseries = 0;
178
+ var paxis = this[this._primaryAxis];
179
+ var s, series, pos;
180
+ // loop through all series on this axis
181
+ for (var i=0; i < paxis._series.length; i++) {
182
+ series = paxis._series[i];
183
+ if (series === this) {
184
+ pos = i;
185
+ }
186
+ // is the series rendered as a bar?
187
+ if (series.renderer.constructor == $.jqplot.BarRenderer) {
188
+ // gridData may not be computed yet, use data length insted
189
+ nvals += series.data.length;
190
+ nseries += 1;
191
+ }
192
+ }
193
+ // return total number of values for all bar series, total number of bar series, and position of this series
194
+ return [nvals, nseries, pos];
195
+ };
196
+
197
+ $.jqplot.BarRenderer.prototype.setBarWidth = function() {
198
+ // need to know how many data values we have on the approprate axis and figure it out.
199
+ var i;
200
+ var nvals = 0;
201
+ var nseries = 0;
202
+ var paxis = this[this._primaryAxis];
203
+ var s, series, pos;
204
+ var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
205
+ nvals = temp[0];
206
+ nseries = temp[1];
207
+ var nticks = paxis.numberTicks;
208
+ var nbins = (nticks-1)/2;
209
+ // so, now we have total number of axis values.
210
+ if (paxis.name == 'xaxis' || paxis.name == 'x2axis') {
211
+ if (this._stack) {
212
+ this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals * nseries - this.barMargin;
213
+ }
214
+ else {
215
+ this.barWidth = ((paxis._offsets.max - paxis._offsets.min)/nbins - this.barPadding * (nseries-1) - this.barMargin*2)/nseries;
216
+ // this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals - this.barPadding - this.barMargin/nseries;
217
+ }
218
+ }
219
+ else {
220
+ if (this._stack) {
221
+ this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals * nseries - this.barMargin;
222
+ }
223
+ else {
224
+ this.barWidth = ((paxis._offsets.min - paxis._offsets.max)/nbins - this.barPadding * (nseries-1) - this.barMargin*2)/nseries;
225
+ // this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals - this.barPadding - this.barMargin/nseries;
226
+ }
227
+ }
228
+ return [nvals, nseries];
229
+ };
230
+
231
+ function computeHighlightColors (colors) {
232
+ var ret = [];
233
+ for (var i=0; i<colors.length; i++){
234
+ var rgba = $.jqplot.getColorComponents(colors[i]);
235
+ var newrgb = [rgba[0], rgba[1], rgba[2]];
236
+ var sum = newrgb[0] + newrgb[1] + newrgb[2];
237
+ for (var j=0; j<3; j++) {
238
+ // when darkening, lowest color component can be is 60.
239
+ newrgb[j] = (sum > 570) ? newrgb[j] * 0.8 : newrgb[j] + 0.3 * (255 - newrgb[j]);
240
+ newrgb[j] = parseInt(newrgb[j], 10);
241
+ }
242
+ ret.push('rgb('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+')');
243
+ }
244
+ return ret;
245
+ }
246
+
247
+ $.jqplot.BarRenderer.prototype.draw = function(ctx, gridData, options) {
248
+ var i;
249
+ var opts = (options != undefined) ? options : {};
250
+ var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
251
+ var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
252
+ var fill = (opts.fill != undefined) ? opts.fill : this.fill;
253
+ var xaxis = this.xaxis;
254
+ var yaxis = this.yaxis;
255
+ var xp = this._xaxis.series_u2p;
256
+ var yp = this._yaxis.series_u2p;
257
+ var pointx, pointy, nvals, nseries, pos;
258
+ // clear out data colors.
259
+ this._dataColors = [];
260
+ this._barPoints = [];
261
+
262
+ if (this.barWidth == null) {
263
+ this.renderer.setBarWidth.call(this);
264
+ }
265
+
266
+ var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
267
+ nvals = temp[0];
268
+ nseries = temp[1];
269
+ pos = temp[2];
270
+
271
+ if (this._stack) {
272
+ this._barNudge = 0;
273
+ }
274
+ else {
275
+ this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
276
+ }
277
+ if (showLine) {
278
+ var negativeColors = new $.jqplot.ColorGenerator(this.negativeSeriesColors);
279
+ var positiveColors = new $.jqplot.ColorGenerator(this.seriesColors);
280
+ var negativeColor = negativeColors.get(this.index);
281
+ if (! this.useNegativeColors) {
282
+ negativeColor = opts.fillStyle;
283
+ }
284
+ var positiveColor = opts.fillStyle;
285
+
286
+ if (this.barDirection == 'vertical') {
287
+ for (var i=0; i<gridData.length; i++) {
288
+ if (this.data[i][1] == null) {
289
+ continue;
290
+ }
291
+ points = [];
292
+ var base = gridData[i][0] + this._barNudge;
293
+ var ystart;
294
+
295
+ // stacked
296
+ if (this._stack && this._prevGridData.length) {
297
+ ystart = this._prevGridData[i][1];
298
+ }
299
+ // not stacked and first series in stack
300
+ else {
301
+ if (this.fillToZero) {
302
+ ystart = this._yaxis.series_u2p(0);
303
+ }
304
+ else if (this.waterfall && i > 0 && i < this.gridData.length-1) {
305
+ ystart = this.gridData[i-1][1];
306
+ }
307
+ else {
308
+ ystart = ctx.canvas.height;
309
+ }
310
+ }
311
+ if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
312
+ if (this.varyBarColor && !this._stack) {
313
+ if (this.useNegativeColors) {
314
+ opts.fillStyle = negativeColors.next();
315
+ }
316
+ else {
317
+ opts.fillStyle = positiveColors.next();
318
+ }
319
+ }
320
+ else {
321
+ opts.fillStyle = negativeColor;
322
+ }
323
+ }
324
+ else {
325
+ if (this.varyBarColor && !this._stack) {
326
+ opts.fillStyle = positiveColors.next();
327
+ }
328
+ else {
329
+ opts.fillStyle = positiveColor;
330
+ }
331
+ }
332
+
333
+ points.push([base-this.barWidth/2, ystart]);
334
+ points.push([base-this.barWidth/2, gridData[i][1]]);
335
+ points.push([base+this.barWidth/2, gridData[i][1]]);
336
+ points.push([base+this.barWidth/2, ystart]);
337
+ this._barPoints.push(points);
338
+ // now draw the shadows if not stacked.
339
+ // for stacked plots, they are predrawn by drawShadow
340
+ if (shadow && !this._stack) {
341
+ var sopts = $.extend(true, {}, opts);
342
+ // need to get rid of fillStyle on shadow.
343
+ delete sopts.fillStyle;
344
+ this.renderer.shadowRenderer.draw(ctx, points, sopts);
345
+ }
346
+ var clr = opts.fillStyle || this.color;
347
+ this._dataColors.push(clr);
348
+ this.renderer.shapeRenderer.draw(ctx, points, opts);
349
+ }
350
+ }
351
+
352
+ else if (this.barDirection == 'horizontal'){
353
+ for (var i=0; i<gridData.length; i++) {
354
+ if (this.data[i][0] == null) {
355
+ continue;
356
+ }
357
+ points = [];
358
+ var base = gridData[i][1] - this._barNudge;
359
+ var xstart;
360
+
361
+ if (this._stack && this._prevGridData.length) {
362
+ xstart = this._prevGridData[i][0];
363
+ }
364
+ // not stacked and first series in stack
365
+ else {
366
+ if (this.fillToZero) {
367
+ xstart = this._xaxis.series_u2p(0);
368
+ }
369
+ else if (this.waterfall && i > 0 && i < this.gridData.length-1) {
370
+ xstart = this.gridData[i-1][1];
371
+ }
372
+ else {
373
+ xstart = 0;
374
+ }
375
+ }
376
+ if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
377
+ if (this.varyBarColor && !this._stack) {
378
+ if (this.useNegativeColors) {
379
+ opts.fillStyle = negativeColors.next();
380
+ }
381
+ else {
382
+ opts.fillStyle = positiveColors.next();
383
+ }
384
+ }
385
+ }
386
+ else {
387
+ if (this.varyBarColor && !this._stack) {
388
+ opts.fillStyle = positiveColors.next();
389
+ }
390
+ else {
391
+ opts.fillStyle = positiveColor;
392
+ }
393
+ }
394
+
395
+ points.push([xstart, base+this.barWidth/2]);
396
+ points.push([xstart, base-this.barWidth/2]);
397
+ points.push([gridData[i][0], base-this.barWidth/2]);
398
+ points.push([gridData[i][0], base+this.barWidth/2]);
399
+ this._barPoints.push(points);
400
+ // now draw the shadows if not stacked.
401
+ // for stacked plots, they are predrawn by drawShadow
402
+ if (shadow && !this._stack) {
403
+ var sopts = $.extend(true, {}, opts);
404
+ delete sopts.fillStyle;
405
+ this.renderer.shadowRenderer.draw(ctx, points, sopts);
406
+ }
407
+ var clr = opts.fillStyle || this.color;
408
+ this._dataColors.push(clr);
409
+ this.renderer.shapeRenderer.draw(ctx, points, opts);
410
+ }
411
+ }
412
+ }
413
+
414
+ if (this.highlightColors.length == 0) {
415
+ this.highlightColors = computeHighlightColors(this._dataColors);
416
+ }
417
+
418
+ else if (typeof(this.highlightColors) == 'string') {
419
+ var temp = this.highlightColors;
420
+ this.highlightColors = [];
421
+ for (var i=0; i<this._dataColors.length; i++) {
422
+ this.highlightColors.push(temp);
423
+ }
424
+ }
425
+
426
+ };
427
+
428
+
429
+ // for stacked plots, shadows will be pre drawn by drawShadow.
430
+ $.jqplot.BarRenderer.prototype.drawShadow = function(ctx, gridData, options) {
431
+ var i;
432
+ var opts = (options != undefined) ? options : {};
433
+ var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
434
+ var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
435
+ var fill = (opts.fill != undefined) ? opts.fill : this.fill;
436
+ var xaxis = this.xaxis;
437
+ var yaxis = this.yaxis;
438
+ var xp = this._xaxis.series_u2p;
439
+ var yp = this._yaxis.series_u2p;
440
+ var pointx, pointy, nvals, nseries, pos;
441
+
442
+ if (this._stack && this.shadow) {
443
+ if (this.barWidth == null) {
444
+ this.renderer.setBarWidth.call(this);
445
+ }
446
+
447
+ var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
448
+ nvals = temp[0];
449
+ nseries = temp[1];
450
+ pos = temp[2];
451
+
452
+ if (this._stack) {
453
+ this._barNudge = 0;
454
+ }
455
+ else {
456
+ this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
457
+ }
458
+ if (showLine) {
459
+
460
+ if (this.barDirection == 'vertical') {
461
+ for (var i=0; i<gridData.length; i++) {
462
+ if (this.data[i][1] == null) {
463
+ continue;
464
+ }
465
+ points = [];
466
+ var base = gridData[i][0] + this._barNudge;
467
+ var ystart;
468
+
469
+ if (this._stack && this._prevGridData.length) {
470
+ ystart = this._prevGridData[i][1];
471
+ }
472
+ else {
473
+ if (this.fillToZero) {
474
+ ystart = this._yaxis.series_u2p(0);
475
+ }
476
+ else {
477
+ ystart = ctx.canvas.height;
478
+ }
479
+ }
480
+
481
+ points.push([base-this.barWidth/2, ystart]);
482
+ points.push([base-this.barWidth/2, gridData[i][1]]);
483
+ points.push([base+this.barWidth/2, gridData[i][1]]);
484
+ points.push([base+this.barWidth/2, ystart]);
485
+ this.renderer.shadowRenderer.draw(ctx, points, opts);
486
+ }
487
+ }
488
+
489
+ else if (this.barDirection == 'horizontal'){
490
+ for (var i=0; i<gridData.length; i++) {
491
+ if (this.data[i][0] == null) {
492
+ continue;
493
+ }
494
+ points = [];
495
+ var base = gridData[i][1] - this._barNudge;
496
+ var xstart;
497
+
498
+ if (this._stack && this._prevGridData.length) {
499
+ xstart = this._prevGridData[i][0];
500
+ }
501
+ else {
502
+ xstart = 0;
503
+ }
504
+
505
+ points.push([xstart, base+this.barWidth/2]);
506
+ points.push([gridData[i][0], base+this.barWidth/2]);
507
+ points.push([gridData[i][0], base-this.barWidth/2]);
508
+ points.push([xstart, base-this.barWidth/2]);
509
+ this.renderer.shadowRenderer.draw(ctx, points, opts);
510
+ }
511
+ }
512
+ }
513
+
514
+ }
515
+ };
516
+
517
+ function postInit(target, data, options) {
518
+ for (i=0; i<this.series.length; i++) {
519
+ if (this.series[i].renderer.constructor == $.jqplot.BarRenderer) {
520
+ // don't allow mouseover and mousedown at same time.
521
+ if (this.series[i].highlightMouseOver) {
522
+ this.series[i].highlightMouseDown = false;
523
+ }
524
+ }
525
+ }
526
+ this.target.bind('mouseout', {plot:this}, function (ev) { unhighlight(ev.data.plot); });
527
+ }
528
+
529
+ // called within context of plot
530
+ // create a canvas which we can draw on.
531
+ // insert it before the eventCanvas, so eventCanvas will still capture events.
532
+ function postPlotDraw() {
533
+ this.plugins.barRenderer = {highlightedSeriesIndex:null};
534
+ this.plugins.barRenderer.highlightCanvas = new $.jqplot.GenericCanvas();
535
+
536
+ this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-barRenderer-highlight-canvas', this._plotDimensions));
537
+ var hctx = this.plugins.barRenderer.highlightCanvas.setContext();
538
+ }
539
+
540
+ function highlight (plot, sidx, pidx, points) {
541
+ var s = plot.series[sidx];
542
+ var canvas = plot.plugins.barRenderer.highlightCanvas;
543
+ canvas._ctx.clearRect(0,0,canvas._ctx.canvas.width, canvas._ctx.canvas.height);
544
+ s._highlightedPoint = pidx;
545
+ plot.plugins.barRenderer.highlightedSeriesIndex = sidx;
546
+ var opts = {fillStyle: s.highlightColors[pidx]};
547
+ s.renderer.shapeRenderer.draw(canvas._ctx, points, opts);
548
+ }
549
+
550
+ function unhighlight (plot) {
551
+ var canvas = plot.plugins.barRenderer.highlightCanvas;
552
+ canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
553
+ for (var i=0; i<plot.series.length; i++) {
554
+ plot.series[i]._highlightedPoint = null;
555
+ }
556
+ plot.plugins.barRenderer.highlightedSeriesIndex = null;
557
+ plot.target.trigger('jqplotDataUnhighlight');
558
+ }
559
+
560
+
561
+ function handleMove(ev, gridpos, datapos, neighbor, plot) {
562
+ if (neighbor) {
563
+ var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
564
+ var evt1 = jQuery.Event('jqplotDataMouseOver');
565
+ evt1.pageX = ev.pageX;
566
+ evt1.pageY = ev.pageY;
567
+ plot.target.trigger(evt1, ins);
568
+ if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
569
+ var evt = jQuery.Event('jqplotDataHighlight');
570
+ evt.pageX = ev.pageX;
571
+ evt.pageY = ev.pageY;
572
+ plot.target.trigger(evt, ins);
573
+ highlight (plot, neighbor.seriesIndex, neighbor.pointIndex, neighbor.points);
574
+ }
575
+ }
576
+ else if (neighbor == null) {
577
+ unhighlight (plot);
578
+ }
579
+ }
580
+
581
+ function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
582
+ if (neighbor) {
583
+ var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
584
+ if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
585
+ var evt = jQuery.Event('jqplotDataHighlight');
586
+ evt.pageX = ev.pageX;
587
+ evt.pageY = ev.pageY;
588
+ plot.target.trigger(evt, ins);
589
+ highlight (plot, neighbor.seriesIndex, neighbor.pointIndex, neighbor.points);
590
+ }
591
+ }
592
+ else if (neighbor == null) {
593
+ unhighlight (plot);
594
+ }
595
+ }
596
+
597
+ function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
598
+ var idx = plot.plugins.barRenderer.highlightedSeriesIndex;
599
+ if (idx != null && plot.series[idx].highlightMouseDown) {
600
+ unhighlight(plot);
601
+ }
602
+ }
603
+
604
+ function handleClick(ev, gridpos, datapos, neighbor, plot) {
605
+ if (neighbor) {
606
+ var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
607
+ var evt = jQuery.Event('jqplotDataClick');
608
+ evt.pageX = ev.pageX;
609
+ evt.pageY = ev.pageY;
610
+ plot.target.trigger(evt, ins);
611
+ }
612
+ }
613
+
614
+ function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
615
+ if (neighbor) {
616
+ var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
617
+ var idx = plot.plugins.barRenderer.highlightedSeriesIndex;
618
+ if (idx != null && plot.series[idx].highlightMouseDown) {
619
+ unhighlight(plot);
620
+ }
621
+ var evt = jQuery.Event('jqplotDataRightClick');
622
+ evt.pageX = ev.pageX;
623
+ evt.pageY = ev.pageY;
624
+ plot.target.trigger(evt, ins);
625
+ }
626
+ }
627
+
628
+
629
+ })(jQuery);