jqplot_rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,864 @@
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 objCounter = 0;
32
+ // class: $.jqplot.CanvasOverlay
33
+ $.jqplot.CanvasOverlay = function(opts){
34
+ var options = opts || {};
35
+ this.options = {
36
+ show: $.jqplot.config.enablePlugins,
37
+ deferDraw: false
38
+ };
39
+ // prop: objects
40
+ this.objects = [];
41
+ this.objectNames = [];
42
+ this.canvas = null;
43
+ this.markerRenderer = new $.jqplot.MarkerRenderer({style:'line'});
44
+ this.markerRenderer.init();
45
+ this.highlightObjectIndex = null;
46
+ if (options.objects) {
47
+ var objs = options.objects,
48
+ obj;
49
+ for (var i=0; i<objs.length; i++) {
50
+ obj = objs[i];
51
+ for (var n in obj) {
52
+ switch (n) {
53
+ case 'line':
54
+ this.addLine(obj[n]);
55
+ break;
56
+ case 'horizontalLine':
57
+ this.addHorizontalLine(obj[n]);
58
+ break;
59
+ case 'dashedHorizontalLine':
60
+ this.addDashedHorizontalLine(obj[n]);
61
+ break;
62
+ case 'verticalLine':
63
+ this.addVerticalLine(obj[n]);
64
+ break;
65
+ case 'dashedVerticalLine':
66
+ this.addDashedVerticalLine(obj[n]);
67
+ break;
68
+ default:
69
+ break;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ $.extend(true, this.options, options);
75
+ };
76
+
77
+ // called with scope of a plot object
78
+ $.jqplot.CanvasOverlay.postPlotInit = function (target, data, opts) {
79
+ var options = opts || {};
80
+ // add a canvasOverlay attribute to the plot
81
+ this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay);
82
+ };
83
+
84
+
85
+ function LineBase() {
86
+ this.uid = null;
87
+ this.type = null;
88
+ this.gridStart = null;
89
+ this.gridStop = null;
90
+ this.tooltipWidthFactor = 0;
91
+ this.options = {
92
+ // prop: name
93
+ // Optional name for the overlay object.
94
+ // Can be later used to retrieve the object by name.
95
+ name: null,
96
+ // prop: show
97
+ // true to show (draw), false to not draw.
98
+ show: true,
99
+ // prop: lineWidth
100
+ // Width of the line.
101
+ lineWidth: 2,
102
+ // prop: lineCap
103
+ // Type of ending placed on the line ['round', 'butt', 'square']
104
+ lineCap: 'round',
105
+ // prop: color
106
+ // color of the line
107
+ color: '#666666',
108
+ // prop: shadow
109
+ // wether or not to draw a shadow on the line
110
+ shadow: true,
111
+ // prop: shadowAngle
112
+ // Shadow angle in degrees
113
+ shadowAngle: 45,
114
+ // prop: shadowOffset
115
+ // Shadow offset from line in pixels
116
+ shadowOffset: 1,
117
+ // prop: shadowDepth
118
+ // Number of times shadow is stroked, each stroke offset shadowOffset from the last.
119
+ shadowDepth: 3,
120
+ // prop: shadowAlpha
121
+ // Alpha channel transparency of shadow. 0 = transparent.
122
+ shadowAlpha: '0.07',
123
+ // prop: xaxis
124
+ // X axis to use for positioning/scaling the line.
125
+ xaxis: 'xaxis',
126
+ // prop: yaxis
127
+ // Y axis to use for positioning/scaling the line.
128
+ yaxis: 'yaxis',
129
+ // prop: showTooltip
130
+ // Show a tooltip with data point values.
131
+ showTooltip: false,
132
+ // prop: showTooltipPrecision
133
+ // Controls how close to line cursor must be to show tooltip.
134
+ // Higher number = closer to line, lower number = farther from line.
135
+ // 1.0 = cursor must be over line.
136
+ showTooltipPrecision: 0.6,
137
+ // prop: tooltipLocation
138
+ // Where to position tooltip, 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'
139
+ tooltipLocation: 'nw',
140
+ // prop: fadeTooltip
141
+ // true = fade in/out tooltip, flase = show/hide tooltip
142
+ fadeTooltip: true,
143
+ // prop: tooltipFadeSpeed
144
+ // 'slow', 'def', 'fast', or number of milliseconds.
145
+ tooltipFadeSpeed: "fast",
146
+ // prop: tooltipOffset
147
+ // Pixel offset of tooltip from the highlight.
148
+ tooltipOffset: 4,
149
+ // prop: tooltipFormatString
150
+ // Format string passed the x and y values of the cursor on the line.
151
+ // e.g., 'Dogs: %.2f, Cats: %d'.
152
+ tooltipFormatString: '%d, %d'
153
+ };
154
+ }
155
+
156
+ /**
157
+ * Class: Line
158
+ * A straight line.
159
+ */
160
+ function Line(options) {
161
+ LineBase.call(this);
162
+ this.type = 'line';
163
+ var opts = {
164
+ // prop: start
165
+ // [x, y] coordinates for the start of the line.
166
+ start: [],
167
+ // prop: stop
168
+ // [x, y] coordinates for the end of the line.
169
+ stop: []
170
+ };
171
+ $.extend(true, this.options, opts, options);
172
+
173
+ if (this.options.showTooltipPrecision < 0.01) {
174
+ this.options.showTooltipPrecision = 0.01;
175
+ }
176
+ }
177
+
178
+ Line.prototype = new LineBase();
179
+ Line.prototype.constructor = Line;
180
+
181
+
182
+ /**
183
+ * Class: HorizontalLine
184
+ * A straight horizontal line.
185
+ */
186
+ function HorizontalLine(options) {
187
+ LineBase.call(this);
188
+ this.type = 'horizontalLine';
189
+ var opts = {
190
+ // prop: y
191
+ // y value to position the line
192
+ y: null,
193
+ // prop: xmin
194
+ // x value for the start of the line, null to scale to axis min.
195
+ xmin: null,
196
+ // prop: xmax
197
+ // x value for the end of the line, null to scale to axis max.
198
+ xmax: null,
199
+ // prop xOffset
200
+ // offset ends of the line inside the grid. Number
201
+ xOffset: '6px', // number or string. Number interpreted as units, string as pixels.
202
+ xminOffset: null,
203
+ xmaxOffset: null
204
+ };
205
+ $.extend(true, this.options, opts, options);
206
+
207
+ if (this.options.showTooltipPrecision < 0.01) {
208
+ this.options.showTooltipPrecision = 0.01;
209
+ }
210
+ }
211
+
212
+ HorizontalLine.prototype = new LineBase();
213
+ HorizontalLine.prototype.constructor = HorizontalLine;
214
+
215
+
216
+ /**
217
+ * Class: DashedHorizontalLine
218
+ * A straight dashed horizontal line.
219
+ */
220
+ function DashedHorizontalLine(options) {
221
+ LineBase.call(this);
222
+ this.type = 'dashedHorizontalLine';
223
+ var opts = {
224
+ y: null,
225
+ xmin: null,
226
+ xmax: null,
227
+ xOffset: '6px', // number or string. Number interpreted as units, string as pixels.
228
+ xminOffset: null,
229
+ xmaxOffset: null,
230
+ // prop: dashPattern
231
+ // Array of line, space settings in pixels.
232
+ // Default is 8 pixel of line, 8 pixel of space.
233
+ // Note, limit to a 2 element array b/c of bug with higher order arrays.
234
+ dashPattern: [8,8]
235
+ };
236
+ $.extend(true, this.options, opts, options);
237
+
238
+ if (this.options.showTooltipPrecision < 0.01) {
239
+ this.options.showTooltipPrecision = 0.01;
240
+ }
241
+ }
242
+
243
+ DashedHorizontalLine.prototype = new LineBase();
244
+ DashedHorizontalLine.prototype.constructor = DashedHorizontalLine;
245
+
246
+
247
+ /**
248
+ * Class: VerticalLine
249
+ * A straight vertical line.
250
+ */
251
+ function VerticalLine(options) {
252
+ LineBase.call(this);
253
+ this.type = 'verticalLine';
254
+ var opts = {
255
+ x: null,
256
+ ymin: null,
257
+ ymax: null,
258
+ yOffset: '6px', // number or string. Number interpreted as units, string as pixels.
259
+ yminOffset: null,
260
+ ymaxOffset: null
261
+ };
262
+ $.extend(true, this.options, opts, options);
263
+
264
+ if (this.options.showTooltipPrecision < 0.01) {
265
+ this.options.showTooltipPrecision = 0.01;
266
+ }
267
+ }
268
+
269
+ VerticalLine.prototype = new LineBase();
270
+ VerticalLine.prototype.constructor = VerticalLine;
271
+
272
+
273
+ /**
274
+ * Class: DashedVerticalLine
275
+ * A straight dashed vertical line.
276
+ */
277
+ function DashedVerticalLine(options) {
278
+ LineBase.call(this);
279
+ this.type = 'dashedVerticalLine';
280
+ this.start = null;
281
+ this.stop = null;
282
+ var opts = {
283
+ x: null,
284
+ ymin: null,
285
+ ymax: null,
286
+ yOffset: '6px', // number or string. Number interpreted as units, string as pixels.
287
+ yminOffset: null,
288
+ ymaxOffset: null,
289
+ // prop: dashPattern
290
+ // Array of line, space settings in pixels.
291
+ // Default is 8 pixel of line, 8 pixel of space.
292
+ // Note, limit to a 2 element array b/c of bug with higher order arrays.
293
+ dashPattern: [8,8]
294
+ };
295
+ $.extend(true, this.options, opts, options);
296
+
297
+ if (this.options.showTooltipPrecision < 0.01) {
298
+ this.options.showTooltipPrecision = 0.01;
299
+ }
300
+ }
301
+
302
+ DashedVerticalLine.prototype = new LineBase();
303
+ DashedVerticalLine.prototype.constructor = DashedVerticalLine;
304
+
305
+ $.jqplot.CanvasOverlay.prototype.addLine = function(opts) {
306
+ var line = new Line(opts);
307
+ line.uid = objCounter++;
308
+ this.objects.push(line);
309
+ this.objectNames.push(line.options.name);
310
+ };
311
+
312
+ $.jqplot.CanvasOverlay.prototype.addHorizontalLine = function(opts) {
313
+ var line = new HorizontalLine(opts);
314
+ line.uid = objCounter++;
315
+ this.objects.push(line);
316
+ this.objectNames.push(line.options.name);
317
+ };
318
+
319
+ $.jqplot.CanvasOverlay.prototype.addDashedHorizontalLine = function(opts) {
320
+ var line = new DashedHorizontalLine(opts);
321
+ line.uid = objCounter++;
322
+ this.objects.push(line);
323
+ this.objectNames.push(line.options.name);
324
+ };
325
+
326
+ $.jqplot.CanvasOverlay.prototype.addVerticalLine = function(opts) {
327
+ var line = new VerticalLine(opts);
328
+ line.uid = objCounter++;
329
+ this.objects.push(line);
330
+ this.objectNames.push(line.options.name);
331
+ };
332
+
333
+ $.jqplot.CanvasOverlay.prototype.addDashedVerticalLine = function(opts) {
334
+ var line = new DashedVerticalLine(opts);
335
+ line.uid = objCounter++;
336
+ this.objects.push(line);
337
+ this.objectNames.push(line.options.name);
338
+ };
339
+
340
+ $.jqplot.CanvasOverlay.prototype.removeObject = function(idx) {
341
+ // check if integer, remove by index
342
+ if ($.type(idx) == 'number') {
343
+ this.objects.splice(idx, 1);
344
+ this.objectNames.splice(idx, 1);
345
+ }
346
+ // if string, remove by name
347
+ else {
348
+ var id = $.inArray(idx, this.objectNames);
349
+ if (id != -1) {
350
+ this.objects.splice(id, 1);
351
+ this.objectNames.splice(id, 1);
352
+ }
353
+ }
354
+ };
355
+
356
+ $.jqplot.CanvasOverlay.prototype.getObject = function(idx) {
357
+ // check if integer, remove by index
358
+ if ($.type(idx) == 'number') {
359
+ return this.objects[idx];
360
+ }
361
+ // if string, remove by name
362
+ else {
363
+ var id = $.inArray(idx, this.objectNames);
364
+ if (id != -1) {
365
+ return this.objects[id];
366
+ }
367
+ }
368
+ };
369
+
370
+ // Set get as alias for getObject.
371
+ $.jqplot.CanvasOverlay.prototype.get = $.jqplot.CanvasOverlay.prototype.getObject;
372
+
373
+ $.jqplot.CanvasOverlay.prototype.clear = function(plot) {
374
+ this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(), this.canvas.getHeight());
375
+ };
376
+
377
+ $.jqplot.CanvasOverlay.prototype.draw = function(plot) {
378
+ var obj,
379
+ objs = this.objects,
380
+ mr = this.markerRenderer,
381
+ start,
382
+ stop;
383
+ if (this.options.show) {
384
+ this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(), this.canvas.getHeight());
385
+ for (var k=0; k<objs.length; k++) {
386
+ obj = objs[k];
387
+ var opts = $.extend(true, {}, obj.options);
388
+ if (obj.options.show) {
389
+ // style and shadow properties should be set before
390
+ // every draw of marker renderer.
391
+ mr.shadow = obj.options.shadow;
392
+ obj.tooltipWidthFactor = obj.options.lineWidth / obj.options.showTooltipPrecision;
393
+ switch (obj.type) {
394
+ case 'line':
395
+ // style and shadow properties should be set before
396
+ // every draw of marker renderer.
397
+ mr.style = 'line';
398
+ opts.closePath = false;
399
+ start = [plot.axes[obj.options.xaxis].series_u2p(obj.options.start[0]), plot.axes[obj.options.yaxis].series_u2p(obj.options.start[1])];
400
+ stop = [plot.axes[obj.options.xaxis].series_u2p(obj.options.stop[0]), plot.axes[obj.options.yaxis].series_u2p(obj.options.stop[1])];
401
+ obj.gridStart = start;
402
+ obj.gridStop = stop;
403
+ mr.draw(start, stop, this.canvas._ctx, opts);
404
+ break;
405
+ case 'horizontalLine':
406
+
407
+ // style and shadow properties should be set before
408
+ // every draw of marker renderer.
409
+ if (obj.options.y != null) {
410
+ mr.style = 'line';
411
+ opts.closePath = false;
412
+ var xaxis = plot.axes[obj.options.xaxis],
413
+ xstart,
414
+ xstop,
415
+ y = plot.axes[obj.options.yaxis].series_u2p(obj.options.y),
416
+ xminoff = obj.options.xminOffset || obj.options.xOffset,
417
+ xmaxoff = obj.options.xmaxOffset || obj.options.xOffset;
418
+ if (obj.options.xmin != null) {
419
+ xstart = xaxis.series_u2p(obj.options.xmin);
420
+ }
421
+ else if (xminoff != null) {
422
+ if ($.type(xminoff) == "number") {
423
+ xstart = xaxis.series_u2p(xaxis.min + xminoff);
424
+ }
425
+ else if ($.type(xminoff) == "string") {
426
+ xstart = xaxis.series_u2p(xaxis.min) + parseFloat(xminoff);
427
+ }
428
+ }
429
+ if (obj.options.xmax != null) {
430
+ xstop = xaxis.series_u2p(obj.options.xmax);
431
+ }
432
+ else if (xmaxoff != null) {
433
+ if ($.type(xmaxoff) == "number") {
434
+ xstop = xaxis.series_u2p(xaxis.max - xmaxoff);
435
+ }
436
+ else if ($.type(xmaxoff) == "string") {
437
+ xstop = xaxis.series_u2p(xaxis.max) - parseFloat(xmaxoff);
438
+ }
439
+ }
440
+ if (xstop != null && xstart != null) {
441
+ obj.gridStart = [xstart, y];
442
+ obj.gridStop = [xstop, y];
443
+ mr.draw([xstart, y], [xstop, y], this.canvas._ctx, opts);
444
+ }
445
+ }
446
+ break;
447
+
448
+ case 'dashedHorizontalLine':
449
+
450
+ var dashPat = obj.options.dashPattern;
451
+ var dashPatLen = 0;
452
+ for (var i=0; i<dashPat.length; i++) {
453
+ dashPatLen += dashPat[i];
454
+ }
455
+
456
+ // style and shadow properties should be set before
457
+ // every draw of marker renderer.
458
+ if (obj.options.y != null) {
459
+ mr.style = 'line';
460
+ opts.closePath = false;
461
+ var xaxis = plot.axes[obj.options.xaxis],
462
+ xstart,
463
+ xstop,
464
+ y = plot.axes[obj.options.yaxis].series_u2p(obj.options.y),
465
+ xminoff = obj.options.xminOffset || obj.options.xOffset,
466
+ xmaxoff = obj.options.xmaxOffset || obj.options.xOffset;
467
+ if (obj.options.xmin != null) {
468
+ xstart = xaxis.series_u2p(obj.options.xmin);
469
+ }
470
+ else if (xminoff != null) {
471
+ if ($.type(xminoff) == "number") {
472
+ xstart = xaxis.series_u2p(xaxis.min + xminoff);
473
+ }
474
+ else if ($.type(xminoff) == "string") {
475
+ xstart = xaxis.series_u2p(xaxis.min) + parseFloat(xminoff);
476
+ }
477
+ }
478
+ if (obj.options.xmax != null) {
479
+ xstop = xaxis.series_u2p(obj.options.xmax);
480
+ }
481
+ else if (xmaxoff != null) {
482
+ if ($.type(xmaxoff) == "number") {
483
+ xstop = xaxis.series_u2p(xaxis.max - xmaxoff);
484
+ }
485
+ else if ($.type(xmaxoff) == "string") {
486
+ xstop = xaxis.series_u2p(xaxis.max) - parseFloat(xmaxoff);
487
+ }
488
+ }
489
+ if (xstop != null && xstart != null) {
490
+ obj.gridStart = [xstart, y];
491
+ obj.gridStop = [xstop, y];
492
+ var numDash = Math.ceil((xstop - xstart)/dashPatLen);
493
+ var b=xstart, e;
494
+ for (var i=0; i<numDash; i++) {
495
+ for (var j=0; j<dashPat.length; j+=2) {
496
+ e = b+dashPat[j];
497
+ mr.draw([b, y], [e, y], this.canvas._ctx, opts);
498
+ b += dashPat[j];
499
+ if (j < dashPat.length-1) {
500
+ b += dashPat[j+1];
501
+ }
502
+ }
503
+ }
504
+ }
505
+ }
506
+ break;
507
+
508
+ case 'verticalLine':
509
+
510
+ // style and shadow properties should be set before
511
+ // every draw of marker renderer.
512
+ if (obj.options.x != null) {
513
+ mr.style = 'line';
514
+ opts.closePath = false;
515
+ var yaxis = plot.axes[obj.options.yaxis],
516
+ ystart,
517
+ ystop,
518
+ x = plot.axes[obj.options.xaxis].series_u2p(obj.options.x),
519
+ yminoff = obj.options.yminOffset || obj.options.yOffset,
520
+ ymaxoff = obj.options.ymaxOffset || obj.options.yOffset;
521
+ if (obj.options.ymin != null) {
522
+ ystart = yaxis.series_u2p(obj.options.ymin);
523
+ }
524
+ else if (yminoff != null) {
525
+ if ($.type(yminoff) == "number") {
526
+ ystart = yaxis.series_u2p(yaxis.min - yminoff);
527
+ }
528
+ else if ($.type(yminoff) == "string") {
529
+ ystart = yaxis.series_u2p(yaxis.min) - parseFloat(yminoff);
530
+ }
531
+ }
532
+ if (obj.options.ymax != null) {
533
+ ystop = yaxis.series_u2p(obj.options.ymax);
534
+ }
535
+ else if (ymaxoff != null) {
536
+ if ($.type(ymaxoff) == "number") {
537
+ ystop = yaxis.series_u2p(yaxis.max + ymaxoff);
538
+ }
539
+ else if ($.type(ymaxoff) == "string") {
540
+ ystop = yaxis.series_u2p(yaxis.max) + parseFloat(ymaxoff);
541
+ }
542
+ }
543
+ if (ystop != null && ystart != null) {
544
+ obj.gridStart = [x, ystart];
545
+ obj.gridStop = [x, ystop];
546
+ mr.draw([x, ystart], [x, ystop], this.canvas._ctx, opts);
547
+ }
548
+ }
549
+ break;
550
+
551
+ case 'dashedVerticalLine':
552
+
553
+ var dashPat = obj.options.dashPattern;
554
+ var dashPatLen = 0;
555
+ for (var i=0; i<dashPat.length; i++) {
556
+ dashPatLen += dashPat[i];
557
+ }
558
+
559
+ // style and shadow properties should be set before
560
+ // every draw of marker renderer.
561
+ if (obj.options.x != null) {
562
+ mr.style = 'line';
563
+ opts.closePath = false;
564
+ var yaxis = plot.axes[obj.options.yaxis],
565
+ ystart,
566
+ ystop,
567
+ x = plot.axes[obj.options.xaxis].series_u2p(obj.options.x),
568
+ yminoff = obj.options.yminOffset || obj.options.yOffset,
569
+ ymaxoff = obj.options.ymaxOffset || obj.options.yOffset;
570
+ if (obj.options.ymin != null) {
571
+ ystart = yaxis.series_u2p(obj.options.ymin);
572
+ }
573
+ else if (yminoff != null) {
574
+ if ($.type(yminoff) == "number") {
575
+ ystart = yaxis.series_u2p(yaxis.min - yminoff);
576
+ }
577
+ else if ($.type(yminoff) == "string") {
578
+ ystart = yaxis.series_u2p(yaxis.min) - parseFloat(yminoff);
579
+ }
580
+ }
581
+ if (obj.options.ymax != null) {
582
+ ystop = yaxis.series_u2p(obj.options.ymax);
583
+ }
584
+ else if (ymaxoff != null) {
585
+ if ($.type(ymaxoff) == "number") {
586
+ ystop = yaxis.series_u2p(yaxis.max + ymaxoff);
587
+ }
588
+ else if ($.type(ymaxoff) == "string") {
589
+ ystop = yaxis.series_u2p(yaxis.max) + parseFloat(ymaxoff);
590
+ }
591
+ }
592
+
593
+
594
+ if (ystop != null && ystart != null) {
595
+ obj.gridStart = [x, ystart];
596
+ obj.gridStop = [x, ystop];
597
+ var numDash = Math.ceil((ystart - ystop)/dashPatLen);
598
+ var firstDashAdjust = ((numDash * dashPatLen) - (ystart - ystop))/2.0;
599
+ var b=ystart, e, bs, es;
600
+ for (var i=0; i<numDash; i++) {
601
+ for (var j=0; j<dashPat.length; j+=2) {
602
+ e = b - dashPat[j];
603
+ if (e < ystop) {
604
+ e = ystop;
605
+ }
606
+ if (b < ystop) {
607
+ b = ystop;
608
+ }
609
+ // es = e;
610
+ // if (i == 0) {
611
+ // es += firstDashAdjust;
612
+ // }
613
+ mr.draw([x, b], [x, e], this.canvas._ctx, opts);
614
+ b -= dashPat[j];
615
+ if (j < dashPat.length-1) {
616
+ b -= dashPat[j+1];
617
+ }
618
+ }
619
+ }
620
+ }
621
+ }
622
+ break;
623
+
624
+ default:
625
+ break;
626
+ }
627
+ }
628
+ }
629
+ }
630
+ };
631
+
632
+ // called within context of plot
633
+ // create a canvas which we can draw on.
634
+ // insert it before the eventCanvas, so eventCanvas will still capture events.
635
+ $.jqplot.CanvasOverlay.postPlotDraw = function() {
636
+ var co = this.plugins.canvasOverlay;
637
+ // Memory Leaks patch
638
+ if (co && co.highlightCanvas) {
639
+ co.highlightCanvas.resetCanvas();
640
+ co.highlightCanvas = null;
641
+ }
642
+ co.canvas = new $.jqplot.GenericCanvas();
643
+
644
+ this.eventCanvas._elem.before(co.canvas.createElement(this._gridPadding, 'jqplot-overlayCanvas-canvas', this._plotDimensions, this));
645
+ co.canvas.setContext();
646
+ if (!co.deferDraw) {
647
+ co.draw(this);
648
+ }
649
+
650
+ var elem = document.createElement('div');
651
+ co._tooltipElem = $(elem);
652
+ elem = null;
653
+ co._tooltipElem.addClass('jqplot-canvasOverlay-tooltip');
654
+ co._tooltipElem.css({position:'absolute', display:'none'});
655
+
656
+ this.eventCanvas._elem.before(co._tooltipElem);
657
+ this.eventCanvas._elem.bind('mouseleave', { elem: co._tooltipElem }, function (ev) { ev.data.elem.hide(); });
658
+
659
+ var co = null;
660
+ };
661
+
662
+
663
+ function showTooltip(plot, obj, gridpos, datapos) {
664
+ var co = plot.plugins.canvasOverlay;
665
+ var elem = co._tooltipElem;
666
+
667
+ var opts = obj.options, x, y;
668
+
669
+ elem.html($.jqplot.sprintf(opts.tooltipFormatString, datapos[0], datapos[1]));
670
+
671
+ switch (opts.tooltipLocation) {
672
+ case 'nw':
673
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset;
674
+ y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true);
675
+ break;
676
+ case 'n':
677
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true)/2;
678
+ y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true);
679
+ break;
680
+ case 'ne':
681
+ x = gridpos[0] + plot._gridPadding.left + opts.tooltipOffset;
682
+ y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true);
683
+ break;
684
+ case 'e':
685
+ x = gridpos[0] + plot._gridPadding.left + opts.tooltipOffset;
686
+ y = gridpos[1] + plot._gridPadding.top - elem.outerHeight(true)/2;
687
+ break;
688
+ case 'se':
689
+ x = gridpos[0] + plot._gridPadding.left + opts.tooltipOffset;
690
+ y = gridpos[1] + plot._gridPadding.top + opts.tooltipOffset;
691
+ break;
692
+ case 's':
693
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true)/2;
694
+ y = gridpos[1] + plot._gridPadding.top + opts.tooltipOffset;
695
+ break;
696
+ case 'sw':
697
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset;
698
+ y = gridpos[1] + plot._gridPadding.top + opts.tooltipOffset;
699
+ break;
700
+ case 'w':
701
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset;
702
+ y = gridpos[1] + plot._gridPadding.top - elem.outerHeight(true)/2;
703
+ break;
704
+ default: // same as 'nw'
705
+ x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset;
706
+ y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true);
707
+ break;
708
+ }
709
+
710
+ elem.css('left', x);
711
+ elem.css('top', y);
712
+ if (opts.fadeTooltip) {
713
+ // Fix for stacked up animations. Thnanks Trevor!
714
+ elem.stop(true,true).fadeIn(opts.tooltipFadeSpeed);
715
+ }
716
+ else {
717
+ elem.show();
718
+ }
719
+ elem = null;
720
+ }
721
+
722
+
723
+ function isNearLine(point, lstart, lstop, width) {
724
+ // r is point to test, p and q are end points.
725
+ var rx = point[0];
726
+ var ry = point[1];
727
+ var px = Math.round(lstop[0]);
728
+ var py = Math.round(lstop[1]);
729
+ var qx = Math.round(lstart[0]);
730
+ var qy = Math.round(lstart[1]);
731
+
732
+ var l = Math.sqrt(Math.pow(px-qx, 2) + Math.pow(py-qy, 2));
733
+
734
+ // scale error term by length of line.
735
+ var eps = width*l;
736
+ var res = Math.abs((qx-px) * (ry-py) - (qy-py) * (rx-px));
737
+ var ret = (res < eps) ? true : false;
738
+ return ret;
739
+ }
740
+
741
+
742
+ function handleMove(ev, gridpos, datapos, neighbor, plot) {
743
+ var co = plot.plugins.canvasOverlay;
744
+ var objs = co.objects;
745
+ var l = objs.length;
746
+ var obj, haveHighlight=false;
747
+ var elem;
748
+ for (var i=0; i<l; i++) {
749
+ obj = objs[i];
750
+ if (obj.options.showTooltip) {
751
+ var n = isNearLine([gridpos.x, gridpos.y], obj.gridStart, obj.gridStop, obj.tooltipWidthFactor);
752
+ datapos = [plot.axes[obj.options.xaxis].series_p2u(gridpos.x), plot.axes[obj.options.yaxis].series_p2u(gridpos.y)];
753
+
754
+ // cases:
755
+ // near line, no highlighting
756
+ // near line, highliting on this line
757
+ // near line, highlighting another line
758
+ // not near any line, highlighting
759
+ // not near any line, no highlighting
760
+
761
+ // near line, not currently highlighting
762
+ if (n && co.highlightObjectIndex == null) {
763
+ switch (obj.type) {
764
+ case 'line':
765
+ showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
766
+ break;
767
+
768
+ case 'horizontalLine':
769
+ case 'dashedHorizontalLine':
770
+ showTooltip(plot, obj, [gridpos.x, obj.gridStart[1]], [datapos[0], obj.options.y]);
771
+ break;
772
+
773
+ case 'verticalLine':
774
+ case 'dashedVerticalLine':
775
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
776
+ break;
777
+ default:
778
+ break;
779
+ }
780
+ co.highlightObjectIndex = i;
781
+ haveHighlight = true;
782
+ break;
783
+ }
784
+
785
+ // near line, highlighting another line.
786
+ else if (n && co.highlightObjectIndex !== i) {
787
+ // turn off tooltip.
788
+ elem = co._tooltipElem;
789
+ if (obj.fadeTooltip) {
790
+ elem.fadeOut(obj.tooltipFadeSpeed);
791
+ }
792
+ else {
793
+ elem.hide();
794
+ }
795
+
796
+ // turn on right tooltip.
797
+ switch (obj.type) {
798
+ case 'line':
799
+ showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
800
+ break;
801
+
802
+ case 'horizontalLine':
803
+ case 'dashedHorizontalLine':
804
+ showTooltip(plot, obj, [gridpos.x, obj.gridStart[1]], [datapos[0], obj.options.y]);
805
+ break;
806
+
807
+ case 'verticalLine':
808
+ case 'dashedVerticalLine':
809
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
810
+ break;
811
+ default:
812
+ break;
813
+ }
814
+
815
+ co.highlightObjectIndex = i;
816
+ haveHighlight = true;
817
+ break;
818
+ }
819
+
820
+ // near line, already highlighting this line, update
821
+ else if (n) {
822
+ switch (obj.type) {
823
+ case 'line':
824
+ showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
825
+ break;
826
+
827
+ case 'horizontalLine':
828
+ case 'dashedHorizontalLine':
829
+ showTooltip(plot, obj, [gridpos.x, obj.gridStart[1]], [datapos[0], obj.options.y]);
830
+ break;
831
+
832
+ case 'verticalLine':
833
+ case 'dashedVerticalLine':
834
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
835
+ break;
836
+ default:
837
+ break;
838
+ }
839
+
840
+ haveHighlight = true;
841
+ break;
842
+ }
843
+ }
844
+ }
845
+
846
+ // check if we are highlighting and not near a line, turn it off.
847
+ if (!haveHighlight && co.highlightObjectIndex !== null) {
848
+ elem = co._tooltipElem;
849
+ obj = co.getObject(co.highlightObjectIndex);
850
+ if (obj.fadeTooltip) {
851
+ elem.fadeOut(obj.tooltipFadeSpeed);
852
+ }
853
+ else {
854
+ elem.hide();
855
+ }
856
+ co.highlightObjectIndex = null;
857
+ }
858
+ }
859
+
860
+ $.jqplot.postInitHooks.push($.jqplot.CanvasOverlay.postPlotInit);
861
+ $.jqplot.postDrawHooks.push($.jqplot.CanvasOverlay.postPlotDraw);
862
+ $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]);
863
+
864
+ })(jQuery);