jqplot_rails 0.0.1

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 (377) hide show
  1. data/CHANGELOG.rdoc +2 -0
  2. data/LICENSE +0 -0
  3. data/README.rdoc +1 -0
  4. data/files/dist/MIT-LICENSE.txt +21 -0
  5. data/files/dist/README.txt +77 -0
  6. data/files/dist/changes.txt +395 -0
  7. data/files/dist/copyright.txt +56 -0
  8. data/files/dist/docs/files/MIT-LICENSE-txt.html +39 -0
  9. data/files/dist/docs/files/changes-txt.html +39 -0
  10. data/files/dist/docs/files/gpl-2-0-txt.html +39 -0
  11. data/files/dist/docs/files/images/background.jpg +0 -0
  12. data/files/dist/docs/files/images/basicline.png +0 -0
  13. data/files/dist/docs/files/images/basiclogaxis.png +0 -0
  14. data/files/dist/docs/files/images/basiclogoptions.png +0 -0
  15. data/files/dist/docs/files/images/basicoptions.png +0 -0
  16. data/files/dist/docs/files/images/dualaxis.png +0 -0
  17. data/files/dist/docs/files/images/logo.jpg +0 -0
  18. data/files/dist/docs/files/images/navdocs.png +0 -0
  19. data/files/dist/docs/files/images/navdocsover.png +0 -0
  20. data/files/dist/docs/files/images/navdownload.png +0 -0
  21. data/files/dist/docs/files/images/navdownloadover.png +0 -0
  22. data/files/dist/docs/files/images/navexamples.png +0 -0
  23. data/files/dist/docs/files/images/navexamplesover.png +0 -0
  24. data/files/dist/docs/files/images/navhome.png +0 -0
  25. data/files/dist/docs/files/images/navhomeover.png +0 -0
  26. data/files/dist/docs/files/images/new.png +0 -0
  27. data/files/dist/docs/files/images/sample3.png +0 -0
  28. data/files/dist/docs/files/images/samplesm.png +0 -0
  29. data/files/dist/docs/files/jqPlotCssStyling-txt.html +39 -0
  30. data/files/dist/docs/files/jqPlotOptions-txt.html +292 -0
  31. data/files/dist/docs/files/jqplot-axisLabelRenderer-js.html +47 -0
  32. data/files/dist/docs/files/jqplot-axisTickRenderer-js.html +71 -0
  33. data/files/dist/docs/files/jqplot-canvasGridRenderer-js.html +39 -0
  34. data/files/dist/docs/files/jqplot-core-js.html +385 -0
  35. data/files/dist/docs/files/jqplot-divTitleRenderer-js.html +39 -0
  36. data/files/dist/docs/files/jqplot-lineRenderer-js.html +69 -0
  37. data/files/dist/docs/files/jqplot-linearAxisRenderer-js.html +61 -0
  38. data/files/dist/docs/files/jqplot-markerRenderer-js.html +65 -0
  39. data/files/dist/docs/files/jqplot-shadowRenderer-js.html +61 -0
  40. data/files/dist/docs/files/jqplot-shapeRenderer-js.html +65 -0
  41. data/files/dist/docs/files/jqplot-themeEngine-js.html +191 -0
  42. data/files/dist/docs/files/jqplot-toImage-js.html +39 -0
  43. data/files/dist/docs/files/optionsTutorial-txt.html +120 -0
  44. data/files/dist/docs/files/plugins/jqplot-BezierCurveRenderer-js.html +45 -0
  45. data/files/dist/docs/files/plugins/jqplot-barRenderer-js.html +69 -0
  46. data/files/dist/docs/files/plugins/jqplot-blockRenderer-js.html +53 -0
  47. data/files/dist/docs/files/plugins/jqplot-bubbleRenderer-js.html +71 -0
  48. data/files/dist/docs/files/plugins/jqplot-canvasAxisLabelRenderer-js.html +63 -0
  49. data/files/dist/docs/files/plugins/jqplot-canvasAxisTickRenderer-js.html +79 -0
  50. data/files/dist/docs/files/plugins/jqplot-canvasOverlay-js.html +113 -0
  51. data/files/dist/docs/files/plugins/jqplot-categoryAxisRenderer-js.html +46 -0
  52. data/files/dist/docs/files/plugins/jqplot-ciParser-js.html +39 -0
  53. data/files/dist/docs/files/plugins/jqplot-cursor-js.html +93 -0
  54. data/files/dist/docs/files/plugins/jqplot-dateAxisRenderer-js.html +101 -0
  55. data/files/dist/docs/files/plugins/jqplot-donutRenderer-js.html +98 -0
  56. data/files/dist/docs/files/plugins/jqplot-dragable-js.html +45 -0
  57. data/files/dist/docs/files/plugins/jqplot-enhancedLegendRenderer-js.html +49 -0
  58. data/files/dist/docs/files/plugins/jqplot-funnelRenderer-js.html +87 -0
  59. data/files/dist/docs/files/plugins/jqplot-highlighter-js.html +80 -0
  60. data/files/dist/docs/files/plugins/jqplot-logAxisRenderer-js.html +47 -0
  61. data/files/dist/docs/files/plugins/jqplot-mekkoAxisRenderer-js.html +49 -0
  62. data/files/dist/docs/files/plugins/jqplot-mekkoRenderer-js.html +62 -0
  63. data/files/dist/docs/files/plugins/jqplot-meterGaugeRenderer-js.html +103 -0
  64. data/files/dist/docs/files/plugins/jqplot-ohlcRenderer-js.html +65 -0
  65. data/files/dist/docs/files/plugins/jqplot-pieRenderer-js.html +93 -0
  66. data/files/dist/docs/files/plugins/jqplot-pointLabels-js.html +72 -0
  67. data/files/dist/docs/files/plugins/jqplot-pyramidAxisRenderer-js.html +49 -0
  68. data/files/dist/docs/files/plugins/jqplot-pyramidGridRenderer-js.html +39 -0
  69. data/files/dist/docs/files/plugins/jqplot-pyramidRenderer-js.html +53 -0
  70. data/files/dist/docs/files/plugins/jqplot-trendline-js.html +67 -0
  71. data/files/dist/docs/files/usage-txt.html +58 -0
  72. data/files/dist/docs/index/Classes.html +70 -0
  73. data/files/dist/docs/index/Files.html +34 -0
  74. data/files/dist/docs/index/Functions.html +66 -0
  75. data/files/dist/docs/index/General.html +42 -0
  76. data/files/dist/docs/index/General2.html +42 -0
  77. data/files/dist/docs/index/General3.html +42 -0
  78. data/files/dist/docs/index/General4.html +46 -0
  79. data/files/dist/docs/index/General5.html +46 -0
  80. data/files/dist/docs/index/General6.html +34 -0
  81. data/files/dist/docs/index/General7.html +58 -0
  82. data/files/dist/docs/index/Hooks.html +46 -0
  83. data/files/dist/docs/index/Properties.html +42 -0
  84. data/files/dist/docs/index/Properties2.html +42 -0
  85. data/files/dist/docs/index/Properties3.html +46 -0
  86. data/files/dist/docs/index/Properties4.html +50 -0
  87. data/files/dist/docs/index/Properties5.html +34 -0
  88. data/files/dist/docs/index/Properties6.html +58 -0
  89. data/files/dist/docs/index.html +1 -0
  90. data/files/dist/docs/javascript/main.js +836 -0
  91. data/files/dist/docs/javascript/searchdata.js +182 -0
  92. data/files/dist/docs/search/ClassesA.html +20 -0
  93. data/files/dist/docs/search/ClassesD.html +20 -0
  94. data/files/dist/docs/search/ClassesG.html +20 -0
  95. data/files/dist/docs/search/ClassesH.html +20 -0
  96. data/files/dist/docs/search/ClassesJ.html +20 -0
  97. data/files/dist/docs/search/ClassesL.html +20 -0
  98. data/files/dist/docs/search/ClassesS.html +20 -0
  99. data/files/dist/docs/search/ClassesSymbols.html +20 -0
  100. data/files/dist/docs/search/ClassesT.html +20 -0
  101. data/files/dist/docs/search/ClassesV.html +20 -0
  102. data/files/dist/docs/search/FilesJ.html +20 -0
  103. data/files/dist/docs/search/FunctionsC.html +20 -0
  104. data/files/dist/docs/search/FunctionsD.html +20 -0
  105. data/files/dist/docs/search/FunctionsG.html +20 -0
  106. data/files/dist/docs/search/FunctionsI.html +20 -0
  107. data/files/dist/docs/search/FunctionsM.html +20 -0
  108. data/files/dist/docs/search/FunctionsN.html +20 -0
  109. data/files/dist/docs/search/FunctionsR.html +20 -0
  110. data/files/dist/docs/search/FunctionsS.html +20 -0
  111. data/files/dist/docs/search/FunctionsZ.html +20 -0
  112. data/files/dist/docs/search/GeneralA.html +20 -0
  113. data/files/dist/docs/search/GeneralB.html +20 -0
  114. data/files/dist/docs/search/GeneralC.html +20 -0
  115. data/files/dist/docs/search/GeneralD.html +20 -0
  116. data/files/dist/docs/search/GeneralE.html +20 -0
  117. data/files/dist/docs/search/GeneralF.html +20 -0
  118. data/files/dist/docs/search/GeneralG.html +20 -0
  119. data/files/dist/docs/search/GeneralH.html +20 -0
  120. data/files/dist/docs/search/GeneralI.html +20 -0
  121. data/files/dist/docs/search/GeneralJ.html +20 -0
  122. data/files/dist/docs/search/GeneralL.html +20 -0
  123. data/files/dist/docs/search/GeneralM.html +20 -0
  124. data/files/dist/docs/search/GeneralN.html +20 -0
  125. data/files/dist/docs/search/GeneralO.html +20 -0
  126. data/files/dist/docs/search/GeneralP.html +20 -0
  127. data/files/dist/docs/search/GeneralR.html +20 -0
  128. data/files/dist/docs/search/GeneralS.html +20 -0
  129. data/files/dist/docs/search/GeneralSymbols.html +20 -0
  130. data/files/dist/docs/search/GeneralT.html +20 -0
  131. data/files/dist/docs/search/GeneralU.html +20 -0
  132. data/files/dist/docs/search/GeneralV.html +20 -0
  133. data/files/dist/docs/search/GeneralW.html +20 -0
  134. data/files/dist/docs/search/GeneralX.html +20 -0
  135. data/files/dist/docs/search/GeneralY.html +20 -0
  136. data/files/dist/docs/search/GeneralZ.html +20 -0
  137. data/files/dist/docs/search/HooksA.html +20 -0
  138. data/files/dist/docs/search/HooksE.html +20 -0
  139. data/files/dist/docs/search/HooksJ.html +20 -0
  140. data/files/dist/docs/search/HooksP.html +20 -0
  141. data/files/dist/docs/search/NoResults.html +15 -0
  142. data/files/dist/docs/search/PropertiesA.html +20 -0
  143. data/files/dist/docs/search/PropertiesB.html +20 -0
  144. data/files/dist/docs/search/PropertiesC.html +20 -0
  145. data/files/dist/docs/search/PropertiesD.html +20 -0
  146. data/files/dist/docs/search/PropertiesE.html +20 -0
  147. data/files/dist/docs/search/PropertiesF.html +20 -0
  148. data/files/dist/docs/search/PropertiesG.html +20 -0
  149. data/files/dist/docs/search/PropertiesH.html +20 -0
  150. data/files/dist/docs/search/PropertiesI.html +20 -0
  151. data/files/dist/docs/search/PropertiesL.html +20 -0
  152. data/files/dist/docs/search/PropertiesM.html +20 -0
  153. data/files/dist/docs/search/PropertiesN.html +20 -0
  154. data/files/dist/docs/search/PropertiesO.html +20 -0
  155. data/files/dist/docs/search/PropertiesP.html +20 -0
  156. data/files/dist/docs/search/PropertiesR.html +20 -0
  157. data/files/dist/docs/search/PropertiesS.html +20 -0
  158. data/files/dist/docs/search/PropertiesT.html +20 -0
  159. data/files/dist/docs/search/PropertiesU.html +20 -0
  160. data/files/dist/docs/search/PropertiesV.html +20 -0
  161. data/files/dist/docs/search/PropertiesW.html +20 -0
  162. data/files/dist/docs/search/PropertiesX.html +20 -0
  163. data/files/dist/docs/search/PropertiesY.html +20 -0
  164. data/files/dist/docs/search/PropertiesZ.html +20 -0
  165. data/files/dist/docs/styles/1.css +767 -0
  166. data/files/dist/docs/styles/2.css +174 -0
  167. data/files/dist/docs/styles/main.css +2 -0
  168. data/files/dist/examples/KCPsample4.csv +25 -0
  169. data/files/dist/examples/ajax-loader.gif +0 -0
  170. data/files/dist/examples/area.html +139 -0
  171. data/files/dist/examples/axisLabelTests.html +157 -0
  172. data/files/dist/examples/axisLabelsRotatedText.html +229 -0
  173. data/files/dist/examples/axisScalingForceTickAt.html +242 -0
  174. data/files/dist/examples/bandedLine.html +310 -0
  175. data/files/dist/examples/bar-charts.html +219 -0
  176. data/files/dist/examples/barLineAnimated.html +165 -0
  177. data/files/dist/examples/barTest.html +299 -0
  178. data/files/dist/examples/bezierCurve.html +125 -0
  179. data/files/dist/examples/blockPlot.html +197 -0
  180. data/files/dist/examples/bubble-plots.html +213 -0
  181. data/files/dist/examples/bubbleChart.html +264 -0
  182. data/files/dist/examples/candlestick-charts.html +209 -0
  183. data/files/dist/examples/candlestick.html +322 -0
  184. data/files/dist/examples/cursor-highlighter.html +137 -0
  185. data/files/dist/examples/customHighlighterCursorTrendline.html +104 -0
  186. data/files/dist/examples/dashboardWidget.html +212 -0
  187. data/files/dist/examples/dashedLines.html +227 -0
  188. data/files/dist/examples/data-renderers.html +144 -0
  189. data/files/dist/examples/date-axes.html +107 -0
  190. data/files/dist/examples/dateAxisLogAxisZooming.html +105 -0
  191. data/files/dist/examples/dateAxisRenderer.html +292 -0
  192. data/files/dist/examples/example.js +114 -0
  193. data/files/dist/examples/example.min.js +1 -0
  194. data/files/dist/examples/examples.css +135 -0
  195. data/files/dist/examples/examples.min.css +1 -0
  196. data/files/dist/examples/fillBetweenLines.html +134 -0
  197. data/files/dist/examples/hiddenPlotsInTabs.html +225 -0
  198. data/files/dist/examples/images/logo.jpg +0 -0
  199. data/files/dist/examples/index.html +100 -0
  200. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  201. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  202. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  203. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  204. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  205. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  206. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  207. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  208. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  209. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_2e83ff_256x240.png +0 -0
  210. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_454545_256x240.png +0 -0
  211. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_888888_256x240.png +0 -0
  212. data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_cd0a0a_256x240.png +0 -0
  213. data/files/dist/examples/jquery-ui/css/ui-lightness/jquery-ui.css +612 -0
  214. data/files/dist/examples/jquery-ui/css/ui-lightness/jquery-ui.min.css +10 -0
  215. data/files/dist/examples/jquery-ui/js/jquery-ui.min.js +473 -0
  216. data/files/dist/examples/jquery-ui/js/jquery.effects.blind.js +80 -0
  217. data/files/dist/examples/jquery-ui/js/jquery.effects.blind.min.js +14 -0
  218. data/files/dist/examples/jquery-ui/js/jquery.effects.core.js +890 -0
  219. data/files/dist/examples/jquery-ui/js/jquery.effects.core.min.js +32 -0
  220. data/files/dist/examples/jsondata.txt +1 -0
  221. data/files/dist/examples/kcp_area.html +250 -0
  222. data/files/dist/examples/kcp_cdf.html +351 -0
  223. data/files/dist/examples/kcp_engel.html +244 -0
  224. data/files/dist/examples/kcp_lorenz.html +510 -0
  225. data/files/dist/examples/kcp_pdf.html +387 -0
  226. data/files/dist/examples/kcp_pyramid.html +580 -0
  227. data/files/dist/examples/kcp_pyramid2.html +568 -0
  228. data/files/dist/examples/line-charts.html +193 -0
  229. data/files/dist/examples/mekkoCharts.html +269 -0
  230. data/files/dist/examples/meterGauge.html +179 -0
  231. data/files/dist/examples/nav.inc +40 -0
  232. data/files/dist/examples/pie-donut-charts.html +160 -0
  233. data/files/dist/examples/pieTest.html +187 -0
  234. data/files/dist/examples/pieTest2.js +80 -0
  235. data/files/dist/examples/pieTest4.html +258 -0
  236. data/files/dist/examples/point-labels.html +193 -0
  237. data/files/dist/examples/resizablePlot.html +196 -0
  238. data/files/dist/examples/rotated-tick-labels.html +216 -0
  239. data/files/dist/examples/rotatedTickLabelsZoom.html +118 -0
  240. data/files/dist/examples/smoothedLine.html +137 -0
  241. data/files/dist/examples/syntaxhighlighter/LGPL-LICENSE +165 -0
  242. data/files/dist/examples/syntaxhighlighter/MIT-LICENSE +20 -0
  243. data/files/dist/examples/syntaxhighlighter/scripts/shAutoloader.js +17 -0
  244. data/files/dist/examples/syntaxhighlighter/scripts/shAutoloader.min.js +1 -0
  245. data/files/dist/examples/syntaxhighlighter/scripts/shBrushJScript.js +52 -0
  246. data/files/dist/examples/syntaxhighlighter/scripts/shBrushJScript.min.js +1 -0
  247. data/files/dist/examples/syntaxhighlighter/scripts/shBrushXml.js +69 -0
  248. data/files/dist/examples/syntaxhighlighter/scripts/shBrushXml.min.js +1 -0
  249. data/files/dist/examples/syntaxhighlighter/scripts/shCore.js +17 -0
  250. data/files/dist/examples/syntaxhighlighter/scripts/shCore.min.js +1 -0
  251. data/files/dist/examples/syntaxhighlighter/styles/shCore.css +226 -0
  252. data/files/dist/examples/syntaxhighlighter/styles/shCore.min.css +1 -0
  253. data/files/dist/examples/syntaxhighlighter/styles/shCoreDefault.css +328 -0
  254. data/files/dist/examples/syntaxhighlighter/styles/shCoreDefault.min.css +1 -0
  255. data/files/dist/examples/syntaxhighlighter/styles/shThemeDefault.css +117 -0
  256. data/files/dist/examples/syntaxhighlighter/styles/shThemeDefault.min.css +1 -0
  257. data/files/dist/examples/syntaxhighlighter/styles/shThemejqPlot.css +138 -0
  258. data/files/dist/examples/syntaxhighlighter/styles/shThemejqPlot.min.css +1 -0
  259. data/files/dist/examples/theming.html +519 -0
  260. data/files/dist/examples/topbanner.inc +9 -0
  261. data/files/dist/examples/waterfall.html +162 -0
  262. data/files/dist/examples/waterfall2.html +231 -0
  263. data/files/dist/examples/yahooData.js +1807 -0
  264. data/files/dist/examples/yahooData.min.js +1 -0
  265. data/files/dist/examples/zoom1.html +149 -0
  266. data/files/dist/examples/zoomOptions.html +176 -0
  267. data/files/dist/examples/zoomProxy.html +110 -0
  268. data/files/dist/examples/zooming.html +209 -0
  269. data/files/dist/excanvas.js +1438 -0
  270. data/files/dist/excanvas.min.js +57 -0
  271. data/files/dist/gpl-2.0.txt +280 -0
  272. data/files/dist/jqPlotCssStyling.txt +53 -0
  273. data/files/dist/jqPlotOptions.txt +276 -0
  274. data/files/dist/jquery.jqplot.css +259 -0
  275. data/files/dist/jquery.jqplot.js +10901 -0
  276. data/files/dist/jquery.jqplot.min.css +1 -0
  277. data/files/dist/jquery.js +9046 -0
  278. data/files/dist/jquery.min.js +4 -0
  279. data/files/dist/optionsTutorial.txt +240 -0
  280. data/files/dist/plugins/jqplot.BezierCurveRenderer.js +312 -0
  281. data/files/dist/plugins/jqplot.BezierCurveRenderer.min.js +57 -0
  282. data/files/dist/plugins/jqplot.barRenderer.js +747 -0
  283. data/files/dist/plugins/jqplot.barRenderer.min.js +57 -0
  284. data/files/dist/plugins/jqplot.blockRenderer.js +234 -0
  285. data/files/dist/plugins/jqplot.blockRenderer.min.js +57 -0
  286. data/files/dist/plugins/jqplot.bubbleRenderer.js +754 -0
  287. data/files/dist/plugins/jqplot.bubbleRenderer.min.js +57 -0
  288. data/files/dist/plugins/jqplot.canvasAxisLabelRenderer.js +202 -0
  289. data/files/dist/plugins/jqplot.canvasAxisLabelRenderer.min.js +57 -0
  290. data/files/dist/plugins/jqplot.canvasAxisTickRenderer.js +242 -0
  291. data/files/dist/plugins/jqplot.canvasAxisTickRenderer.min.js +57 -0
  292. data/files/dist/plugins/jqplot.canvasOverlay.js +864 -0
  293. data/files/dist/plugins/jqplot.canvasOverlay.min.js +57 -0
  294. data/files/dist/plugins/jqplot.canvasTextRenderer.js +448 -0
  295. data/files/dist/plugins/jqplot.canvasTextRenderer.min.js +57 -0
  296. data/files/dist/plugins/jqplot.categoryAxisRenderer.js +636 -0
  297. data/files/dist/plugins/jqplot.categoryAxisRenderer.min.js +57 -0
  298. data/files/dist/plugins/jqplot.ciParser.js +115 -0
  299. data/files/dist/plugins/jqplot.ciParser.min.js +57 -0
  300. data/files/dist/plugins/jqplot.cursor.js +1093 -0
  301. data/files/dist/plugins/jqplot.cursor.min.js +57 -0
  302. data/files/dist/plugins/jqplot.dateAxisRenderer.js +702 -0
  303. data/files/dist/plugins/jqplot.dateAxisRenderer.min.js +57 -0
  304. data/files/dist/plugins/jqplot.donutRenderer.js +800 -0
  305. data/files/dist/plugins/jqplot.donutRenderer.min.js +57 -0
  306. data/files/dist/plugins/jqplot.dragable.js +224 -0
  307. data/files/dist/plugins/jqplot.dragable.min.js +57 -0
  308. data/files/dist/plugins/jqplot.enhancedLegendRenderer.js +241 -0
  309. data/files/dist/plugins/jqplot.enhancedLegendRenderer.min.js +57 -0
  310. data/files/dist/plugins/jqplot.funnelRenderer.js +938 -0
  311. data/files/dist/plugins/jqplot.funnelRenderer.min.js +57 -0
  312. data/files/dist/plugins/jqplot.highlighter.js +454 -0
  313. data/files/dist/plugins/jqplot.highlighter.min.js +57 -0
  314. data/files/dist/plugins/jqplot.json2.js +475 -0
  315. data/files/dist/plugins/jqplot.json2.min.js +57 -0
  316. data/files/dist/plugins/jqplot.logAxisRenderer.js +528 -0
  317. data/files/dist/plugins/jqplot.logAxisRenderer.min.js +57 -0
  318. data/files/dist/plugins/jqplot.mekkoAxisRenderer.js +610 -0
  319. data/files/dist/plugins/jqplot.mekkoAxisRenderer.min.js +57 -0
  320. data/files/dist/plugins/jqplot.mekkoRenderer.js +436 -0
  321. data/files/dist/plugins/jqplot.mekkoRenderer.min.js +57 -0
  322. data/files/dist/plugins/jqplot.meterGaugeRenderer.js +1029 -0
  323. data/files/dist/plugins/jqplot.meterGaugeRenderer.min.js +57 -0
  324. data/files/dist/plugins/jqplot.ohlcRenderer.js +372 -0
  325. data/files/dist/plugins/jqplot.ohlcRenderer.min.js +57 -0
  326. data/files/dist/plugins/jqplot.pieRenderer.js +899 -0
  327. data/files/dist/plugins/jqplot.pieRenderer.min.js +57 -0
  328. data/files/dist/plugins/jqplot.pointLabels.js +362 -0
  329. data/files/dist/plugins/jqplot.pointLabels.min.js +57 -0
  330. data/files/dist/plugins/jqplot.pyramidAxisRenderer.js +730 -0
  331. data/files/dist/plugins/jqplot.pyramidAxisRenderer.min.js +57 -0
  332. data/files/dist/plugins/jqplot.pyramidGridRenderer.js +423 -0
  333. data/files/dist/plugins/jqplot.pyramidGridRenderer.min.js +57 -0
  334. data/files/dist/plugins/jqplot.pyramidRenderer.js +490 -0
  335. data/files/dist/plugins/jqplot.pyramidRenderer.min.js +57 -0
  336. data/files/dist/plugins/jqplot.trendline.js +222 -0
  337. data/files/dist/plugins/jqplot.trendline.min.js +57 -0
  338. data/files/dist/usage.txt +126 -0
  339. data/files/javascripts/excanvas.min.js +57 -0
  340. data/files/javascripts/jquery.jqplot.min.js +57 -0
  341. data/files/javascripts/plugins/jqplot.BezierCurveRenderer.min.js +57 -0
  342. data/files/javascripts/plugins/jqplot.barRenderer.min.js +57 -0
  343. data/files/javascripts/plugins/jqplot.blockRenderer.min.js +57 -0
  344. data/files/javascripts/plugins/jqplot.bubbleRenderer.min.js +57 -0
  345. data/files/javascripts/plugins/jqplot.canvasAxisLabelRenderer.min.js +57 -0
  346. data/files/javascripts/plugins/jqplot.canvasAxisTickRenderer.min.js +57 -0
  347. data/files/javascripts/plugins/jqplot.canvasOverlay.min.js +57 -0
  348. data/files/javascripts/plugins/jqplot.canvasTextRenderer.min.js +57 -0
  349. data/files/javascripts/plugins/jqplot.categoryAxisRenderer.min.js +57 -0
  350. data/files/javascripts/plugins/jqplot.ciParser.min.js +57 -0
  351. data/files/javascripts/plugins/jqplot.cursor.min.js +57 -0
  352. data/files/javascripts/plugins/jqplot.dateAxisRenderer.min.js +57 -0
  353. data/files/javascripts/plugins/jqplot.donutRenderer.min.js +57 -0
  354. data/files/javascripts/plugins/jqplot.dragable.min.js +57 -0
  355. data/files/javascripts/plugins/jqplot.enhancedLegendRenderer.min.js +57 -0
  356. data/files/javascripts/plugins/jqplot.funnelRenderer.min.js +57 -0
  357. data/files/javascripts/plugins/jqplot.highlighter.min.js +57 -0
  358. data/files/javascripts/plugins/jqplot.json2.min.js +57 -0
  359. data/files/javascripts/plugins/jqplot.logAxisRenderer.min.js +57 -0
  360. data/files/javascripts/plugins/jqplot.mekkoAxisRenderer.min.js +57 -0
  361. data/files/javascripts/plugins/jqplot.mekkoRenderer.min.js +57 -0
  362. data/files/javascripts/plugins/jqplot.meterGaugeRenderer.min.js +57 -0
  363. data/files/javascripts/plugins/jqplot.ohlcRenderer.min.js +57 -0
  364. data/files/javascripts/plugins/jqplot.pieRenderer.min.js +57 -0
  365. data/files/javascripts/plugins/jqplot.pointLabels.min.js +57 -0
  366. data/files/javascripts/plugins/jqplot.pyramidAxisRenderer.min.js +57 -0
  367. data/files/javascripts/plugins/jqplot.pyramidGridRenderer.min.js +57 -0
  368. data/files/javascripts/plugins/jqplot.pyramidRenderer.min.js +57 -0
  369. data/files/javascripts/plugins/jqplot.trendline.min.js +57 -0
  370. data/files/stylesheets/jqplot_rails_overrides.css +3 -0
  371. data/files/stylesheets/jquery.jqplot.min.css +1 -0
  372. data/lib/jqplot_rails/jqplot_action_view.rb +106 -0
  373. data/lib/jqplot_rails/railtie.rb +29 -0
  374. data/lib/jqplot_rails/tasks.rb +58 -0
  375. data/lib/jqplot_rails/version.rb +17 -0
  376. data/lib/jqplot_rails.rb +5 -0
  377. metadata +473 -0
