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,702 @@
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
+ /**
32
+ * Class: $.jqplot.DateAxisRenderer
33
+ * A plugin for a jqPlot to render an axis as a series of date values.
34
+ * This renderer has no options beyond those supplied by the <Axis> class.
35
+ * It supplies it's own tick formatter, so the tickOptions.formatter option
36
+ * should not be overridden.
37
+ *
38
+ * Thanks to Ken Synder for his enhanced Date instance methods which are
39
+ * included with this code <http://kendsnyder.com/sandbox/date/>.
40
+ *
41
+ * To use this renderer, include the plugin in your source
42
+ * > <script type="text/javascript" language="javascript" src="plugins/jqplot.dateAxisRenderer.js"></script>
43
+ *
44
+ * and supply the appropriate options to your plot
45
+ *
46
+ * > {axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer}}}
47
+ *
48
+ * Dates can be passed into the axis in almost any recognizable value and
49
+ * will be parsed. They will be rendered on the axis in the format
50
+ * specified by tickOptions.formatString. e.g. tickOptions.formatString = '%Y-%m-%d'.
51
+ *
52
+ * Accecptable format codes
53
+ * are:
54
+ *
55
+ * > Code Result Description
56
+ * > == Years ==
57
+ * > %Y 2008 Four-digit year
58
+ * > %y 08 Two-digit year
59
+ * > == Months ==
60
+ * > %m 09 Two-digit month
61
+ * > %#m 9 One or two-digit month
62
+ * > %B September Full month name
63
+ * > %b Sep Abbreviated month name
64
+ * > == Days ==
65
+ * > %d 05 Two-digit day of month
66
+ * > %#d 5 One or two-digit day of month
67
+ * > %e 5 One or two-digit day of month
68
+ * > %A Sunday Full name of the day of the week
69
+ * > %a Sun Abbreviated name of the day of the week
70
+ * > %w 0 Number of the day of the week (0 = Sunday, 6 = Saturday)
71
+ * > %o th The ordinal suffix string following the day of the month
72
+ * > == Hours ==
73
+ * > %H 23 Hours in 24-hour format (two digits)
74
+ * > %#H 3 Hours in 24-hour integer format (one or two digits)
75
+ * > %I 11 Hours in 12-hour format (two digits)
76
+ * > %#I 3 Hours in 12-hour integer format (one or two digits)
77
+ * > %p PM AM or PM
78
+ * > == Minutes ==
79
+ * > %M 09 Minutes (two digits)
80
+ * > %#M 9 Minutes (one or two digits)
81
+ * > == Seconds ==
82
+ * > %S 02 Seconds (two digits)
83
+ * > %#S 2 Seconds (one or two digits)
84
+ * > %s 1206567625723 Unix timestamp (Seconds past 1970-01-01 00:00:00)
85
+ * > == Milliseconds ==
86
+ * > %N 008 Milliseconds (three digits)
87
+ * > %#N 8 Milliseconds (one to three digits)
88
+ * > == Timezone ==
89
+ * > %O 360 difference in minutes between local time and GMT
90
+ * > %Z Mountain Standard Time Name of timezone as reported by browser
91
+ * > %G -06:00 Hours and minutes between GMT
92
+ * > == Shortcuts ==
93
+ * > %F 2008-03-26 %Y-%m-%d
94
+ * > %T 05:06:30 %H:%M:%S
95
+ * > %X 05:06:30 %H:%M:%S
96
+ * > %x 03/26/08 %m/%d/%y
97
+ * > %D 03/26/08 %m/%d/%y
98
+ * > %#c Wed Mar 26 15:31:00 2008 %a %b %e %H:%M:%S %Y
99
+ * > %v 3-Sep-2008 %e-%b-%Y
100
+ * > %R 15:31 %H:%M
101
+ * > %r 3:31:00 PM %I:%M:%S %p
102
+ * > == Characters ==
103
+ * > %n \n Newline
104
+ * > %t \t Tab
105
+ * > %% % Percent Symbol
106
+ */
107
+ $.jqplot.DateAxisRenderer = function() {
108
+ $.jqplot.LinearAxisRenderer.call(this);
109
+ this.date = new $.jsDate();
110
+ };
111
+
112
+ var second = 1000;
113
+ var minute = 60 * second;
114
+ var hour = 60 * minute;
115
+ var day = 24 * hour;
116
+ var week = 7 * day;
117
+
118
+ // these are less definitive
119
+ var month = 30.4368499 * day;
120
+ var year = 365.242199 * day;
121
+
122
+ var daysInMonths = [31,28,31,30,31,30,31,30,31,30,31,30];
123
+ // array of consistent nice intervals. Longer intervals
124
+ // will depend on days in month, days in year, etc.
125
+ var niceFormatStrings = ['%M:%S.%#N', '%M:%S.%#N', '%M:%S.%#N', '%M:%S', '%M:%S', '%M:%S', '%M:%S', '%H:%M:%S', '%H:%M:%S', '%H:%M', '%H:%M', '%H:%M', '%H:%M', '%H:%M', '%H:%M', '%a %H:%M', '%a %H:%M', '%b %e %H:%M', '%b %e %H:%M', '%b %e %H:%M', '%b %e %H:%M', '%v', '%v', '%v', '%v', '%v', '%v', '%v'];
126
+ var niceIntervals = [0.1*second, 0.2*second, 0.5*second, second, 2*second, 5*second, 10*second, 15*second, 30*second, minute, 2*minute, 5*minute, 10*minute, 15*minute, 30*minute, hour, 2*hour, 4*hour, 6*hour, 8*hour, 12*hour, day, 2*day, 3*day, 4*day, 5*day, week, 2*week];
127
+
128
+ var niceMonthlyIntervals = [];
129
+
130
+ function bestDateInterval(min, max, titarget) {
131
+ // iterate through niceIntervals to find one closest to titarget
132
+ var badness = Number.MAX_VALUE;
133
+ var temp, bestTi, bestfmt;
134
+ for (var i=0, l=niceIntervals.length; i < l; i++) {
135
+ temp = Math.abs(titarget - niceIntervals[i]);
136
+ if (temp < badness) {
137
+ badness = temp;
138
+ bestTi = niceIntervals[i];
139
+ bestfmt = niceFormatStrings[i];
140
+ }
141
+ }
142
+
143
+ return [bestTi, bestfmt];
144
+ }
145
+
146
+ $.jqplot.DateAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer();
147
+ $.jqplot.DateAxisRenderer.prototype.constructor = $.jqplot.DateAxisRenderer;
148
+
149
+ $.jqplot.DateTickFormatter = function(format, val) {
150
+ if (!format) {
151
+ format = '%Y/%m/%d';
152
+ }
153
+ return $.jsDate.strftime(val, format);
154
+ };
155
+
156
+ $.jqplot.DateAxisRenderer.prototype.init = function(options){
157
+ // prop: tickRenderer
158
+ // A class of a rendering engine for creating the ticks labels displayed on the plot,
159
+ // See <$.jqplot.AxisTickRenderer>.
160
+ // this.tickRenderer = $.jqplot.AxisTickRenderer;
161
+ // this.labelRenderer = $.jqplot.AxisLabelRenderer;
162
+ this.tickOptions.formatter = $.jqplot.DateTickFormatter;
163
+ // prop: tickInset
164
+ // Controls the amount to inset the first and last ticks from
165
+ // the edges of the grid, in multiples of the tick interval.
166
+ // 0 is no inset, 0.5 is one half a tick interval, 1 is a full
167
+ // tick interval, etc.
168
+ this.tickInset = 0;
169
+ // prop: drawBaseline
170
+ // True to draw the axis baseline.
171
+ this.drawBaseline = true;
172
+ // prop: baselineWidth
173
+ // width of the baseline in pixels.
174
+ this.baselineWidth = null;
175
+ // prop: baselineColor
176
+ // CSS color spec for the baseline.
177
+ this.baselineColor = null;
178
+ this.daTickInterval = null;
179
+ this._daTickInterval = null;
180
+
181
+ $.extend(true, this, options);
182
+
183
+ var db = this._dataBounds,
184
+ stats,
185
+ sum,
186
+ s,
187
+ d,
188
+ pd,
189
+ sd,
190
+ intv;
191
+
192
+ // Go through all the series attached to this axis and find
193
+ // the min/max bounds for this axis.
194
+ for (var i=0; i<this._series.length; i++) {
195
+ stats = {intervals:[], frequencies:{}, sortedIntervals:[], min:null, max:null, mean:null};
196
+ sum = 0;
197
+ s = this._series[i];
198
+ d = s.data;
199
+ pd = s._plotData;
200
+ sd = s._stackData;
201
+ intv = 0;
202
+
203
+ for (var j=0; j<d.length; j++) {
204
+ if (this.name == 'xaxis' || this.name == 'x2axis') {
205
+ d[j][0] = new $.jsDate(d[j][0]).getTime();
206
+ pd[j][0] = new $.jsDate(d[j][0]).getTime();
207
+ sd[j][0] = new $.jsDate(d[j][0]).getTime();
208
+ if ((d[j][0] != null && d[j][0] < db.min) || db.min == null) {
209
+ db.min = d[j][0];
210
+ }
211
+ if ((d[j][0] != null && d[j][0] > db.max) || db.max == null) {
212
+ db.max = d[j][0];
213
+ }
214
+ if (j>0) {
215
+ intv = Math.abs(d[j][0] - d[j-1][0]);
216
+ stats.intervals.push(intv);
217
+ if (stats.frequencies.hasOwnProperty(intv)) {
218
+ stats.frequencies[intv] += 1;
219
+ }
220
+ else {
221
+ stats.frequencies[intv] = 1;
222
+ }
223
+ }
224
+ sum += intv;
225
+
226
+ }
227
+ else {
228
+ d[j][1] = new $.jsDate(d[j][1]).getTime();
229
+ pd[j][1] = new $.jsDate(d[j][1]).getTime();
230
+ sd[j][1] = new $.jsDate(d[j][1]).getTime();
231
+ if ((d[j][1] != null && d[j][1] < db.min) || db.min == null) {
232
+ db.min = d[j][1];
233
+ }
234
+ if ((d[j][1] != null && d[j][1] > db.max) || db.max == null) {
235
+ db.max = d[j][1];
236
+ }
237
+ if (j>0) {
238
+ intv = Math.abs(d[j][1] - d[j-1][1]);
239
+ stats.intervals.push(intv);
240
+ if (stats.frequencies.hasOwnProperty(intv)) {
241
+ stats.frequencies[intv] += 1;
242
+ }
243
+ else {
244
+ stats.frequencies[intv] = 1;
245
+ }
246
+ }
247
+ }
248
+ sum += intv;
249
+ }
250
+
251
+ if (s.renderer.bands) {
252
+ if (s.renderer.bands.hiData.length) {
253
+ var bd = s.renderer.bands.hiData;
254
+ for (var j=0, l=bd.length; j < l; j++) {
255
+ if (this.name === 'xaxis' || this.name === 'x2axis') {
256
+ bd[j][0] = new $.jsDate(bd[j][0]).getTime();
257
+ if ((bd[j][0] != null && bd[j][0] > db.max) || db.max == null) {
258
+ db.max = bd[j][0];
259
+ }
260
+ }
261
+ else {
262
+ bd[j][1] = new $.jsDate(bd[j][1]).getTime();
263
+ if ((bd[j][1] != null && bd[j][1] > db.max) || db.max == null) {
264
+ db.max = bd[j][1];
265
+ }
266
+ }
267
+ }
268
+ }
269
+ if (s.renderer.bands.lowData.length) {
270
+ var bd = s.renderer.bands.lowData;
271
+ for (var j=0, l=bd.length; j < l; j++) {
272
+ if (this.name === 'xaxis' || this.name === 'x2axis') {
273
+ bd[j][0] = new $.jsDate(bd[j][0]).getTime();
274
+ if ((bd[j][0] != null && bd[j][0] < db.min) || db.min == null) {
275
+ db.min = bd[j][0];
276
+ }
277
+ }
278
+ else {
279
+ bd[j][1] = new $.jsDate(bd[j][1]).getTime();
280
+ if ((bd[j][1] != null && bd[j][1] < db.min) || db.min == null) {
281
+ db.min = bd[j][1];
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+
288
+ var tempf = 0,
289
+ tempn=0;
290
+ for (var n in stats.frequencies) {
291
+ stats.sortedIntervals.push({interval:n, frequency:stats.frequencies[n]});
292
+ }
293
+ stats.sortedIntervals.sort(function(a, b){
294
+ return b.frequency - a.frequency;
295
+ });
296
+
297
+ stats.min = $.jqplot.arrayMin(stats.intervals);
298
+ stats.max = $.jqplot.arrayMax(stats.intervals);
299
+ stats.mean = sum/d.length;
300
+ this._intervalStats.push(stats);
301
+ stats = sum = s = d = pd = sd = null;
302
+ }
303
+ db = null;
304
+
305
+ };
306
+
307
+ // called with scope of an axis
308
+ $.jqplot.DateAxisRenderer.prototype.reset = function() {
309
+ this.min = this._options.min;
310
+ this.max = this._options.max;
311
+ this.tickInterval = this._options.tickInterval;
312
+ this.numberTicks = this._options.numberTicks;
313
+ this._autoFormatString = '';
314
+ if (this._overrideFormatString && this.tickOptions && this.tickOptions.formatString) {
315
+ this.tickOptions.formatString = '';
316
+ }
317
+ this.daTickInterval = this._daTickInterval;
318
+ // this._ticks = this.__ticks;
319
+ };
320
+
321
+ $.jqplot.DateAxisRenderer.prototype.createTicks = function(plot) {
322
+ // we're are operating on an axis here
323
+ var ticks = this._ticks;
324
+ var userTicks = this.ticks;
325
+ var name = this.name;
326
+ // databounds were set on axis initialization.
327
+ var db = this._dataBounds;
328
+ var iv = this._intervalStats;
329
+ var dim = (this.name.charAt(0) === 'x') ? this._plotDimensions.width : this._plotDimensions.height;
330
+ var interval;
331
+ var min, max;
332
+ var pos1, pos2;
333
+ var tt, i;
334
+ var threshold = 30;
335
+ var insetMult = 1;
336
+
337
+ var tickInterval = this.tickInterval;
338
+
339
+ // if we already have ticks, use them.
340
+ // ticks must be in order of increasing value.
341
+
342
+ min = ((this.min != null) ? new $.jsDate(this.min).getTime() : db.min);
343
+ max = ((this.max != null) ? new $.jsDate(this.max).getTime() : db.max);
344
+
345
+ // see if we're zooming. if we are, don't use the min and max we're given,
346
+ // but compute some nice ones. They will be reset later.
347
+
348
+ var cursor = plot.plugins.cursor;
349
+
350
+ if (cursor && cursor._zoom && cursor._zoom.zooming) {
351
+ this.min = null;
352
+ this.max = null;
353
+ }
354
+
355
+ var range = max - min;
356
+
357
+ if (this.tickOptions == null || !this.tickOptions.formatString) {
358
+ this._overrideFormatString = true;
359
+ }
360
+
361
+ if (userTicks.length) {
362
+ // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed
363
+ for (i=0; i<userTicks.length; i++){
364
+ var ut = userTicks[i];
365
+ var t = new this.tickRenderer(this.tickOptions);
366
+ if (ut.constructor == Array) {
367
+ t.value = new $.jsDate(ut[0]).getTime();
368
+ t.label = ut[1];
369
+ if (!this.showTicks) {
370
+ t.showLabel = false;
371
+ t.showMark = false;
372
+ }
373
+ else if (!this.showTickMarks) {
374
+ t.showMark = false;
375
+ }
376
+ t.setTick(t.value, this.name);
377
+ this._ticks.push(t);
378
+ }
379
+
380
+ else {
381
+ t.value = new $.jsDate(ut).getTime();
382
+ if (!this.showTicks) {
383
+ t.showLabel = false;
384
+ t.showMark = false;
385
+ }
386
+ else if (!this.showTickMarks) {
387
+ t.showMark = false;
388
+ }
389
+ t.setTick(t.value, this.name);
390
+ this._ticks.push(t);
391
+ }
392
+ }
393
+ this.numberTicks = userTicks.length;
394
+ this.min = this._ticks[0].value;
395
+ this.max = this._ticks[this.numberTicks-1].value;
396
+ this.daTickInterval = [(this.max - this.min) / (this.numberTicks - 1)/1000, 'seconds'];
397
+ }
398
+
399
+ ////////
400
+ // We don't have any ticks yet, let's make some!
401
+ ////////
402
+
403
+ // if user specified min and max are null, we set those to make best ticks.
404
+ else if (this.min == null && this.max == null) {
405
+ var opts = $.extend(true, {}, this.tickOptions, {name: this.name, value: null});
406
+ // want to find a nice interval
407
+ var nttarget,
408
+ titarget;
409
+
410
+ // if no tickInterval or numberTicks options specified, make a good guess.
411
+ if (!this.tickInterval && !this.numberTicks) {
412
+ var tdim = Math.max(dim, threshold+1);
413
+ // how many ticks to put on the axis?
414
+ // date labels tend to be long. If ticks not rotated,
415
+ // don't use too many and have a high spacing factor.
416
+ // If we are rotating ticks, use a lower factor.
417
+ var spacingFactor = 115;
418
+ if (this.tickRenderer === $.jqplot.CanvasAxisTickRenderer && this.tickOptions.angle) {
419
+ spacingFactor = 115 - 40 * Math.abs(Math.sin(this.tickOptions.angle/180*Math.PI));
420
+ }
421
+
422
+ nttarget = Math.ceil((tdim-threshold)/spacingFactor + 1);
423
+ titarget = (max - min) / (nttarget - 1);
424
+ }
425
+
426
+ // If tickInterval is specified, we'll try to honor it.
427
+ // Not gauranteed to get this interval, but we'll get as close as
428
+ // we can.
429
+ // tickInterval will be used before numberTicks, that is if
430
+ // both are specified, numberTicks will be ignored.
431
+ else if (this.tickInterval) {
432
+ titarget = this.tickInterval;
433
+ }
434
+
435
+ // if numberTicks specified, try to honor it.
436
+ // Not gauranteed, but will try to get close.
437
+ else if (this.numberTicks) {
438
+ nttarget = this.numberTicks;
439
+ titarget = (max - min) / (nttarget - 1);
440
+ }
441
+
442
+ // If we can use an interval of 2 weeks or less, pick best one
443
+ if (titarget <= 19*day) {
444
+ var ret = bestDateInterval(min, max, titarget);
445
+ var tempti = ret[0];
446
+ this._autoFormatString = ret[1];
447
+
448
+ min = Math.floor(min/tempti) * tempti;
449
+ min = new $.jsDate(min);
450
+ min = min.getTime() + min.getUtcOffset();
451
+
452
+ nttarget = Math.ceil((max - min) / tempti) + 1;
453
+ this.min = min;
454
+ this.max = min + (nttarget - 1) * tempti;
455
+
456
+ // if max is less than max, add an interval
457
+ if (this.max < max) {
458
+ this.max += tempti;
459
+ nttarget += 1;
460
+ }
461
+ this.tickInterval = tempti;
462
+ this.numberTicks = nttarget;
463
+
464
+ for (var i=0; i<nttarget; i++) {
465
+ opts.value = this.min + i * tempti;
466
+ t = new this.tickRenderer(opts);
467
+
468
+ if (this._overrideFormatString && this._autoFormatString != '') {
469
+ t.formatString = this._autoFormatString;
470
+ }
471
+ if (!this.showTicks) {
472
+ t.showLabel = false;
473
+ t.showMark = false;
474
+ }
475
+ else if (!this.showTickMarks) {
476
+ t.showMark = false;
477
+ }
478
+ this._ticks.push(t);
479
+ }
480
+
481
+ insetMult = this.tickInterval;
482
+ }
483
+
484
+ // should we use a monthly interval?
485
+ else if (titarget <= 9 * month) {
486
+
487
+ this._autoFormatString = '%v';
488
+
489
+ // how many months in an interval?
490
+ var intv = Math.round(titarget/month);
491
+ if (intv < 1) {
492
+ intv = 1;
493
+ }
494
+ else if (intv > 6) {
495
+ intv = 6;
496
+ }
497
+
498
+ // figure out the starting month and ending month.
499
+ var mstart = new $.jsDate(min).setDate(1).setHours(0,0,0,0);
500
+
501
+ // See if max ends exactly on a month
502
+ var tempmend = new $.jsDate(max);
503
+ var mend = new $.jsDate(max).setDate(1).setHours(0,0,0,0);
504
+
505
+ if (tempmend.getTime() !== mend.getTime()) {
506
+ mend = mend.add(1, 'month');
507
+ }
508
+
509
+ var nmonths = mend.diff(mstart, 'month');
510
+
511
+ nttarget = Math.ceil(nmonths/intv) + 1;
512
+
513
+ this.min = mstart.getTime();
514
+ this.max = mstart.clone().add((nttarget - 1) * intv, 'month').getTime();
515
+ this.numberTicks = nttarget;
516
+
517
+ for (var i=0; i<nttarget; i++) {
518
+ if (i === 0) {
519
+ opts.value = mstart.getTime();
520
+ }
521
+ else {
522
+ opts.value = mstart.add(intv, 'month').getTime();
523
+ }
524
+ t = new this.tickRenderer(opts);
525
+
526
+ if (this._overrideFormatString && this._autoFormatString != '') {
527
+ t.formatString = this._autoFormatString;
528
+ }
529
+ if (!this.showTicks) {
530
+ t.showLabel = false;
531
+ t.showMark = false;
532
+ }
533
+ else if (!this.showTickMarks) {
534
+ t.showMark = false;
535
+ }
536
+ this._ticks.push(t);
537
+ }
538
+
539
+ insetMult = intv * month;
540
+ }
541
+
542
+ // use yearly intervals
543
+ else {
544
+
545
+ this._autoFormatString = '%v';
546
+
547
+ // how many years in an interval?
548
+ var intv = Math.round(titarget/year);
549
+ if (intv < 1) {
550
+ intv = 1;
551
+ }
552
+
553
+ // figure out the starting and ending years.
554
+ var mstart = new $.jsDate(min).setMonth(0, 1).setHours(0,0,0,0);
555
+ var mend = new $.jsDate(max).add(1, 'year').setMonth(0, 1).setHours(0,0,0,0);
556
+
557
+ var nyears = mend.diff(mstart, 'year');
558
+
559
+ nttarget = Math.ceil(nyears/intv) + 1;
560
+
561
+ this.min = mstart.getTime();
562
+ this.max = mstart.clone().add((nttarget - 1) * intv, 'year').getTime();
563
+ this.numberTicks = nttarget;
564
+
565
+ for (var i=0; i<nttarget; i++) {
566
+ if (i === 0) {
567
+ opts.value = mstart.getTime();
568
+ }
569
+ else {
570
+ opts.value = mstart.add(intv, 'year').getTime();
571
+ }
572
+ t = new this.tickRenderer(opts);
573
+
574
+ if (this._overrideFormatString && this._autoFormatString != '') {
575
+ t.formatString = this._autoFormatString;
576
+ }
577
+ if (!this.showTicks) {
578
+ t.showLabel = false;
579
+ t.showMark = false;
580
+ }
581
+ else if (!this.showTickMarks) {
582
+ t.showMark = false;
583
+ }
584
+ this._ticks.push(t);
585
+ }
586
+
587
+ insetMult = intv * year;
588
+ }
589
+ }
590
+
591
+ ////////
592
+ // Some option(s) specified, work around that.
593
+ ////////
594
+
595
+ else {
596
+ if (name == 'xaxis' || name == 'x2axis') {
597
+ dim = this._plotDimensions.width;
598
+ }
599
+ else {
600
+ dim = this._plotDimensions.height;
601
+ }
602
+
603
+ // if min, max and number of ticks specified, user can't specify interval.
604
+ if (this.min != null && this.max != null && this.numberTicks != null) {
605
+ this.tickInterval = null;
606
+ }
607
+
608
+ // if user specified a tick interval, convert to usable.
609
+ if (this.tickInterval != null)
610
+ {
611
+ // if interval is a number or can be converted to one, use it.
612
+ // Assume it is in SECONDS!!!
613
+ if (Number(this.tickInterval)) {
614
+ this.daTickInterval = [Number(this.tickInterval), 'seconds'];
615
+ }
616
+ // else, parse out something we can build from.
617
+ else if (typeof this.tickInterval == "string") {
618
+ var parts = this.tickInterval.split(' ');
619
+ if (parts.length == 1) {
620
+ this.daTickInterval = [1, parts[0]];
621
+ }
622
+ else if (parts.length == 2) {
623
+ this.daTickInterval = [parts[0], parts[1]];
624
+ }
625
+ }
626
+ }
627
+
628
+ // if min and max are same, space them out a bit
629
+ if (min == max) {
630
+ var adj = 24*60*60*500; // 1/2 day
631
+ min -= adj;
632
+ max += adj;
633
+ }
634
+
635
+ range = max - min;
636
+
637
+ var optNumTicks = 2 + parseInt(Math.max(0, dim-100)/100, 10);
638
+
639
+
640
+ var rmin, rmax;
641
+
642
+ rmin = (this.min != null) ? new $.jsDate(this.min).getTime() : min - range/2*(this.padMin - 1);
643
+ rmax = (this.max != null) ? new $.jsDate(this.max).getTime() : max + range/2*(this.padMax - 1);
644
+ this.min = rmin;
645
+ this.max = rmax;
646
+ range = this.max - this.min;
647
+
648
+ if (this.numberTicks == null){
649
+ // if tickInterval is specified by user, we will ignore computed maximum.
650
+ // max will be equal or greater to fit even # of ticks.
651
+ if (this.daTickInterval != null) {
652
+ var nc = new $.jsDate(this.max).diff(this.min, this.daTickInterval[1], true);
653
+ this.numberTicks = Math.ceil(nc/this.daTickInterval[0]) +1;
654
+ // this.max = new $.jsDate(this.min).add(this.numberTicks-1, this.daTickInterval[1]).getTime();
655
+ this.max = new $.jsDate(this.min).add((this.numberTicks-1) * this.daTickInterval[0], this.daTickInterval[1]).getTime();
656
+ }
657
+ else if (dim > 200) {
658
+ this.numberTicks = parseInt(3+(dim-200)/100, 10);
659
+ }
660
+ else {
661
+ this.numberTicks = 2;
662
+ }
663
+ }
664
+
665
+ insetMult = range / (this.numberTicks-1)/1000;
666
+
667
+ if (this.daTickInterval == null) {
668
+ this.daTickInterval = [insetMult, 'seconds'];
669
+ }
670
+
671
+
672
+ for (var i=0; i<this.numberTicks; i++){
673
+ var min = new $.jsDate(this.min);
674
+ tt = min.add(i*this.daTickInterval[0], this.daTickInterval[1]).getTime();
675
+ var t = new this.tickRenderer(this.tickOptions);
676
+ // var t = new $.jqplot.AxisTickRenderer(this.tickOptions);
677
+ if (!this.showTicks) {
678
+ t.showLabel = false;
679
+ t.showMark = false;
680
+ }
681
+ else if (!this.showTickMarks) {
682
+ t.showMark = false;
683
+ }
684
+ t.setTick(tt, this.name);
685
+ this._ticks.push(t);
686
+ }
687
+ }
688
+
689
+ if (this.tickInset) {
690
+ this.min = this.min - this.tickInset * insetMult;
691
+ this.max = this.max + this.tickInset * insetMult;
692
+ }
693
+
694
+ if (this._daTickInterval == null) {
695
+ this._daTickInterval = this.daTickInterval;
696
+ }
697
+
698
+ ticks = null;
699
+ };
700
+
701
+ })(jQuery);
702
+