reportbuilder 1.2.5 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
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(a){a.jqplot.LogAxisRenderer=function(){a.jqplot.LinearAxisRenderer.call(this);this.axisDefaults={base:10,tickDistribution:"even"}};a.jqplot.LogAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.LogAxisRenderer.prototype.constructor=a.jqplot.LogAxisRenderer;a.jqplot.LogAxisRenderer.prototype.init=function(e){a.extend(true,this.renderer,e);for(var h in this.renderer.axisDefaults){if(this[h]==null){this[h]=this.renderer.axisDefaults[h]}}var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}};a.jqplot.LogAxisRenderer.prototype.createTicks=function(){var A=this._ticks;var x=this.ticks;var D=this.name;var z=this._dataBounds;var s,y;var o,v;var e,d;var b,w;if(x.length){for(w=0;w<x.length;w++){var f=x[w];var k=new this.tickRenderer(this.tickOptions);if(f.constructor==Array){k.value=f[0];k.label=f[1];if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(f[0],this.name);this._ticks.push(k)}else{k.value=f;if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(f,this.name);this._ticks.push(k)}}this.numberTicks=x.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value}else{if(D=="xaxis"||D=="x2axis"){s=this._plotDimensions.width}else{s=this._plotDimensions.height}o=((this.min!=null)?this.min:z.min);v=((this.max!=null)?this.max:z.max);if(o==v){var g=0.05;o=o*(1-g);v=v*(1+g)}if(this.min!=null&&this.min<=0){throw ("log axis minimum must be greater than 0")}if(this.max!=null&&this.max<=0){throw ("log axis maximum must be greater than 0")}var l=v-o;var n,r;if(this.tickDistribution=="even"){n=(this.min!=null)?this.min:o-o*((this.padMin-1)/2);r=(this.max!=null)?this.max:v+v*((this.padMax-1)/2);this.min=n;this.max=r;l=this.max-this.min;if(this.numberTicks==null){if(s>100){this.numberTicks=parseInt(3+(s-100)/75,10)}else{this.numberTicks=2}}var h=Math.pow(this.base,(1/(this.numberTicks-1)*Math.log(this.max/this.min)/Math.log(this.base)));for(var w=0;w<this.numberTicks;w++){b=this.min*Math.pow(h,w);var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(b,this.name);this._ticks.push(k)}}else{if(this.tickDistribution=="power"){n=Math.pow(this.base,Math.ceil(Math.log(o*(2-this.padMin))/Math.log(this.base))-1);r=Math.pow(this.base,Math.floor(Math.log(v*this.padMax)/Math.log(this.base))+1);this.min=n;this.max=r;l=this.max-this.min;var q=0;var c=0;if(this.numberTicks==null){if(s>100){this.numberTicks=Math.round(Math.log(this.max/this.min)/Math.log(this.base)+1);if(this.numberTicks<2){this.numberTicks=2}q=parseInt(3+(s-100)/75,10)}else{this.numberTicks=2;q=2}if(this.numberTicks<q-1){c=Math.floor(q/this.numberTicks)}}for(var w=0;w<this.numberTicks;w++){b=Math.pow(this.base,w-this.numberTicks+1)*this.max;var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(b,this.name);this._ticks.push(k);if(c&&w<this.numberTicks-1){var m=Math.pow(this.base,w-this.numberTicks+2)*this.max;var B=m-b;var y=m/(c+1);for(var p=c-1;p>=0;p--){var C=m-y*(p+1);var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(C,this.name);this._ticks.push(k)}}}}}}};a.jqplot.LogAxisRenderer.prototype.pack=function(n,j){var d=parseInt(this.base,10);var q=this._ticks;var v=function(h){return Math.log(h)/Math.log(d)};var b=function(h){return Math.pow(Math.E,(Math.log(d)*h))};max=v(this.max);min=v(this.min);var g=j.max;var u=j.min;var l=(this._label==null)?false:this._label.show;for(var c in n){this._elem.css(c,n[c])}this._offsets=j;var f=g-u;var s=max-min;this.p2u=function(h){return b((h-u)*s/f+min)};this.u2p=function(h){return(v(h)-min)*f/s+u};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v(h)-min)*f/s};this.series_p2u=function(h){return b(h*s/f+min)}}else{this.series_u2p=function(h){return(v(h)-max)*f/s};this.series_p2u=function(h){return b(h*s/f+max)}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(i=0;i<q.length;i++){var r=q[i];if(r.show&&r.showLabel){var k;if(r.constructor==a.jqplot.CanvasAxisTickRenderer&&r.angle){switch(r.labelPosition){case"auto":if(r.angle<0){k=-r.getWidth()+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2}else{k=-r._textRenderer.height*Math.sin(r._textRenderer.angle)/2}break;case"end":k=-r.getWidth()+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break;case"start":k=-r._textRenderer.height*Math.sin(r._textRenderer.angle)/2;break;case"middle":k=-r.getWidth()/2+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break;default:k=-r.getWidth()/2+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break}}else{k=-r.getWidth()/2}var e=this.u2p(r.value)+k+"px";r._elem.css("left",e);r.pack()}}if(l){var o=this._label._elem.outerWidth(true);this._label._elem.css("left",u+f/2-o/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(i=0;i<q.length;i++){var r=q[i];if(r.show&&r.showLabel){var k;if(r.constructor==a.jqplot.CanvasAxisTickRenderer&&r.angle){switch(r.labelPosition){case"auto":case"end":if(r.angle<0){k=-r._textRenderer.height*Math.cos(-r._textRenderer.angle)/2}else{k=-r.getHeight()+r._textRenderer.height*Math.cos(r._textRenderer.angle)/2}break;case"start":if(r.angle>0){k=-r._textRenderer.height*Math.cos(-r._textRenderer.angle)/2}else{k=-r.getHeight()+r._textRenderer.height*Math.cos(r._textRenderer.angle)/2}break;case"middle":k=-r.getHeight()/2;break;default:k=-r.getHeight()/2;break}}else{k=-r.getHeight()/2}var e=this.u2p(r.value)+k+"px";r._elem.css("top",e);r.pack()}}if(l){var m=this._label._elem.outerHeight(true);this._label._elem.css("top",g-f/2-m/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery);
@@ -0,0 +1,595 @@
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
+ // class: $.jqplot.MekkoAxisRenderer
20
+ // An axis renderer for a Mekko chart.
21
+ // Should be used with a Mekko chart where the mekkoRenderer is used on the series.
22
+ // Displays the Y axis as a range from 0 to 1 (0 to 100%) and the x axis with a tick
23
+ // for each series scaled to the sum of all the y values.
24
+ $.jqplot.MekkoAxisRenderer = function() {
25
+ };
26
+
27
+ // called with scope of axis object.
28
+ $.jqplot.MekkoAxisRenderer.prototype.init = function(options){
29
+ // prop: tickMode
30
+ // How to space the ticks on the axis.
31
+ // 'bar' will place a tick at the width of each bar.
32
+ // This is the default for the x axis.
33
+ // 'even' will place ticks at even intervals. This is
34
+ // the default for x2 axis and y axis. y axis cannot be changed.
35
+ this.tickMode;
36
+ // prop: barLabelRenderer
37
+ // renderer to use to draw labels under each bar.
38
+ this.barLabelRenderer = $.jqplot.AxisLabelRenderer;
39
+ // prop: barLabels
40
+ // array of labels to put under each bar.
41
+ this.barLabels = this.barLabels || [];
42
+ // prop: barLabelOptions
43
+ // options object to pass to the bar label renderer.
44
+ this.barLabelOptions = {};
45
+ this.tickOptions = $.extend(true, {showGridline:false}, this.tickOptions);
46
+ this._barLabels = [];
47
+ $.extend(true, this, options);
48
+ if (this.name == 'yaxis') {
49
+ this.tickOptions.formatString = this.tickOptions.formatString || "%d\%";
50
+ }
51
+ var db = this._dataBounds;
52
+ db.min = 0;
53
+ // for y axes, scale always go from 0 to 1 (0 to 100%)
54
+ if (this.name == 'yaxis' || this.name == 'y2axis') {
55
+ db.max = 100;
56
+ this.tickMode = 'even';
57
+ }
58
+ // For x axes, scale goes from 0 to sum of all y values.
59
+ else if (this.name == 'xaxis'){
60
+ this.tickMode = (this.tickMode == null) ? 'bar' : this.tickMode;
61
+ for (var i=0; i<this._series.length; i++) {
62
+ db.max += this._series[i]._sumy;
63
+ }
64
+ }
65
+ else if (this.name == 'x2axis'){
66
+ this.tickMode = (this.tickMode == null) ? 'even' : this.tickMode;
67
+ for (var i=0; i<this._series.length; i++) {
68
+ db.max += this._series[i]._sumy;
69
+ }
70
+ }
71
+ };
72
+
73
+ // called with scope of axis
74
+ $.jqplot.MekkoAxisRenderer.prototype.draw = function(ctx) {
75
+ if (this.show) {
76
+ // populate the axis label and value properties.
77
+ // createTicks is a method on the renderer, but
78
+ // call it within the scope of the axis.
79
+ this.renderer.createTicks.call(this);
80
+ // fill a div with axes labels in the right direction.
81
+ // Need to pregenerate each axis to get it's bounds and
82
+ // position it and the labels correctly on the plot.
83
+ var dim=0;
84
+ var temp;
85
+
86
+ this._elem = $('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');
87
+
88
+ if (this.name == 'xaxis' || this.name == 'x2axis') {
89
+ this._elem.width(this._plotDimensions.width);
90
+ }
91
+ else {
92
+ this._elem.height(this._plotDimensions.height);
93
+ }
94
+
95
+ // draw the axis label
96
+ // create a _label object.
97
+ this.labelOptions.axis = this.name;
98
+ this._label = new this.labelRenderer(this.labelOptions);
99
+ if (this._label.show) {
100
+ var elem = this._label.draw(ctx);
101
+ elem.appendTo(this._elem);
102
+ }
103
+
104
+ var t, tick, elem;
105
+ if (this.showTicks) {
106
+ t = this._ticks;
107
+ for (var i=0; i<t.length; i++) {
108
+ tick = t[i];
109
+ if (tick.showLabel && (!tick.isMinorTick || this.showMinorTicks)) {
110
+ elem = tick.draw(ctx);
111
+ elem.appendTo(this._elem);
112
+ }
113
+ }
114
+ }
115
+
116
+ // draw the series labels
117
+ for (i=0; i<this.barLabels.length; i++) {
118
+ this.barLabelOptions.axis = this.name;
119
+ this.barLabelOptions.label = this.barLabels[i];
120
+ this._barLabels.push(new this.barLabelRenderer(this.barLabelOptions));
121
+ if (this.tickMode != 'bar') {
122
+ this._barLabels[i].show = false;
123
+ }
124
+ if (this._barLabels[i].show) {
125
+ var elem = this._barLabels[i].draw(ctx);
126
+ elem.removeClass('jqplot-'+this.name+'-label');
127
+ elem.addClass('jqplot-'+this.name+'-tick');
128
+ elem.addClass('jqplot-mekko-barLabel');
129
+ elem.appendTo(this._elem);
130
+ }
131
+ }
132
+
133
+ }
134
+ return this._elem;
135
+ };
136
+
137
+ // called with scope of an axis
138
+ $.jqplot.MekkoAxisRenderer.prototype.reset = function() {
139
+ this.min = this._min;
140
+ this.max = this._max;
141
+ this.tickInterval = this._tickInterval;
142
+ this.numberTicks = this._numberTicks;
143
+ // this._ticks = this.__ticks;
144
+ };
145
+
146
+ // called with scope of axis
147
+ $.jqplot.MekkoAxisRenderer.prototype.set = function() {
148
+ var dim = 0;
149
+ var temp;
150
+ var w = 0;
151
+ var h = 0;
152
+ var lshow = (this._label == null) ? false : this._label.show;
153
+ if (this.show && this.showTicks) {
154
+ var t = this._ticks;
155
+ for (var i=0; i<t.length; i++) {
156
+ var tick = t[i];
157
+ if (tick.showLabel && (!tick.isMinorTick || this.showMinorTicks)) {
158
+ if (this.name == 'xaxis' || this.name == 'x2axis') {
159
+ temp = tick._elem.outerHeight(true);
160
+ }
161
+ else {
162
+ temp = tick._elem.outerWidth(true);
163
+ }
164
+ if (temp > dim) {
165
+ dim = temp;
166
+ }
167
+ }
168
+ }
169
+
170
+ if (lshow) {
171
+ w = this._label._elem.outerWidth(true);
172
+ h = this._label._elem.outerHeight(true);
173
+ }
174
+ if (this.name == 'xaxis') {
175
+ dim = dim + h;
176
+ this._elem.css({'height':dim+'px', left:'0px', bottom:'0px'});
177
+ }
178
+ else if (this.name == 'x2axis') {
179
+ dim = dim + h;
180
+ this._elem.css({'height':dim+'px', left:'0px', top:'0px'});
181
+ }
182
+ else if (this.name == 'yaxis') {
183
+ dim = dim + w;
184
+ this._elem.css({'width':dim+'px', left:'0px', top:'0px'});
185
+ if (lshow && this._label.constructor == $.jqplot.AxisLabelRenderer) {
186
+ this._label._elem.css('width', w+'px');
187
+ }
188
+ }
189
+ else {
190
+ dim = dim + w;
191
+ this._elem.css({'width':dim+'px', right:'0px', top:'0px'});
192
+ if (lshow && this._label.constructor == $.jqplot.AxisLabelRenderer) {
193
+ this._label._elem.css('width', w+'px');
194
+ }
195
+ }
196
+ }
197
+ };
198
+
199
+ // called with scope of axis
200
+ $.jqplot.MekkoAxisRenderer.prototype.createTicks = function() {
201
+ // we're are operating on an axis here
202
+ var ticks = this._ticks;
203
+ var userTicks = this.ticks;
204
+ var name = this.name;
205
+ // databounds were set on axis initialization.
206
+ var db = this._dataBounds;
207
+ var dim, interval;
208
+ var min, max;
209
+ var pos1, pos2;
210
+ var t, tt, i, j;
211
+
212
+ // if we already have ticks, use them.
213
+ // ticks must be in order of increasing value.
214
+
215
+ if (userTicks.length) {
216
+ // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed
217
+ for (i=0; i<userTicks.length; i++){
218
+ var ut = userTicks[i];
219
+ var t = new this.tickRenderer(this.tickOptions);
220
+ if (ut.constructor == Array) {
221
+ t.value = ut[0];
222
+ t.label = ut[1];
223
+ if (!this.showTicks) {
224
+ t.showLabel = false;
225
+ t.showMark = false;
226
+ }
227
+ else if (!this.showTickMarks) {
228
+ t.showMark = false;
229
+ }
230
+ t.setTick(ut[0], this.name);
231
+ this._ticks.push(t);
232
+ }
233
+
234
+ else {
235
+ t.value = ut;
236
+ if (!this.showTicks) {
237
+ t.showLabel = false;
238
+ t.showMark = false;
239
+ }
240
+ else if (!this.showTickMarks) {
241
+ t.showMark = false;
242
+ }
243
+ t.setTick(ut, this.name);
244
+ this._ticks.push(t);
245
+ }
246
+ }
247
+ this.numberTicks = userTicks.length;
248
+ this.min = this._ticks[0].value;
249
+ this.max = this._ticks[this.numberTicks-1].value;
250
+ this.tickInterval = (this.max - this.min) / (this.numberTicks - 1);
251
+ }
252
+
253
+ // we don't have any ticks yet, let's make some!
254
+ else {
255
+ if (name == 'xaxis' || name == 'x2axis') {
256
+ dim = this._plotDimensions.width;
257
+ }
258
+ else {
259
+ dim = this._plotDimensions.height;
260
+ }
261
+
262
+ // if min, max and number of ticks specified, user can't specify interval.
263
+ if (this.min != null && this.max != null && this.numberTicks != null) {
264
+ this.tickInterval = null;
265
+ }
266
+
267
+ min = (this.min != null) ? this.min : db.min;
268
+ max = (this.max != null) ? this.max : db.max;
269
+
270
+ // if min and max are same, space them out a bit.+
271
+ if (min == max) {
272
+ var adj = 0.05;
273
+ if (min > 0) {
274
+ adj = Math.max(Math.log(min)/Math.LN10, 0.05);
275
+ }
276
+ min -= adj;
277
+ max += adj;
278
+ }
279
+
280
+ var range = max - min;
281
+ var rmin, rmax;
282
+ var temp, prev, curr;
283
+ var ynumticks = [3,5,6,11,21];
284
+
285
+ // yaxis divide ticks in nice intervals from 0 to 1.
286
+ if (this.name == 'yaxis' || this.name == 'y2axis') {
287
+ this.min = 0;
288
+ this.max = 100;
289
+ // user didn't specify number of ticks.
290
+ if (!this.numberTicks){
291
+ if (this.tickInterval) {
292
+ this.numberTicks = 3 + Math.ceil(range / this.tickInterval);
293
+ }
294
+ else {
295
+ temp = 2 + Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);
296
+ for (i=0; i<ynumticks.length; i++) {
297
+ curr = temp/ynumticks[i];
298
+ if (curr == 1) {
299
+ this.numberTicks = ynumticks[i];
300
+ break;
301
+ }
302
+ else if (curr > 1) {
303
+ prev = curr;
304
+ continue;
305
+ }
306
+ else if (curr < 1) {
307
+ // was prev or is curr closer to one?
308
+ if (Math.abs(prev - 1) < Math.abs(curr - 1)) {
309
+ this.numberTicks = ynumticks[i-1];
310
+ break;
311
+ }
312
+ else {
313
+ this.numberTicks = ynumticks[i];
314
+ break;
315
+ }
316
+ }
317
+ else if (i == ynumticks.length -1) {
318
+ this.numberTicks = ynumticks[i];
319
+ }
320
+ }
321
+ this.tickInterval = range / (this.numberTicks - 1);
322
+ }
323
+ }
324
+
325
+ // user did specify number of ticks.
326
+ else {
327
+ this.tickInterval = range / (this.numberTicks - 1);
328
+ }
329
+
330
+ for (var i=0; i<this.numberTicks; i++){
331
+ tt = this.min + i * this.tickInterval;
332
+ t = new this.tickRenderer(this.tickOptions);
333
+ // var t = new $.jqplot.AxisTickRenderer(this.tickOptions);
334
+ if (!this.showTicks) {
335
+ t.showLabel = false;
336
+ t.showMark = false;
337
+ }
338
+ else if (!this.showTickMarks) {
339
+ t.showMark = false;
340
+ }
341
+ t.setTick(tt, this.name);
342
+ this._ticks.push(t);
343
+ }
344
+ }
345
+
346
+ // for x axes, have number ot ticks equal to number of series and ticks placed
347
+ // at sum of y values for each series.
348
+ else if (this.tickMode == 'bar') {
349
+ this.min = 0;
350
+ this.numberTicks = this._series.length + 1;
351
+ t = new this.tickRenderer(this.tickOptions);
352
+ if (!this.showTicks) {
353
+ t.showLabel = false;
354
+ t.showMark = false;
355
+ }
356
+ else if (!this.showTickMarks) {
357
+ t.showMark = false;
358
+ }
359
+ t.setTick(0, this.name);
360
+ this._ticks.push(t);
361
+
362
+ temp = 0;
363
+
364
+ for (i=1; i<this.numberTicks; i++){
365
+ temp += this._series[i-1]._sumy;
366
+ t = new this.tickRenderer(this.tickOptions);
367
+ if (!this.showTicks) {
368
+ t.showLabel = false;
369
+ t.showMark = false;
370
+ }
371
+ else if (!this.showTickMarks) {
372
+ t.showMark = false;
373
+ }
374
+ t.setTick(temp, this.name);
375
+ this._ticks.push(t);
376
+ }
377
+ this.max = this.max || temp;
378
+
379
+ // if user specified a max and it is greater than sum, add a tick
380
+ if (this.max > temp) {
381
+ t = new this.tickRenderer(this.tickOptions);
382
+ if (!this.showTicks) {
383
+ t.showLabel = false;
384
+ t.showMark = false;
385
+ }
386
+ else if (!this.showTickMarks) {
387
+ t.showMark = false;
388
+ }
389
+ t.setTick(this.max, this.name);
390
+ this._ticks.push(t);
391
+
392
+ }
393
+ }
394
+
395
+ else if (this.tickMode == 'even') {
396
+ this.min = 0;
397
+ this.max = this.max || db.max;
398
+ // get a desired number of ticks
399
+ var nt = 2 + Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);
400
+ range = this.max - this.min;
401
+ this.numberTicks = nt;
402
+ this.tickInterval = range / (this.numberTicks - 1);
403
+
404
+ for (i=0; i<this.numberTicks; i++){
405
+ tt = this.min + i * this.tickInterval;
406
+ t = new this.tickRenderer(this.tickOptions);
407
+ // var t = new $.jqplot.AxisTickRenderer(this.tickOptions);
408
+ if (!this.showTicks) {
409
+ t.showLabel = false;
410
+ t.showMark = false;
411
+ }
412
+ else if (!this.showTickMarks) {
413
+ t.showMark = false;
414
+ }
415
+ t.setTick(tt, this.name);
416
+ this._ticks.push(t);
417
+ }
418
+
419
+ }
420
+ }
421
+ };
422
+
423
+ // called with scope of axis
424
+ $.jqplot.MekkoAxisRenderer.prototype.pack = function(pos, offsets) {
425
+ var ticks = this._ticks;
426
+ var max = this.max;
427
+ var min = this.min;
428
+ var offmax = offsets.max;
429
+ var offmin = offsets.min;
430
+ var lshow = (this._label == null) ? false : this._label.show;
431
+
432
+ for (var p in pos) {
433
+ this._elem.css(p, pos[p]);
434
+ }
435
+
436
+ this._offsets = offsets;
437
+ // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left.
438
+ var pixellength = offmax - offmin;
439
+ var unitlength = max - min;
440
+
441
+ // point to unit and unit to point conversions references to Plot DOM element top left corner.
442
+ this.p2u = function(p){
443
+ return (p - offmin) * unitlength / pixellength + min;
444
+ };
445
+
446
+ this.u2p = function(u){
447
+ return (u - min) * pixellength / unitlength + offmin;
448
+ };
449
+
450
+ if (this.name == 'xaxis' || this.name == 'x2axis'){
451
+ this.series_u2p = function(u){
452
+ return (u - min) * pixellength / unitlength;
453
+ };
454
+ this.series_p2u = function(p){
455
+ return p * unitlength / pixellength + min;
456
+ };
457
+ }
458
+
459
+ else {
460
+ this.series_u2p = function(u){
461
+ return (u - max) * pixellength / unitlength;
462
+ };
463
+ this.series_p2u = function(p){
464
+ return p * unitlength / pixellength + max;
465
+ };
466
+ }
467
+
468
+ if (this.show) {
469
+ if (this.name == 'xaxis' || this.name == 'x2axis') {
470
+ for (i=0; i<ticks.length; i++) {
471
+ var t = ticks[i];
472
+ if (t.show && t.showLabel) {
473
+ var shim;
474
+
475
+ if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) {
476
+ // will need to adjust auto positioning based on which axis this is.
477
+ var temp = (this.name == 'xaxis') ? 1 : -1;
478
+ switch (t.labelPosition) {
479
+ case 'auto':
480
+ // position at end
481
+ if (temp * t.angle < 0) {
482
+ shim = -t.getWidth() + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2;
483
+ }
484
+ // position at start
485
+ else {
486
+ shim = -t._textRenderer.height * Math.sin(t._textRenderer.angle) / 2;
487
+ }
488
+ break;
489
+ case 'end':
490
+ shim = -t.getWidth() + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2;
491
+ break;
492
+ case 'start':
493
+ shim = -t._textRenderer.height * Math.sin(t._textRenderer.angle) / 2;
494
+ break;
495
+ case 'middle':
496
+ shim = -t.getWidth()/2 + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2;
497
+ break;
498
+ default:
499
+ shim = -t.getWidth()/2 + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2;
500
+ break;
501
+ }
502
+ }
503
+ else {
504
+ shim = -t.getWidth()/2;
505
+ }
506
+ var val = this.u2p(t.value) + shim + 'px';
507
+ t._elem.css('left', val);
508
+ t.pack();
509
+ }
510
+ }
511
+ var w;
512
+ if (lshow) {
513
+ w = this._label._elem.outerWidth(true);
514
+ this._label._elem.css('left', offmin + pixellength/2 - w/2 + 'px');
515
+ if (this.name == 'xaxis') {
516
+ this._label._elem.css('bottom', '0px');
517
+ }
518
+ else {
519
+ this._label._elem.css('top', '0px');
520
+ }
521
+ this._label.pack();
522
+ }
523
+ // now show the labels under the bars.
524
+ var b, l, r;
525
+ for (i=0; i<this.barLabels.length; i++) {
526
+ b = this._barLabels[i];
527
+ if (b.show) {
528
+ w = b.getWidth();
529
+ l = this._ticks[i].getLeft() + this._ticks[i].getWidth();
530
+ r = this._ticks[i+1].getLeft();
531
+ b._elem.css('left', (r+l-w)/2+'px');
532
+ b._elem.css('top', this._ticks[i]._elem.css('top'));
533
+ b.pack();
534
+ }
535
+ }
536
+ }
537
+ else {
538
+ for (i=0; i<ticks.length; i++) {
539
+ var t = ticks[i];
540
+ if (t.show && t.showLabel) {
541
+ var shim;
542
+ if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) {
543
+ // will need to adjust auto positioning based on which axis this is.
544
+ var temp = (this.name == 'yaxis') ? 1 : -1;
545
+ switch (t.labelPosition) {
546
+ case 'auto':
547
+ // position at end
548
+ case 'end':
549
+ if (temp * t.angle < 0) {
550
+ shim = -t._textRenderer.height * Math.cos(-t._textRenderer.angle) / 2;
551
+ }
552
+ else {
553
+ shim = -t.getHeight() + t._textRenderer.height * Math.cos(t._textRenderer.angle) / 2;
554
+ }
555
+ break;
556
+ case 'start':
557
+ if (t.angle > 0) {
558
+ shim = -t._textRenderer.height * Math.cos(-t._textRenderer.angle) / 2;
559
+ }
560
+ else {
561
+ shim = -t.getHeight() + t._textRenderer.height * Math.cos(t._textRenderer.angle) / 2;
562
+ }
563
+ break;
564
+ case 'middle':
565
+ shim = -t.getHeight()/2;
566
+ break;
567
+ default:
568
+ shim = -t.getHeight()/2;
569
+ break;
570
+ }
571
+ }
572
+ else {
573
+ shim = -t.getHeight()/2;
574
+ }
575
+
576
+ var val = this.u2p(t.value) + shim + 'px';
577
+ t._elem.css('top', val);
578
+ t.pack();
579
+ }
580
+ }
581
+ if (lshow) {
582
+ var h = this._label._elem.outerHeight(true);
583
+ this._label._elem.css('top', offmax - pixellength/2 - h/2 + 'px');
584
+ if (this.name == 'yaxis') {
585
+ this._label._elem.css('left', '0px');
586
+ }
587
+ else {
588
+ this._label._elem.css('right', '0px');
589
+ }
590
+ this._label.pack();
591
+ }
592
+ }
593
+ }
594
+ };
595
+ })(jQuery);