@@ -0,0 +1,754 @@
1
+ /**
2
+ * jqPlot
3
+ * Pure JavaScript plotting plugin using jQuery
4
+ *
5
+ * Version: 1.0.0b2_r1012
6
+ *
7
+ * Copyright (c) 2009-2011 Chris Leonello
8
+ * jqPlot is currently available for use in all personal or commercial projects
9
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
10
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
11
+ * choose the license that best suits your project and use it accordingly.
12
+ *
13
+ * Although not required, the author would appreciate an email letting him
14
+ * know of any substantial use of jqPlot. You can reach the author at:
15
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
16
+ *
17
+ * If you are feeling kind and generous, consider supporting the project by
18
+ * making a donation at: http://www.jqplot.com/donate.php .
19
+ *
20
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
21
+ *
22
+ * version 2007.04.27
23
+ * author Ash Searle
24
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
25
+ * http://hexmen.com/js/sprintf.js
26
+ * The author (Ash Searle) has placed this code in the public domain:
27
+ * "This code is unrestricted: you are free to use it however you like."
28
+ *
29
+ */
30
+ (function($) {
31
+ var arrayMax = function( array ){
32
+ return Math.max.apply( Math, array );
33
+ };
34
+ var arrayMin = function( array ){
35
+ return Math.min.apply( Math, array );
36
+ };
37
+
38
+ /**
39
+ * Class: $.jqplot.BubbleRenderer
40
+ * Plugin renderer to draw a bubble chart. A Bubble chart has data points displayed as
41
+ * colored circles with an optional text label inside. To use
42
+ * the bubble renderer, you must include the bubble renderer like:
43
+ *
44
+ * > <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.bubbleRenderer.js"></script>
45
+ *
46
+ * Data must be supplied in
47
+ * the form:
48
+ *
49
+ * > [[x1, y1, r1, <label or {label:'text', color:color}>], ...]
50
+ *
51
+ * where the label or options
52
+ * object is optional.
53
+ *
54
+ * Note that all bubble colors will be the same
55
+ * unless the "varyBubbleColors" option is set to true. Colors can be specified in the data array
56
+ * or in the seriesColors array option on the series. If no colors are defined, the default jqPlot
57
+ * series of 16 colors are used. Colors are automatically cycled around again if there are more
58
+ * bubbles than colors.
59
+ *
60
+ * Bubbles are autoscaled by default to fit within the chart area while maintaining
61
+ * relative sizes. If the "autoscaleBubbles" option is set to false, the r(adius) values
62
+ * in the data array a treated as literal pixel values for the radii of the bubbles.
63
+ *
64
+ * Properties are passed into the bubble renderer in the rendererOptions object of
65
+ * the series options like:
66
+ *
67
+ * > seriesDefaults: {
68
+ * > renderer: $.jqplot.BubbleRenderer,
69
+ * > rendererOptions: {
70
+ * > bubbleAlpha: 0.7,
71
+ * > varyBubbleColors: false
72
+ * > }
73
+ * > }
74
+ *
75
+ */
76
+ $.jqplot.BubbleRenderer = function(){
77
+ $.jqplot.LineRenderer.call(this);
78
+ };
79
+
80
+ $.jqplot.BubbleRenderer.prototype = new $.jqplot.LineRenderer();
81
+ $.jqplot.BubbleRenderer.prototype.constructor = $.jqplot.BubbleRenderer;
82
+
83
+ // called with scope of a series
84
+ $.jqplot.BubbleRenderer.prototype.init = function(options, plot) {
85
+ // Group: Properties
86
+ //
87
+ // prop: varyBubbleColors
88
+ // True to vary the color of each bubble in this series according to
89
+ // the seriesColors array. False to set each bubble to the color
90
+ // specified on this series. This has no effect if a css background color
91
+ // option is specified in the renderer css options.
92
+ this.varyBubbleColors = true;
93
+ // prop: autoscaleBubbles
94
+ // True to scale the bubble radius based on plot size.
95
+ // False will use the radius value as provided as a raw pixel value for
96
+ // bubble radius.
97
+ this.autoscaleBubbles = true;
98
+ // prop: autoscaleMultiplier
99
+ // Multiplier the bubble size if autoscaleBubbles is true.
100
+ this.autoscaleMultiplier = 1.0;
101
+ // prop: autoscalePointsFactor
102
+ // Factor which decreases bubble size based on how many bubbles on on the chart.
103
+ // 0 means no adjustment for number of bubbles. Negative values will decrease
104
+ // size of bubbles as more bubbles are added. Values between 0 and -0.2
105
+ // should work well.
106
+ this.autoscalePointsFactor = -0.07;
107
+ // prop: escapeHtml
108
+ // True to escape html in bubble label text.
109
+ this.escapeHtml = true;
110
+ // prop: highlightMouseOver
111
+ // True to highlight bubbles when moused over.
112
+ // This must be false to enable highlightMouseDown to highlight when clicking on a slice.
113
+ this.highlightMouseOver = true;
114
+ // prop: highlightMouseDown
115
+ // True to highlight when a mouse button is pressed over a bubble.
116
+ // This will be disabled if highlightMouseOver is true.
117
+ this.highlightMouseDown = false;
118
+ // prop: highlightColors
119
+ // An array of colors to use when highlighting a slice. Calculated automatically
120
+ // if not supplied.
121
+ this.highlightColors = [];
122
+ // prop: bubbleAlpha
123
+ // Alpha transparency to apply to all bubbles in this series.
124
+ this.bubbleAlpha = 1.0;
125
+ // prop: highlightAlpha
126
+ // Alpha transparency to apply when highlighting bubble.
127
+ // Set to value of bubbleAlpha by default.
128
+ this.highlightAlpha = null;
129
+ // prop: bubbleGradients
130
+ // True to color the bubbles with gradient fills instead of flat colors.
131
+ // NOT AVAILABLE IN IE due to lack of excanvas support for radial gradient fills.
132
+ // will be ignored in IE.
133
+ this.bubbleGradients = false;
134
+ // prop: showLabels
135
+ // True to show labels on bubbles (if any), false to not show.
136
+ this.showLabels = true;
137
+ // array of [point index, radius] which will be sorted in descending order to plot
138
+ // largest points below smaller points.
139
+ this.radii = [];
140
+ this.maxRadius = 0;
141
+ // index of the currenty highlighted point, if any
142
+ this._highlightedPoint = null;
143
+ // array of jQuery labels.
144
+ this.labels = [];
145
+ this.bubbleCanvases = [];
146
+ this._type = 'bubble';
147
+
148
+ // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver
149
+ if (options.highlightMouseDown && options.highlightMouseOver == null) {
150
+ options.highlightMouseOver = false;
151
+ }
152
+
153
+ $.extend(true, this, options);
154
+
155
+ if (this.highlightAlpha == null) {
156
+ this.highlightAlpha = this.bubbleAlpha;
157
+ if (this.bubbleGradients) {
158
+ this.highlightAlpha = 0.35;
159
+ }
160
+ }
161
+
162
+ this.autoscaleMultiplier = this.autoscaleMultiplier * Math.pow(this.data.length, this.autoscalePointsFactor);
163
+
164
+ // index of the currenty highlighted point, if any
165
+ this._highlightedPoint = null;
166
+
167
+ // adjust the series colors for options colors passed in with data or for alpha.
168
+ // note, this can leave undefined holes in the seriesColors array.
169
+ var comps;
170
+ for (var i=0; i<this.data.length; i++) {
171
+ var color = null;
172
+ var d = this.data[i];
173
+ this.maxRadius = Math.max(this.maxRadius, d[2]);
174
+ if (d[3]) {
175
+ if (typeof(d[3]) == 'object') {
176
+ color = d[3]['color'];
177
+ }
178
+ }
179
+
180
+ if (color == null) {
181
+ if (this.seriesColors[i] != null) {
182
+ color = this.seriesColors[i];
183
+ }
184
+ }
185
+
186
+ if (color && this.bubbleAlpha < 1.0) {
187
+ comps = $.jqplot.getColorComponents(color);
188
+ color = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', '+this.bubbleAlpha+')';
189
+ }
190
+
191
+ if (color) {
192
+ this.seriesColors[i] = color;
193
+ }
194
+ }
195
+
196
+ if (!this.varyBubbleColors) {
197
+ this.seriesColors = [this.color];
198
+ }
199
+
200
+ this.colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors);
201
+
202
+ // set highlight colors if none provided
203
+ if (this.highlightColors.length == 0) {
204
+ for (var i=0; i<this.seriesColors.length; i++){
205
+ var rgba = $.jqplot.getColorComponents(this.seriesColors[i]);
206
+ var newrgb = [rgba[0], rgba[1], rgba[2]];
207
+ var sum = newrgb[0] + newrgb[1] + newrgb[2];
208
+ for (var j=0; j<3; j++) {
209
+ // when darkening, lowest color component can be is 60.
210
+ newrgb[j] = (sum > 570) ? newrgb[j] * 0.8 : newrgb[j] + 0.3 * (255 - newrgb[j]);
211
+ newrgb[j] = parseInt(newrgb[j], 10);
212
+ }
213
+ this.highlightColors.push('rgba('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+', '+this.highlightAlpha+')');
214
+ }
215
+ }
216
+
217
+ this.highlightColorGenerator = new $.jqplot.ColorGenerator(this.highlightColors);
218
+
219
+ var sopts = {fill:true, isarc:true, angle:this.shadowAngle, alpha:this.shadowAlpha, closePath:true};
220
+
221
+ this.renderer.shadowRenderer.init(sopts);
222
+
223
+ this.canvas = new $.jqplot.DivCanvas();
224
+ this.canvas._plotDimensions = this._plotDimensions;
225
+
226
+ plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove);
227
+ plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown);
228
+ plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp);
229
+ plot.eventListenerHooks.addOnce('jqplotClick', handleClick);
230
+ plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick);
231
+ plot.postDrawHooks.addOnce(postPlotDraw);
232
+
233
+ };
234
+
235
+
236
+ // converts the user data values to grid coordinates and stores them
237
+ // in the gridData array.
238
+ // Called with scope of a series.
239
+ $.jqplot.BubbleRenderer.prototype.setGridData = function(plot) {
240
+ // recalculate the grid data
241
+ var xp = this._xaxis.series_u2p;
242
+ var yp = this._yaxis.series_u2p;
243
+ var data = this._plotData;
244
+ this.gridData = [];
245
+ var radii = [];
246
+ this.radii = [];
247
+ var dim = Math.min(plot._height, plot._width);
248
+ for (var i=0; i<this.data.length; i++) {
249
+ if (data[i] != null) {
250
+ this.gridData.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
251
+ this.radii.push([i, data[i][2]]);
252
+ radii.push(data[i][2]);
253
+ }
254
+ }
255
+ var r, val, maxr = this.maxRadius = arrayMax(radii);
256
+ var l = this.gridData.length;
257
+ if (this.autoscaleBubbles) {
258
+ for (var i=0; i<l; i++) {
259
+ val = radii[i]/maxr;
260
+ r = this.autoscaleMultiplier * dim / 6;
261
+ this.gridData[i][2] = r * val;
262
+ }
263
+ }
264
+
265
+ this.radii.sort(function(a, b) { return b[1] - a[1]; });
266
+ };
267
+
268
+ // converts any arbitrary data values to grid coordinates and
269
+ // returns them. This method exists so that plugins can use a series'
270
+ // linerenderer to generate grid data points without overwriting the
271
+ // grid data associated with that series.
272
+ // Called with scope of a series.
273
+ $.jqplot.BubbleRenderer.prototype.makeGridData = function(data, plot) {
274
+ // recalculate the grid data
275
+ var xp = this._xaxis.series_u2p;
276
+ var yp = this._yaxis.series_u2p;
277
+ var gd = [];
278
+ var radii = [];
279
+ this.radii = [];
280
+ var dim = Math.min(plot._height, plot._width);
281
+ for (var i=0; i<data.length; i++) {
282
+ if (data[i] != null) {
283
+ gd.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
284
+ radii.push(data[i][2]);
285
+ this.radii.push([i, data[i][2]]);
286
+ }
287
+ }
288
+ var r, val, maxr = this.maxRadius = arrayMax(radii);
289
+ var l = this.gridData.length;
290
+ if (this.autoscaleBubbles) {
291
+ for (var i=0; i<l; i++) {
292
+ val = radii[i]/maxr;
293
+ r = this.autoscaleMultiplier * dim / 6;
294
+ gd[i][2] = r * val;
295
+ }
296
+ }
297
+ this.radii.sort(function(a, b) { return b[1] - a[1]; });
298
+ return gd;
299
+ };
300
+
301
+ // called with scope of series
302
+ $.jqplot.BubbleRenderer.prototype.draw = function (ctx, gd, options) {
303
+ if (this.plugins.pointLabels) {
304
+ this.plugins.pointLabels.show = false;
305
+ }
306
+ var opts = (options != undefined) ? options : {};
307
+ var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
308
+ this.canvas._elem.empty();
309
+ for (var i=0; i<this.radii.length; i++) {
310
+ var idx = this.radii[i][0];
311
+ var t=null;
312
+ var color = null;
313
+ var el = null;
314
+ var tel = null;
315
+ var d = this.data[idx];
316
+ var gd = this.gridData[idx];
317
+ if (d[3]) {
318
+ if (typeof(d[3]) == 'object') {
319
+ t = d[3]['label'];
320
+ }
321
+ else if (typeof(d[3]) == 'string') {
322
+ t = d[3];
323
+ }
324
+ }
325
+
326
+ // color = (this.varyBubbleColors) ? this.colorGenerator.get(idx) : this.color;
327
+ color = this.colorGenerator.get(idx);
328
+
329
+ // If we're drawing a shadow, expand the canvas dimensions to accomodate.
330
+ var canvasRadius = gd[2];
331
+ var offset, depth;
332
+ if (this.shadow) {
333
+ offset = (0.7 + gd[2]/40).toFixed(1);
334
+ depth = 1 + Math.ceil(gd[2]/15);
335
+ canvasRadius += offset*depth;
336
+ }
337
+ this.bubbleCanvases[idx] = new $.jqplot.BubbleCanvas();
338
+ this.canvas._elem.append(this.bubbleCanvases[idx].createElement(gd[0], gd[1], canvasRadius));
339
+ this.bubbleCanvases[idx].setContext();
340
+ var ctx = this.bubbleCanvases[idx]._ctx;
341
+ var x = ctx.canvas.width/2;
342
+ var y = ctx.canvas.height/2;
343
+ if (this.shadow) {
344
+ this.renderer.shadowRenderer.draw(ctx, [x, y, gd[2], 0, 2*Math.PI], {offset: offset, depth: depth});
345
+ }
346
+ this.bubbleCanvases[idx].draw(gd[2], color, this.bubbleGradients, this.shadowAngle/180*Math.PI);
347
+
348
+ // now draw label.
349
+ if (t && this.showLabels) {
350
+ tel = $('<div style="position:absolute;" class="jqplot-bubble-label"></div>');
351
+ if (this.escapeHtml) {
352
+ tel.text(t);
353
+ }
354
+ else {
355
+ tel.html(t);
356
+ }
357
+ this.canvas._elem.append(tel);
358
+ var h = $(tel).outerHeight();
359
+ var w = $(tel).outerWidth();
360
+ var top = gd[1] - 0.5*h;
361
+ var left = gd[0] - 0.5*w;
362
+ tel.css({top: top, left: left});
363
+ this.labels[idx] = $(tel);
364
+ }
365
+ }
366
+ };
367
+
368
+
369
+ $.jqplot.DivCanvas = function() {
370
+ $.jqplot.ElemContainer.call(this);
371
+ this._ctx;
372
+ };
373
+
374
+ $.jqplot.DivCanvas.prototype = new $.jqplot.ElemContainer();
375
+ $.jqplot.DivCanvas.prototype.constructor = $.jqplot.DivCanvas;
376
+
377
+ $.jqplot.DivCanvas.prototype.createElement = function(offsets, clss, plotDimensions) {
378
+ this._offsets = offsets;
379
+ var klass = 'jqplot-DivCanvas';
380
+ if (clss != undefined) {
381
+ klass = clss;
382
+ }
383
+ var elem;
384
+ // if this canvas already has a dom element, don't make a new one.
385
+ if (this._elem) {
386
+ elem = this._elem.get(0);
387
+ }
388
+ else {
389
+ elem = document.createElement('div');
390
+ }
391
+ // if new plotDimensions supplied, use them.
392
+ if (plotDimensions != undefined) {
393
+ this._plotDimensions = plotDimensions;
394
+ }
395
+
396
+ var w = this._plotDimensions.width - this._offsets.left - this._offsets.right + 'px';
397
+ var h = this._plotDimensions.height - this._offsets.top - this._offsets.bottom + 'px';
398
+ this._elem = $(elem);
399
+ this._elem.css({ position: 'absolute', width:w, height:h, left: this._offsets.left, top: this._offsets.top });
400
+
401
+ this._elem.addClass(klass);
402
+ return this._elem;
403
+ };
404
+
405
+ $.jqplot.DivCanvas.prototype.setContext = function() {
406
+ this._ctx = {
407
+ canvas:{
408
+ width:0,
409
+ height:0
410
+ },
411
+ clearRect:function(){return null;}
412
+ };
413
+ return this._ctx;
414
+ };
415
+
416
+ $.jqplot.BubbleCanvas = function() {
417
+ $.jqplot.ElemContainer.call(this);
418
+ this._ctx;
419
+ };
420
+
421
+ $.jqplot.BubbleCanvas.prototype = new $.jqplot.ElemContainer();
422
+ $.jqplot.BubbleCanvas.prototype.constructor = $.jqplot.BubbleCanvas;
423
+
424
+ // initialize with the x,y pont of bubble center and the bubble radius.
425
+ $.jqplot.BubbleCanvas.prototype.createElement = function(x, y, r) {
426
+ var klass = 'jqplot-bubble-point';
427
+
428
+ var elem;
429
+ // if this canvas already has a dom element, don't make a new one.
430
+ if (this._elem) {
431
+ elem = this._elem.get(0);
432
+ }
433
+ else {
434
+ elem = document.createElement('canvas');
435
+ }
436
+
437
+ elem.width = (r != null) ? 2*r : elem.width;
438
+ elem.height = (r != null) ? 2*r : elem.height;
439
+ this._elem = $(elem);
440
+ var l = (x != null && r != null) ? x - r : this._elem.css('left');
441
+ var t = (y != null && r != null) ? y - r : this._elem.css('top');
442
+ this._elem.css({ position: 'absolute', left: l, top: t });
443
+
444
+ this._elem.addClass(klass);
445
+ if ($.jqplot.use_excanvas) {
446
+ window.G_vmlCanvasManager.init_(document);
447
+ elem = window.G_vmlCanvasManager.initElement(elem);
448
+ }
449
+
450
+ return this._elem;
451
+ };
452
+
453
+ $.jqplot.BubbleCanvas.prototype.draw = function(r, color, gradients, angle) {
454
+ var ctx = this._ctx;
455
+ // r = Math.floor(r*1.04);
456
+ // var x = Math.round(ctx.canvas.width/2);
457
+ // var y = Math.round(ctx.canvas.height/2);
458
+ var x = ctx.canvas.width/2;
459
+ var y = ctx.canvas.height/2;
460
+ ctx.save();
461
+ if (gradients && !$.jqplot.use_excanvas) {
462
+ r = r*1.04;
463
+ var comps = $.jqplot.getColorComponents(color);
464
+ var colorinner = 'rgba('+Math.round(comps[0]+0.8*(255-comps[0]))+', '+Math.round(comps[1]+0.8*(255-comps[1]))+', '+Math.round(comps[2]+0.8*(255-comps[2]))+', '+comps[3]+')';
465
+ var colorend = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', 0)';
466
+ // var rinner = Math.round(0.35 * r);
467
+ // var xinner = Math.round(x - Math.cos(angle) * 0.33 * r);
468
+ // var yinner = Math.round(y - Math.sin(angle) * 0.33 * r);
469
+ var rinner = 0.35 * r;
470
+ var xinner = x - Math.cos(angle) * 0.33 * r;
471
+ var yinner = y - Math.sin(angle) * 0.33 * r;
472
+ var radgrad = ctx.createRadialGradient(xinner, yinner, rinner, x, y, r);
473
+ radgrad.addColorStop(0, colorinner);
474
+ radgrad.addColorStop(0.93, color);
475
+ radgrad.addColorStop(0.96, colorend);
476
+ radgrad.addColorStop(1, colorend);
477
+ // radgrad.addColorStop(.98, colorend);
478
+ ctx.fillStyle = radgrad;
479
+ ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height);
480
+ }
481
+ else {
482
+ ctx.fillStyle = color;
483
+ ctx.strokeStyle = color;
484
+ ctx.lineWidth = 1;
485
+ ctx.beginPath();
486
+ var ang = 2*Math.PI;
487
+ ctx.arc(x, y, r, 0, ang, 0);
488
+ ctx.closePath();
489
+ ctx.fill();
490
+ }
491
+ ctx.restore();
492
+ };
493
+
494
+ $.jqplot.BubbleCanvas.prototype.setContext = function() {
495
+ this._ctx = this._elem.get(0).getContext("2d");
496
+ return this._ctx;
497
+ };
498
+
499
+ $.jqplot.BubbleAxisRenderer = function() {
500
+ $.jqplot.LinearAxisRenderer.call(this);
501
+ };
502
+
503
+ $.jqplot.BubbleAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer();
504
+ $.jqplot.BubbleAxisRenderer.prototype.constructor = $.jqplot.BubbleAxisRenderer;
505
+
506
+ // called with scope of axis object.
507
+ $.jqplot.BubbleAxisRenderer.prototype.init = function(options){
508
+ $.extend(true, this, options);
509
+ var db = this._dataBounds;
510
+ var minsidx = 0,
511
+ minpidx = 0,
512
+ maxsidx = 0,
513
+ maxpidx = 0,
514
+ maxr = 0,
515
+ minr = 0,
516
+ minMaxRadius = 0,
517
+ maxMaxRadius = 0,
518
+ maxMult = 0,
519
+ minMult = 0;
520
+ // Go through all the series attached to this axis and find
521
+ // the min/max bounds for this axis.
522
+ for (var i=0; i<this._series.length; i++) {
523
+ var s = this._series[i];
524
+ var d = s._plotData;
525
+
526
+ for (var j=0; j<d.length; j++) {
527
+ if (this.name == 'xaxis' || this.name == 'x2axis') {
528
+ if (d[j][0] < db.min || db.min == null) {
529
+ db.min = d[j][0];
530
+ minsidx=i;
531
+ minpidx=j;
532
+ minr = d[j][2];
533
+ minMaxRadius = s.maxRadius;
534
+ minMult = s.autoscaleMultiplier;
535
+ }
536
+ if (d[j][0] > db.max || db.max == null) {
537
+ db.max = d[j][0];
538
+ maxsidx=i;
539
+ maxpidx=j;
540
+ maxr = d[j][2];
541
+ maxMaxRadius = s.maxRadius;
542
+ maxMult = s.autoscaleMultiplier;
543
+ }
544
+ }
545
+ else {
546
+ if (d[j][1] < db.min || db.min == null) {
547
+ db.min = d[j][1];
548
+ minsidx=i;
549
+ minpidx=j;
550
+ minr = d[j][2];
551
+ minMaxRadius = s.maxRadius;
552
+ minMult = s.autoscaleMultiplier;
553
+ }
554
+ if (d[j][1] > db.max || db.max == null) {
555
+ db.max = d[j][1];
556
+ maxsidx=i;
557
+ maxpidx=j;
558
+ maxr = d[j][2];
559
+ maxMaxRadius = s.maxRadius;
560
+ maxMult = s.autoscaleMultiplier;
561
+ }
562
+ }
563
+ }
564
+ }
565
+
566
+ var minRatio = minr/minMaxRadius;
567
+ var maxRatio = maxr/maxMaxRadius;
568
+
569
+ // need to estimate the effect of the radius on total axis span and adjust axis accordingly.
570
+ var span = db.max - db.min;
571
+ // var dim = (this.name == 'xaxis' || this.name == 'x2axis') ? this._plotDimensions.width : this._plotDimensions.height;
572
+ var dim = Math.min(this._plotDimensions.width, this._plotDimensions.height);
573
+
574
+ var minfact = minRatio * minMult/3 * span;
575
+ var maxfact = maxRatio * maxMult/3 * span;
576
+ db.max += maxfact;
577
+ db.min -= minfact;
578
+ };
579
+
580
+ function highlight (plot, sidx, pidx) {
581
+ plot.plugins.bubbleRenderer.highlightLabelCanvas.empty();
582
+ var s = plot.series[sidx];
583
+ var canvas = plot.plugins.bubbleRenderer.highlightCanvas;
584
+ var ctx = canvas._ctx;
585
+ ctx.clearRect(0,0,ctx.canvas.width, ctx.canvas.height);
586
+ s._highlightedPoint = pidx;
587
+ plot.plugins.bubbleRenderer.highlightedSeriesIndex = sidx;
588
+
589
+ var color = s.highlightColorGenerator.get(pidx);
590
+ var x = s.gridData[pidx][0],
591
+ y = s.gridData[pidx][1],
592
+ r = s.gridData[pidx][2];
593
+ ctx.save();
594
+ ctx.fillStyle = color;
595
+ ctx.strokeStyle = color;
596
+ ctx.lineWidth = 1;
597
+ ctx.beginPath();
598
+ ctx.arc(x, y, r, 0, 2*Math.PI, 0);
599
+ ctx.closePath();
600
+ ctx.fill();
601
+ ctx.restore();
602
+ // bring label to front
603
+ if (s.labels[pidx]) {
604
+ plot.plugins.bubbleRenderer.highlightLabel = s.labels[pidx].clone();
605
+ plot.plugins.bubbleRenderer.highlightLabel.appendTo(plot.plugins.bubbleRenderer.highlightLabelCanvas);
606
+ plot.plugins.bubbleRenderer.highlightLabel.addClass('jqplot-bubble-label-highlight');
607
+ }
608
+ }
609
+
610
+ function unhighlight (plot) {
611
+ var canvas = plot.plugins.bubbleRenderer.highlightCanvas;
612
+ var sidx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
613
+ plot.plugins.bubbleRenderer.highlightLabelCanvas.empty();
614
+ canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
615
+ for (var i=0; i<plot.series.length; i++) {
616
+ plot.series[i]._highlightedPoint = null;
617
+ }
618
+ plot.plugins.bubbleRenderer.highlightedSeriesIndex = null;
619
+ plot.target.trigger('jqplotDataUnhighlight');
620
+ }
621
+
622
+
623
+ function handleMove(ev, gridpos, datapos, neighbor, plot) {
624
+ if (neighbor) {
625
+ var si = neighbor.seriesIndex;
626
+ var pi = neighbor.pointIndex;
627
+ var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
628
+ var evt1 = jQuery.Event('jqplotDataMouseOver');
629
+ evt1.pageX = ev.pageX;
630
+ evt1.pageY = ev.pageY;
631
+ plot.target.trigger(evt1, ins);
632
+ if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
633
+ var evt = jQuery.Event('jqplotDataHighlight');
634
+ evt.pageX = ev.pageX;
635
+ evt.pageY = ev.pageY;
636
+ plot.target.trigger(evt, ins);
637
+ highlight (plot, ins[0], ins[1]);
638
+ }
639
+ }
640
+ else if (neighbor == null) {
641
+ unhighlight (plot);
642
+ }
643
+ }
644
+
645
+ function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
646
+ if (neighbor) {
647
+ var si = neighbor.seriesIndex;
648
+ var pi = neighbor.pointIndex;
649
+ var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
650
+ if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
651
+ var evt = jQuery.Event('jqplotDataHighlight');
652
+ evt.pageX = ev.pageX;
653
+ evt.pageY = ev.pageY;
654
+ plot.target.trigger(evt, ins);
655
+ highlight (plot, ins[0], ins[1]);
656
+ }
657
+ }
658
+ else if (neighbor == null) {
659
+ unhighlight (plot);
660
+ }
661
+ }
662
+
663
+ function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
664
+ var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
665
+ if (idx != null && plot.series[idx].highlightMouseDown) {
666
+ unhighlight(plot);
667
+ }
668
+ }
669
+
670
+ function handleClick(ev, gridpos, datapos, neighbor, plot) {
671
+ if (neighbor) {
672
+ var si = neighbor.seriesIndex;
673
+ var pi = neighbor.pointIndex;
674
+ var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
675
+ var evt = jQuery.Event('jqplotDataClick');
676
+ evt.pageX = ev.pageX;
677
+ evt.pageY = ev.pageY;
678
+ plot.target.trigger(evt, ins);
679
+ }
680
+ }
681
+
682
+ function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
683
+ if (neighbor) {
684
+ var si = neighbor.seriesIndex;
685
+ var pi = neighbor.pointIndex;
686
+ var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
687
+ var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
688
+ if (idx != null && plot.series[idx].highlightMouseDown) {
689
+ unhighlight(plot);
690
+ }
691
+ var evt = jQuery.Event('jqplotDataRightClick');
692
+ evt.pageX = ev.pageX;
693
+ evt.pageY = ev.pageY;
694
+ plot.target.trigger(evt, ins);
695
+ }
696
+ }
697
+
698
+ // called within context of plot
699
+ // create a canvas which we can draw on.
700
+ // insert it before the eventCanvas, so eventCanvas will still capture events.
701
+ function postPlotDraw() {
702
+ // Memory Leaks patch
703
+ if (this.plugins.bubbleRenderer && this.plugins.bubbleRenderer.highlightCanvas) {
704
+ this.plugins.bubbleRenderer.highlightCanvas.resetCanvas();
705
+ this.plugins.bubbleRenderer.highlightCanvas = null;
706
+ }
707
+
708
+ this.plugins.bubbleRenderer = {highlightedSeriesIndex:null};
709
+ this.plugins.bubbleRenderer.highlightCanvas = new $.jqplot.GenericCanvas();
710
+ this.plugins.bubbleRenderer.highlightLabel = null;
711
+ this.plugins.bubbleRenderer.highlightLabelCanvas = $('<div style="position:absolute;"></div>');
712
+ var top = this._gridPadding.top;
713
+ var left = this._gridPadding.left;
714
+ var width = this._plotDimensions.width - this._gridPadding.left - this._gridPadding.right;
715
+ var height = this._plotDimensions.height - this._gridPadding.top - this._gridPadding.bottom;
716
+ this.plugins.bubbleRenderer.highlightLabelCanvas.css({top:top, left:left, width:width+'px', height:height+'px'});
717
+
718
+ this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-bubbleRenderer-highlight-canvas', this._plotDimensions, this));
719
+ this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightLabelCanvas);
720
+
721
+ var hctx = this.plugins.bubbleRenderer.highlightCanvas.setContext();
722
+ }
723
+
724
+
725
+ // setup default renderers for axes and legend so user doesn't have to
726
+ // called with scope of plot
727
+ function preInit(target, data, options) {
728
+ options = options || {};
729
+ options.axesDefaults = options.axesDefaults || {};
730
+ options.seriesDefaults = options.seriesDefaults || {};
731
+ // only set these if there is a Bubble series
732
+ var setopts = false;
733
+ if (options.seriesDefaults.renderer == $.jqplot.BubbleRenderer) {
734
+ setopts = true;
735
+ }
736
+ else if (options.series) {
737
+ for (var i=0; i < options.series.length; i++) {
738
+ if (options.series[i].renderer == $.jqplot.BubbleRenderer) {
739
+ setopts = true;
740
+ }
741
+ }
742
+ }
743
+
744
+ if (setopts) {
745
+ options.axesDefaults.renderer = $.jqplot.BubbleAxisRenderer;
746
+ options.sortData = false;
747
+ }
748
+ }
749
+
750
+ $.jqplot.preInitHooks.push(preInit);
751
+
752
+ })(jQuery);
753
+
754
+