jqplot_rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +2 -0
- data/LICENSE +0 -0
- data/README.rdoc +1 -0
- data/files/dist/MIT-LICENSE.txt +21 -0
- data/files/dist/README.txt +77 -0
- data/files/dist/changes.txt +395 -0
- data/files/dist/copyright.txt +56 -0
- data/files/dist/docs/files/MIT-LICENSE-txt.html +39 -0
- data/files/dist/docs/files/changes-txt.html +39 -0
- data/files/dist/docs/files/gpl-2-0-txt.html +39 -0
- data/files/dist/docs/files/images/background.jpg +0 -0
- data/files/dist/docs/files/images/basicline.png +0 -0
- data/files/dist/docs/files/images/basiclogaxis.png +0 -0
- data/files/dist/docs/files/images/basiclogoptions.png +0 -0
- data/files/dist/docs/files/images/basicoptions.png +0 -0
- data/files/dist/docs/files/images/dualaxis.png +0 -0
- data/files/dist/docs/files/images/logo.jpg +0 -0
- data/files/dist/docs/files/images/navdocs.png +0 -0
- data/files/dist/docs/files/images/navdocsover.png +0 -0
- data/files/dist/docs/files/images/navdownload.png +0 -0
- data/files/dist/docs/files/images/navdownloadover.png +0 -0
- data/files/dist/docs/files/images/navexamples.png +0 -0
- data/files/dist/docs/files/images/navexamplesover.png +0 -0
- data/files/dist/docs/files/images/navhome.png +0 -0
- data/files/dist/docs/files/images/navhomeover.png +0 -0
- data/files/dist/docs/files/images/new.png +0 -0
- data/files/dist/docs/files/images/sample3.png +0 -0
- data/files/dist/docs/files/images/samplesm.png +0 -0
- data/files/dist/docs/files/jqPlotCssStyling-txt.html +39 -0
- data/files/dist/docs/files/jqPlotOptions-txt.html +292 -0
- data/files/dist/docs/files/jqplot-axisLabelRenderer-js.html +47 -0
- data/files/dist/docs/files/jqplot-axisTickRenderer-js.html +71 -0
- data/files/dist/docs/files/jqplot-canvasGridRenderer-js.html +39 -0
- data/files/dist/docs/files/jqplot-core-js.html +385 -0
- data/files/dist/docs/files/jqplot-divTitleRenderer-js.html +39 -0
- data/files/dist/docs/files/jqplot-lineRenderer-js.html +69 -0
- data/files/dist/docs/files/jqplot-linearAxisRenderer-js.html +61 -0
- data/files/dist/docs/files/jqplot-markerRenderer-js.html +65 -0
- data/files/dist/docs/files/jqplot-shadowRenderer-js.html +61 -0
- data/files/dist/docs/files/jqplot-shapeRenderer-js.html +65 -0
- data/files/dist/docs/files/jqplot-themeEngine-js.html +191 -0
- data/files/dist/docs/files/jqplot-toImage-js.html +39 -0
- data/files/dist/docs/files/optionsTutorial-txt.html +120 -0
- data/files/dist/docs/files/plugins/jqplot-BezierCurveRenderer-js.html +45 -0
- data/files/dist/docs/files/plugins/jqplot-barRenderer-js.html +69 -0
- data/files/dist/docs/files/plugins/jqplot-blockRenderer-js.html +53 -0
- data/files/dist/docs/files/plugins/jqplot-bubbleRenderer-js.html +71 -0
- data/files/dist/docs/files/plugins/jqplot-canvasAxisLabelRenderer-js.html +63 -0
- data/files/dist/docs/files/plugins/jqplot-canvasAxisTickRenderer-js.html +79 -0
- data/files/dist/docs/files/plugins/jqplot-canvasOverlay-js.html +113 -0
- data/files/dist/docs/files/plugins/jqplot-categoryAxisRenderer-js.html +46 -0
- data/files/dist/docs/files/plugins/jqplot-ciParser-js.html +39 -0
- data/files/dist/docs/files/plugins/jqplot-cursor-js.html +93 -0
- data/files/dist/docs/files/plugins/jqplot-dateAxisRenderer-js.html +101 -0
- data/files/dist/docs/files/plugins/jqplot-donutRenderer-js.html +98 -0
- data/files/dist/docs/files/plugins/jqplot-dragable-js.html +45 -0
- data/files/dist/docs/files/plugins/jqplot-enhancedLegendRenderer-js.html +49 -0
- data/files/dist/docs/files/plugins/jqplot-funnelRenderer-js.html +87 -0
- data/files/dist/docs/files/plugins/jqplot-highlighter-js.html +80 -0
- data/files/dist/docs/files/plugins/jqplot-logAxisRenderer-js.html +47 -0
- data/files/dist/docs/files/plugins/jqplot-mekkoAxisRenderer-js.html +49 -0
- data/files/dist/docs/files/plugins/jqplot-mekkoRenderer-js.html +62 -0
- data/files/dist/docs/files/plugins/jqplot-meterGaugeRenderer-js.html +103 -0
- data/files/dist/docs/files/plugins/jqplot-ohlcRenderer-js.html +65 -0
- data/files/dist/docs/files/plugins/jqplot-pieRenderer-js.html +93 -0
- data/files/dist/docs/files/plugins/jqplot-pointLabels-js.html +72 -0
- data/files/dist/docs/files/plugins/jqplot-pyramidAxisRenderer-js.html +49 -0
- data/files/dist/docs/files/plugins/jqplot-pyramidGridRenderer-js.html +39 -0
- data/files/dist/docs/files/plugins/jqplot-pyramidRenderer-js.html +53 -0
- data/files/dist/docs/files/plugins/jqplot-trendline-js.html +67 -0
- data/files/dist/docs/files/usage-txt.html +58 -0
- data/files/dist/docs/index/Classes.html +70 -0
- data/files/dist/docs/index/Files.html +34 -0
- data/files/dist/docs/index/Functions.html +66 -0
- data/files/dist/docs/index/General.html +42 -0
- data/files/dist/docs/index/General2.html +42 -0
- data/files/dist/docs/index/General3.html +42 -0
- data/files/dist/docs/index/General4.html +46 -0
- data/files/dist/docs/index/General5.html +46 -0
- data/files/dist/docs/index/General6.html +34 -0
- data/files/dist/docs/index/General7.html +58 -0
- data/files/dist/docs/index/Hooks.html +46 -0
- data/files/dist/docs/index/Properties.html +42 -0
- data/files/dist/docs/index/Properties2.html +42 -0
- data/files/dist/docs/index/Properties3.html +46 -0
- data/files/dist/docs/index/Properties4.html +50 -0
- data/files/dist/docs/index/Properties5.html +34 -0
- data/files/dist/docs/index/Properties6.html +58 -0
- data/files/dist/docs/index.html +1 -0
- data/files/dist/docs/javascript/main.js +836 -0
- data/files/dist/docs/javascript/searchdata.js +182 -0
- data/files/dist/docs/search/ClassesA.html +20 -0
- data/files/dist/docs/search/ClassesD.html +20 -0
- data/files/dist/docs/search/ClassesG.html +20 -0
- data/files/dist/docs/search/ClassesH.html +20 -0
- data/files/dist/docs/search/ClassesJ.html +20 -0
- data/files/dist/docs/search/ClassesL.html +20 -0
- data/files/dist/docs/search/ClassesS.html +20 -0
- data/files/dist/docs/search/ClassesSymbols.html +20 -0
- data/files/dist/docs/search/ClassesT.html +20 -0
- data/files/dist/docs/search/ClassesV.html +20 -0
- data/files/dist/docs/search/FilesJ.html +20 -0
- data/files/dist/docs/search/FunctionsC.html +20 -0
- data/files/dist/docs/search/FunctionsD.html +20 -0
- data/files/dist/docs/search/FunctionsG.html +20 -0
- data/files/dist/docs/search/FunctionsI.html +20 -0
- data/files/dist/docs/search/FunctionsM.html +20 -0
- data/files/dist/docs/search/FunctionsN.html +20 -0
- data/files/dist/docs/search/FunctionsR.html +20 -0
- data/files/dist/docs/search/FunctionsS.html +20 -0
- data/files/dist/docs/search/FunctionsZ.html +20 -0
- data/files/dist/docs/search/GeneralA.html +20 -0
- data/files/dist/docs/search/GeneralB.html +20 -0
- data/files/dist/docs/search/GeneralC.html +20 -0
- data/files/dist/docs/search/GeneralD.html +20 -0
- data/files/dist/docs/search/GeneralE.html +20 -0
- data/files/dist/docs/search/GeneralF.html +20 -0
- data/files/dist/docs/search/GeneralG.html +20 -0
- data/files/dist/docs/search/GeneralH.html +20 -0
- data/files/dist/docs/search/GeneralI.html +20 -0
- data/files/dist/docs/search/GeneralJ.html +20 -0
- data/files/dist/docs/search/GeneralL.html +20 -0
- data/files/dist/docs/search/GeneralM.html +20 -0
- data/files/dist/docs/search/GeneralN.html +20 -0
- data/files/dist/docs/search/GeneralO.html +20 -0
- data/files/dist/docs/search/GeneralP.html +20 -0
- data/files/dist/docs/search/GeneralR.html +20 -0
- data/files/dist/docs/search/GeneralS.html +20 -0
- data/files/dist/docs/search/GeneralSymbols.html +20 -0
- data/files/dist/docs/search/GeneralT.html +20 -0
- data/files/dist/docs/search/GeneralU.html +20 -0
- data/files/dist/docs/search/GeneralV.html +20 -0
- data/files/dist/docs/search/GeneralW.html +20 -0
- data/files/dist/docs/search/GeneralX.html +20 -0
- data/files/dist/docs/search/GeneralY.html +20 -0
- data/files/dist/docs/search/GeneralZ.html +20 -0
- data/files/dist/docs/search/HooksA.html +20 -0
- data/files/dist/docs/search/HooksE.html +20 -0
- data/files/dist/docs/search/HooksJ.html +20 -0
- data/files/dist/docs/search/HooksP.html +20 -0
- data/files/dist/docs/search/NoResults.html +15 -0
- data/files/dist/docs/search/PropertiesA.html +20 -0
- data/files/dist/docs/search/PropertiesB.html +20 -0
- data/files/dist/docs/search/PropertiesC.html +20 -0
- data/files/dist/docs/search/PropertiesD.html +20 -0
- data/files/dist/docs/search/PropertiesE.html +20 -0
- data/files/dist/docs/search/PropertiesF.html +20 -0
- data/files/dist/docs/search/PropertiesG.html +20 -0
- data/files/dist/docs/search/PropertiesH.html +20 -0
- data/files/dist/docs/search/PropertiesI.html +20 -0
- data/files/dist/docs/search/PropertiesL.html +20 -0
- data/files/dist/docs/search/PropertiesM.html +20 -0
- data/files/dist/docs/search/PropertiesN.html +20 -0
- data/files/dist/docs/search/PropertiesO.html +20 -0
- data/files/dist/docs/search/PropertiesP.html +20 -0
- data/files/dist/docs/search/PropertiesR.html +20 -0
- data/files/dist/docs/search/PropertiesS.html +20 -0
- data/files/dist/docs/search/PropertiesT.html +20 -0
- data/files/dist/docs/search/PropertiesU.html +20 -0
- data/files/dist/docs/search/PropertiesV.html +20 -0
- data/files/dist/docs/search/PropertiesW.html +20 -0
- data/files/dist/docs/search/PropertiesX.html +20 -0
- data/files/dist/docs/search/PropertiesY.html +20 -0
- data/files/dist/docs/search/PropertiesZ.html +20 -0
- data/files/dist/docs/styles/1.css +767 -0
- data/files/dist/docs/styles/2.css +174 -0
- data/files/dist/docs/styles/main.css +2 -0
- data/files/dist/examples/KCPsample4.csv +25 -0
- data/files/dist/examples/ajax-loader.gif +0 -0
- data/files/dist/examples/area.html +139 -0
- data/files/dist/examples/axisLabelTests.html +157 -0
- data/files/dist/examples/axisLabelsRotatedText.html +229 -0
- data/files/dist/examples/axisScalingForceTickAt.html +242 -0
- data/files/dist/examples/bandedLine.html +310 -0
- data/files/dist/examples/bar-charts.html +219 -0
- data/files/dist/examples/barLineAnimated.html +165 -0
- data/files/dist/examples/barTest.html +299 -0
- data/files/dist/examples/bezierCurve.html +125 -0
- data/files/dist/examples/blockPlot.html +197 -0
- data/files/dist/examples/bubble-plots.html +213 -0
- data/files/dist/examples/bubbleChart.html +264 -0
- data/files/dist/examples/candlestick-charts.html +209 -0
- data/files/dist/examples/candlestick.html +322 -0
- data/files/dist/examples/cursor-highlighter.html +137 -0
- data/files/dist/examples/customHighlighterCursorTrendline.html +104 -0
- data/files/dist/examples/dashboardWidget.html +212 -0
- data/files/dist/examples/dashedLines.html +227 -0
- data/files/dist/examples/data-renderers.html +144 -0
- data/files/dist/examples/date-axes.html +107 -0
- data/files/dist/examples/dateAxisLogAxisZooming.html +105 -0
- data/files/dist/examples/dateAxisRenderer.html +292 -0
- data/files/dist/examples/example.js +114 -0
- data/files/dist/examples/example.min.js +1 -0
- data/files/dist/examples/examples.css +135 -0
- data/files/dist/examples/examples.min.css +1 -0
- data/files/dist/examples/fillBetweenLines.html +134 -0
- data/files/dist/examples/hiddenPlotsInTabs.html +225 -0
- data/files/dist/examples/images/logo.jpg +0 -0
- data/files/dist/examples/index.html +100 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_454545_256x240.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_888888_256x240.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/jquery-ui.css +612 -0
- data/files/dist/examples/jquery-ui/css/ui-lightness/jquery-ui.min.css +10 -0
- data/files/dist/examples/jquery-ui/js/jquery-ui.min.js +473 -0
- data/files/dist/examples/jquery-ui/js/jquery.effects.blind.js +80 -0
- data/files/dist/examples/jquery-ui/js/jquery.effects.blind.min.js +14 -0
- data/files/dist/examples/jquery-ui/js/jquery.effects.core.js +890 -0
- data/files/dist/examples/jquery-ui/js/jquery.effects.core.min.js +32 -0
- data/files/dist/examples/jsondata.txt +1 -0
- data/files/dist/examples/kcp_area.html +250 -0
- data/files/dist/examples/kcp_cdf.html +351 -0
- data/files/dist/examples/kcp_engel.html +244 -0
- data/files/dist/examples/kcp_lorenz.html +510 -0
- data/files/dist/examples/kcp_pdf.html +387 -0
- data/files/dist/examples/kcp_pyramid.html +580 -0
- data/files/dist/examples/kcp_pyramid2.html +568 -0
- data/files/dist/examples/line-charts.html +193 -0
- data/files/dist/examples/mekkoCharts.html +269 -0
- data/files/dist/examples/meterGauge.html +179 -0
- data/files/dist/examples/nav.inc +40 -0
- data/files/dist/examples/pie-donut-charts.html +160 -0
- data/files/dist/examples/pieTest.html +187 -0
- data/files/dist/examples/pieTest2.js +80 -0
- data/files/dist/examples/pieTest4.html +258 -0
- data/files/dist/examples/point-labels.html +193 -0
- data/files/dist/examples/resizablePlot.html +196 -0
- data/files/dist/examples/rotated-tick-labels.html +216 -0
- data/files/dist/examples/rotatedTickLabelsZoom.html +118 -0
- data/files/dist/examples/smoothedLine.html +137 -0
- data/files/dist/examples/syntaxhighlighter/LGPL-LICENSE +165 -0
- data/files/dist/examples/syntaxhighlighter/MIT-LICENSE +20 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shAutoloader.js +17 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shAutoloader.min.js +1 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shBrushJScript.js +52 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shBrushJScript.min.js +1 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shBrushXml.js +69 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shBrushXml.min.js +1 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shCore.js +17 -0
- data/files/dist/examples/syntaxhighlighter/scripts/shCore.min.js +1 -0
- data/files/dist/examples/syntaxhighlighter/styles/shCore.css +226 -0
- data/files/dist/examples/syntaxhighlighter/styles/shCore.min.css +1 -0
- data/files/dist/examples/syntaxhighlighter/styles/shCoreDefault.css +328 -0
- data/files/dist/examples/syntaxhighlighter/styles/shCoreDefault.min.css +1 -0
- data/files/dist/examples/syntaxhighlighter/styles/shThemeDefault.css +117 -0
- data/files/dist/examples/syntaxhighlighter/styles/shThemeDefault.min.css +1 -0
- data/files/dist/examples/syntaxhighlighter/styles/shThemejqPlot.css +138 -0
- data/files/dist/examples/syntaxhighlighter/styles/shThemejqPlot.min.css +1 -0
- data/files/dist/examples/theming.html +519 -0
- data/files/dist/examples/topbanner.inc +9 -0
- data/files/dist/examples/waterfall.html +162 -0
- data/files/dist/examples/waterfall2.html +231 -0
- data/files/dist/examples/yahooData.js +1807 -0
- data/files/dist/examples/yahooData.min.js +1 -0
- data/files/dist/examples/zoom1.html +149 -0
- data/files/dist/examples/zoomOptions.html +176 -0
- data/files/dist/examples/zoomProxy.html +110 -0
- data/files/dist/examples/zooming.html +209 -0
- data/files/dist/excanvas.js +1438 -0
- data/files/dist/excanvas.min.js +57 -0
- data/files/dist/gpl-2.0.txt +280 -0
- data/files/dist/jqPlotCssStyling.txt +53 -0
- data/files/dist/jqPlotOptions.txt +276 -0
- data/files/dist/jquery.jqplot.css +259 -0
- data/files/dist/jquery.jqplot.js +10901 -0
- data/files/dist/jquery.jqplot.min.css +1 -0
- data/files/dist/jquery.js +9046 -0
- data/files/dist/jquery.min.js +4 -0
- data/files/dist/optionsTutorial.txt +240 -0
- data/files/dist/plugins/jqplot.BezierCurveRenderer.js +312 -0
- data/files/dist/plugins/jqplot.BezierCurveRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.barRenderer.js +747 -0
- data/files/dist/plugins/jqplot.barRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.blockRenderer.js +234 -0
- data/files/dist/plugins/jqplot.blockRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.bubbleRenderer.js +754 -0
- data/files/dist/plugins/jqplot.bubbleRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.canvasAxisLabelRenderer.js +202 -0
- data/files/dist/plugins/jqplot.canvasAxisLabelRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.canvasAxisTickRenderer.js +242 -0
- data/files/dist/plugins/jqplot.canvasAxisTickRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.canvasOverlay.js +864 -0
- data/files/dist/plugins/jqplot.canvasOverlay.min.js +57 -0
- data/files/dist/plugins/jqplot.canvasTextRenderer.js +448 -0
- data/files/dist/plugins/jqplot.canvasTextRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.categoryAxisRenderer.js +636 -0
- data/files/dist/plugins/jqplot.categoryAxisRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.ciParser.js +115 -0
- data/files/dist/plugins/jqplot.ciParser.min.js +57 -0
- data/files/dist/plugins/jqplot.cursor.js +1093 -0
- data/files/dist/plugins/jqplot.cursor.min.js +57 -0
- data/files/dist/plugins/jqplot.dateAxisRenderer.js +702 -0
- data/files/dist/plugins/jqplot.dateAxisRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.donutRenderer.js +800 -0
- data/files/dist/plugins/jqplot.donutRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.dragable.js +224 -0
- data/files/dist/plugins/jqplot.dragable.min.js +57 -0
- data/files/dist/plugins/jqplot.enhancedLegendRenderer.js +241 -0
- data/files/dist/plugins/jqplot.enhancedLegendRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.funnelRenderer.js +938 -0
- data/files/dist/plugins/jqplot.funnelRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.highlighter.js +454 -0
- data/files/dist/plugins/jqplot.highlighter.min.js +57 -0
- data/files/dist/plugins/jqplot.json2.js +475 -0
- data/files/dist/plugins/jqplot.json2.min.js +57 -0
- data/files/dist/plugins/jqplot.logAxisRenderer.js +528 -0
- data/files/dist/plugins/jqplot.logAxisRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.mekkoAxisRenderer.js +610 -0
- data/files/dist/plugins/jqplot.mekkoAxisRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.mekkoRenderer.js +436 -0
- data/files/dist/plugins/jqplot.mekkoRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.meterGaugeRenderer.js +1029 -0
- data/files/dist/plugins/jqplot.meterGaugeRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.ohlcRenderer.js +372 -0
- data/files/dist/plugins/jqplot.ohlcRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.pieRenderer.js +899 -0
- data/files/dist/plugins/jqplot.pieRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.pointLabels.js +362 -0
- data/files/dist/plugins/jqplot.pointLabels.min.js +57 -0
- data/files/dist/plugins/jqplot.pyramidAxisRenderer.js +730 -0
- data/files/dist/plugins/jqplot.pyramidAxisRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.pyramidGridRenderer.js +423 -0
- data/files/dist/plugins/jqplot.pyramidGridRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.pyramidRenderer.js +490 -0
- data/files/dist/plugins/jqplot.pyramidRenderer.min.js +57 -0
- data/files/dist/plugins/jqplot.trendline.js +222 -0
- data/files/dist/plugins/jqplot.trendline.min.js +57 -0
- data/files/dist/usage.txt +126 -0
- data/files/javascripts/excanvas.min.js +57 -0
- data/files/javascripts/jquery.jqplot.min.js +57 -0
- data/files/javascripts/plugins/jqplot.BezierCurveRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.barRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.blockRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.bubbleRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.canvasAxisLabelRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.canvasAxisTickRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.canvasOverlay.min.js +57 -0
- data/files/javascripts/plugins/jqplot.canvasTextRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.categoryAxisRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.ciParser.min.js +57 -0
- data/files/javascripts/plugins/jqplot.cursor.min.js +57 -0
- data/files/javascripts/plugins/jqplot.dateAxisRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.donutRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.dragable.min.js +57 -0
- data/files/javascripts/plugins/jqplot.enhancedLegendRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.funnelRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.highlighter.min.js +57 -0
- data/files/javascripts/plugins/jqplot.json2.min.js +57 -0
- data/files/javascripts/plugins/jqplot.logAxisRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.mekkoAxisRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.mekkoRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.meterGaugeRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.ohlcRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.pieRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.pointLabels.min.js +57 -0
- data/files/javascripts/plugins/jqplot.pyramidAxisRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.pyramidGridRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.pyramidRenderer.min.js +57 -0
- data/files/javascripts/plugins/jqplot.trendline.min.js +57 -0
- data/files/stylesheets/jqplot_rails_overrides.css +3 -0
- data/files/stylesheets/jquery.jqplot.min.css +1 -0
- data/lib/jqplot_rails/jqplot_action_view.rb +106 -0
- data/lib/jqplot_rails/railtie.rb +29 -0
- data/lib/jqplot_rails/tasks.rb +58 -0
- data/lib/jqplot_rails/version.rb +17 -0
- data/lib/jqplot_rails.rb +5 -0
- metadata +473 -0
@@ -0,0 +1,490 @@
|
|
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
|
+
// Need to ensure pyramid axis and grid renderers are loaded.
|
33
|
+
// You should load these with script tags in the html head, that is more efficient
|
34
|
+
// as the browser will cache the request.
|
35
|
+
// Note, have to block with synchronous request in order to execute bar renderer code.
|
36
|
+
if ($.jqplot.PyramidAxisRenderer === undefined) {
|
37
|
+
$.ajax({
|
38
|
+
url: $.jqplot.pluginLocation + 'jqplot.pyramidAxisRenderer.js',
|
39
|
+
dataType: "script",
|
40
|
+
async: false
|
41
|
+
});
|
42
|
+
}
|
43
|
+
|
44
|
+
if ($.jqplot.PyramidGridRenderer === undefined) {
|
45
|
+
$.ajax({
|
46
|
+
url: $.jqplot.pluginLocation + 'jqplot.pyramidGridRenderer.js',
|
47
|
+
dataType: "script",
|
48
|
+
async: false
|
49
|
+
});
|
50
|
+
}
|
51
|
+
|
52
|
+
$.jqplot.PyramidRenderer = function(){
|
53
|
+
$.jqplot.LineRenderer.call(this);
|
54
|
+
};
|
55
|
+
|
56
|
+
$.jqplot.PyramidRenderer.prototype = new $.jqplot.LineRenderer();
|
57
|
+
$.jqplot.PyramidRenderer.prototype.constructor = $.jqplot.PyramidRenderer;
|
58
|
+
|
59
|
+
// called with scope of a series
|
60
|
+
$.jqplot.PyramidRenderer.prototype.init = function(options, plot) {
|
61
|
+
options = options || {};
|
62
|
+
this._type = 'pyramid';
|
63
|
+
// Group: Properties
|
64
|
+
//
|
65
|
+
// prop: barPadding
|
66
|
+
this.barPadding = 10;
|
67
|
+
this.barWidth = null;
|
68
|
+
// prop: fill
|
69
|
+
// True to fill the bars.
|
70
|
+
this.fill = true;
|
71
|
+
// prop: highlightMouseOver
|
72
|
+
// True to highlight slice when moused over.
|
73
|
+
// This must be false to enable highlightMouseDown to highlight when clicking on a slice.
|
74
|
+
this.highlightMouseOver = true;
|
75
|
+
// prop: highlightMouseDown
|
76
|
+
// True to highlight when a mouse button is pressed over a slice.
|
77
|
+
// This will be disabled if highlightMouseOver is true.
|
78
|
+
this.highlightMouseDown = false;
|
79
|
+
// prop: highlightColors
|
80
|
+
// an array of colors to use when highlighting a slice.
|
81
|
+
this.highlightColors = [];
|
82
|
+
// prop: offsetBars
|
83
|
+
// False will center bars on their y value.
|
84
|
+
// True will push bars up by 1/2 bar width to fill between their y values.
|
85
|
+
// If true, there needs to be 1 more tick than there are bars.
|
86
|
+
this.offsetBars = false;
|
87
|
+
|
88
|
+
// if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver
|
89
|
+
if (options.highlightMouseDown && options.highlightMouseOver == null) {
|
90
|
+
options.highlightMouseOver = false;
|
91
|
+
}
|
92
|
+
|
93
|
+
this.side = 'right';
|
94
|
+
|
95
|
+
$.extend(true, this, options);
|
96
|
+
|
97
|
+
// if (this.fill === false) {
|
98
|
+
// this.shadow = false;
|
99
|
+
// }
|
100
|
+
|
101
|
+
this.renderer.options = options;
|
102
|
+
// index of the currenty highlighted point, if any
|
103
|
+
this._highlightedPoint = null;
|
104
|
+
// Array of actual data colors used for each data point.
|
105
|
+
this._dataColors = [];
|
106
|
+
this._barPoints = [];
|
107
|
+
this.fillAxis = 'y';
|
108
|
+
this._primaryAxis = '_yaxis';
|
109
|
+
this._xnudge = 0;
|
110
|
+
|
111
|
+
// set the shape renderer options
|
112
|
+
var opts = {lineJoin:'miter', lineCap:'butt', fill:this.fill, fillRect:this.fill, isarc:false, strokeStyle:this.color, fillStyle:this.color, closePath:this.fill, lineWidth: this.lineWidth};
|
113
|
+
this.renderer.shapeRenderer.init(opts);
|
114
|
+
// set the shadow renderer options
|
115
|
+
var shadow_offset = options.shadowOffset;
|
116
|
+
// set the shadow renderer options
|
117
|
+
if (shadow_offset == null) {
|
118
|
+
// scale the shadowOffset to the width of the line.
|
119
|
+
if (this.lineWidth > 2.5) {
|
120
|
+
shadow_offset = 1.25 * (1 + (Math.atan((this.lineWidth/2.5))/0.785398163 - 1)*0.6);
|
121
|
+
// var shadow_offset = this.shadowOffset;
|
122
|
+
}
|
123
|
+
// for skinny lines, don't make such a big shadow.
|
124
|
+
else {
|
125
|
+
shadow_offset = 1.25 * Math.atan((this.lineWidth/2.5))/0.785398163;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
var sopts = {lineJoin:'miter', lineCap:'butt', fill:this.fill, fillRect:this.fill, isarc:false, angle:this.shadowAngle, offset:shadow_offset, alpha:this.shadowAlpha, depth:this.shadowDepth, closePath:this.fill, lineWidth: this.lineWidth};
|
129
|
+
this.renderer.shadowRenderer.init(sopts);
|
130
|
+
|
131
|
+
plot.postDrawHooks.addOnce(postPlotDraw);
|
132
|
+
plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove);
|
133
|
+
|
134
|
+
// if this is the left side of pyramid, set y values to negative.
|
135
|
+
if (this.side === 'left') {
|
136
|
+
for (var i=0, l=this.data.length; i<l; i++) {
|
137
|
+
this.data[i][1] = -Math.abs(this.data[i][1]);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
};
|
141
|
+
|
142
|
+
// setGridData
|
143
|
+
// converts the user data values to grid coordinates and stores them
|
144
|
+
// in the gridData array.
|
145
|
+
// Called with scope of a series.
|
146
|
+
$.jqplot.PyramidRenderer.prototype.setGridData = function(plot) {
|
147
|
+
// recalculate the grid data
|
148
|
+
var xp = this._xaxis.series_u2p;
|
149
|
+
var yp = this._yaxis.series_u2p;
|
150
|
+
var data = this._plotData;
|
151
|
+
var pdata = this._prevPlotData;
|
152
|
+
this.gridData = [];
|
153
|
+
this._prevGridData = [];
|
154
|
+
var l = data.length;
|
155
|
+
var adjust = false;
|
156
|
+
var i;
|
157
|
+
|
158
|
+
// if any data values are < 0, consider this a negative series
|
159
|
+
for (i = 0; i < l; i++) {
|
160
|
+
if (data[i][1] < 0) {
|
161
|
+
this.side = 'left';
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
if (this._yaxis.name === 'yMidAxis' && this.side === 'right') {
|
166
|
+
this._xnudge = this._xaxis.max/2000.0;
|
167
|
+
adjust = true;
|
168
|
+
}
|
169
|
+
|
170
|
+
for (i = 0; i < l; i++) {
|
171
|
+
// if not a line series or if no nulls in data, push the converted point onto the array.
|
172
|
+
if (data[i][0] != null && data[i][1] != null) {
|
173
|
+
this.gridData.push([xp(data[i][1]), yp(data[i][0])]);
|
174
|
+
}
|
175
|
+
// else if there is a null, preserve it.
|
176
|
+
else if (data[i][0] == null) {
|
177
|
+
this.gridData.push([xp(data[i][1]), null]);
|
178
|
+
}
|
179
|
+
else if (data[i][1] == null) {
|
180
|
+
this.gridData.push(null, [yp(data[i][0])]);
|
181
|
+
}
|
182
|
+
// finally, adjust x grid data if have to
|
183
|
+
if (data[i][1] === 0 && adjust) {
|
184
|
+
this.gridData[i][0] = xp(this._xnudge);
|
185
|
+
}
|
186
|
+
}
|
187
|
+
};
|
188
|
+
|
189
|
+
// makeGridData
|
190
|
+
// converts any arbitrary data values to grid coordinates and
|
191
|
+
// returns them. This method exists so that plugins can use a series'
|
192
|
+
// linerenderer to generate grid data points without overwriting the
|
193
|
+
// grid data associated with that series.
|
194
|
+
// Called with scope of a series.
|
195
|
+
$.jqplot.PyramidRenderer.prototype.makeGridData = function(data, plot) {
|
196
|
+
// recalculate the grid data
|
197
|
+
var xp = this._xaxis.series_u2p;
|
198
|
+
var yp = this._yaxis.series_u2p;
|
199
|
+
var gd = [];
|
200
|
+
var l = data.length;
|
201
|
+
var adjust = false;
|
202
|
+
var i;
|
203
|
+
|
204
|
+
// if any data values are < 0, consider this a negative series
|
205
|
+
for (i = 0; i < l; i++) {
|
206
|
+
if (data[i][1] < 0) {
|
207
|
+
this.side = 'left';
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
if (this._yaxis.name === 'yMidAxis' && this.side === 'right') {
|
212
|
+
this._xnudge = this._xaxis.max/2000.0;
|
213
|
+
adjust = true;
|
214
|
+
}
|
215
|
+
|
216
|
+
for (i = 0; i < l; i++) {
|
217
|
+
// if not a line series or if no nulls in data, push the converted point onto the array.
|
218
|
+
if (data[i][0] != null && data[i][1] != null) {
|
219
|
+
gd.push([xp(data[i][1]), yp(data[i][0])]);
|
220
|
+
}
|
221
|
+
// else if there is a null, preserve it.
|
222
|
+
else if (data[i][0] == null) {
|
223
|
+
gd.push([xp(data[i][1]), null]);
|
224
|
+
}
|
225
|
+
else if (data[i][1] == null) {
|
226
|
+
gd.push([null, yp(data[i][0])]);
|
227
|
+
}
|
228
|
+
// finally, adjust x grid data if have to
|
229
|
+
if (data[i][1] === 0 && adjust) {
|
230
|
+
gd[i][0] = xp(this._xnudge);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
return gd;
|
235
|
+
};
|
236
|
+
|
237
|
+
$.jqplot.PyramidRenderer.prototype.setBarWidth = function() {
|
238
|
+
// need to know how many data values we have on the approprate axis and figure it out.
|
239
|
+
var i;
|
240
|
+
var nvals = 0;
|
241
|
+
var nseries = 0;
|
242
|
+
var paxis = this[this._primaryAxis];
|
243
|
+
var s, series, pos;
|
244
|
+
nvals = paxis.max - paxis.min;
|
245
|
+
var nticks = paxis.numberTicks;
|
246
|
+
var nbins = (nticks-1)/2;
|
247
|
+
// so, now we have total number of axis values.
|
248
|
+
var temp = (this.barPadding === 0) ? 1.0 : 0;
|
249
|
+
if (paxis.name == 'xaxis' || paxis.name == 'x2axis') {
|
250
|
+
this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals - this.barPadding + temp;
|
251
|
+
}
|
252
|
+
else {
|
253
|
+
if (this.fill) {
|
254
|
+
this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals - this.barPadding + temp;
|
255
|
+
}
|
256
|
+
else {
|
257
|
+
this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
};
|
261
|
+
|
262
|
+
$.jqplot.PyramidRenderer.prototype.draw = function(ctx, gridData, options) {
|
263
|
+
var i;
|
264
|
+
// Ughhh, have to make a copy of options b/c it may be modified later.
|
265
|
+
var opts = $.extend({}, options);
|
266
|
+
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
|
267
|
+
var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
|
268
|
+
var fill = (opts.fill != undefined) ? opts.fill : this.fill;
|
269
|
+
var xp = this._xaxis.series_u2p;
|
270
|
+
var yp = this._yaxis.series_u2p;
|
271
|
+
var pointx, pointy;
|
272
|
+
// clear out data colors.
|
273
|
+
this._dataColors = [];
|
274
|
+
this._barPoints = [];
|
275
|
+
|
276
|
+
if (this.renderer.options.barWidth == null) {
|
277
|
+
this.renderer.setBarWidth.call(this);
|
278
|
+
}
|
279
|
+
|
280
|
+
// var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
|
281
|
+
// var nvals = temp[0];
|
282
|
+
// var nseries = temp[1];
|
283
|
+
// var pos = temp[2];
|
284
|
+
var points = [],
|
285
|
+
w,
|
286
|
+
h;
|
287
|
+
|
288
|
+
// this._barNudge = 0;
|
289
|
+
|
290
|
+
if (showLine) {
|
291
|
+
var negativeColors = new $.jqplot.ColorGenerator(this.negativeSeriesColors);
|
292
|
+
var positiveColors = new $.jqplot.ColorGenerator(this.seriesColors);
|
293
|
+
var negativeColor = negativeColors.get(this.index);
|
294
|
+
if (! this.useNegativeColors) {
|
295
|
+
negativeColor = opts.fillStyle;
|
296
|
+
}
|
297
|
+
var positiveColor = opts.fillStyle;
|
298
|
+
var base;
|
299
|
+
var xstart = this._xaxis.series_u2p(this._xnudge);
|
300
|
+
var ystart = this._yaxis.series_u2p(this._yaxis.min);
|
301
|
+
var yend = this._yaxis.series_u2p(this._yaxis.max);
|
302
|
+
var bw = this.barWidth;
|
303
|
+
var bw2 = bw/2.0;
|
304
|
+
var points = [];
|
305
|
+
var yadj = this.offsetBars ? bw2 : 0;
|
306
|
+
|
307
|
+
for (var i=0, l=gridData.length; i<l; i++) {
|
308
|
+
if (this.data[i][0] == null) {
|
309
|
+
continue;
|
310
|
+
}
|
311
|
+
base = gridData[i][1];
|
312
|
+
// not stacked and first series in stack
|
313
|
+
|
314
|
+
if (this._plotData[i][1] < 0) {
|
315
|
+
if (this.varyBarColor && !this._stack) {
|
316
|
+
if (this.useNegativeColors) {
|
317
|
+
opts.fillStyle = negativeColors.next();
|
318
|
+
}
|
319
|
+
else {
|
320
|
+
opts.fillStyle = positiveColors.next();
|
321
|
+
}
|
322
|
+
}
|
323
|
+
}
|
324
|
+
else {
|
325
|
+
if (this.varyBarColor && !this._stack) {
|
326
|
+
opts.fillStyle = positiveColors.next();
|
327
|
+
}
|
328
|
+
else {
|
329
|
+
opts.fillStyle = positiveColor;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
|
333
|
+
if (this.fill) {
|
334
|
+
|
335
|
+
if (this._plotData[i][1] >= 0) {
|
336
|
+
// xstart = this._xaxis.series_u2p(this._xnudge);
|
337
|
+
w = gridData[i][0] - xstart;
|
338
|
+
h = this.barWidth;
|
339
|
+
points = [xstart, base - bw2 - yadj, w, h];
|
340
|
+
}
|
341
|
+
else {
|
342
|
+
// xstart = this._xaxis.series_u2p(0);
|
343
|
+
w = xstart - gridData[i][0];
|
344
|
+
h = this.barWidth;
|
345
|
+
points = [gridData[i][0], base - bw2 - yadj, w, h];
|
346
|
+
}
|
347
|
+
|
348
|
+
this._barPoints.push([[points[0], points[1] + h], [points[0], points[1]], [points[0] + w, points[1]], [points[0] + w, points[1] + h]]);
|
349
|
+
|
350
|
+
if (shadow) {
|
351
|
+
this.renderer.shadowRenderer.draw(ctx, points);
|
352
|
+
}
|
353
|
+
var clr = opts.fillStyle || this.color;
|
354
|
+
this._dataColors.push(clr);
|
355
|
+
this.renderer.shapeRenderer.draw(ctx, points, opts);
|
356
|
+
}
|
357
|
+
|
358
|
+
else {
|
359
|
+
if (i === 0) {
|
360
|
+
points =[[xstart, ystart], [gridData[i][0], ystart], [gridData[i][0], gridData[i][1] - bw2 - yadj]];
|
361
|
+
}
|
362
|
+
|
363
|
+
else if (i < l-1) {
|
364
|
+
points = points.concat([[gridData[i-1][0], gridData[i-1][1] - bw2 - yadj], [gridData[i][0], gridData[i][1] + bw2 - yadj], [gridData[i][0], gridData[i][1] - bw2 - yadj]]);
|
365
|
+
}
|
366
|
+
|
367
|
+
// finally, draw the line
|
368
|
+
else {
|
369
|
+
points = points.concat([[gridData[i-1][0], gridData[i-1][1] - bw2 - yadj], [gridData[i][0], gridData[i][1] + bw2 - yadj], [gridData[i][0], yend], [xstart, yend]]);
|
370
|
+
|
371
|
+
if (shadow) {
|
372
|
+
this.renderer.shadowRenderer.draw(ctx, points);
|
373
|
+
}
|
374
|
+
var clr = opts.fillStyle || this.color;
|
375
|
+
this._dataColors.push(clr);
|
376
|
+
this.renderer.shapeRenderer.draw(ctx, points, opts);
|
377
|
+
}
|
378
|
+
}
|
379
|
+
}
|
380
|
+
}
|
381
|
+
|
382
|
+
if (this.highlightColors.length == 0) {
|
383
|
+
this.highlightColors = $.jqplot.computeHighlightColors(this._dataColors);
|
384
|
+
}
|
385
|
+
|
386
|
+
else if (typeof(this.highlightColors) == 'string') {
|
387
|
+
this.highlightColors = [];
|
388
|
+
for (var i=0; i<this._dataColors.length; i++) {
|
389
|
+
this.highlightColors.push(this.highlightColors);
|
390
|
+
}
|
391
|
+
}
|
392
|
+
|
393
|
+
};
|
394
|
+
|
395
|
+
|
396
|
+
// setup default renderers for axes and legend so user doesn't have to
|
397
|
+
// called with scope of plot
|
398
|
+
function preInit(target, data, options) {
|
399
|
+
options = options || {};
|
400
|
+
options.axesDefaults = options.axesDefaults || {};
|
401
|
+
options.grid = options.grid || {};
|
402
|
+
options.legend = options.legend || {};
|
403
|
+
options.seriesDefaults = options.seriesDefaults || {};
|
404
|
+
// only set these if there is a pie series
|
405
|
+
var setopts = false;
|
406
|
+
if (options.seriesDefaults.renderer === $.jqplot.PyramidRenderer) {
|
407
|
+
setopts = true;
|
408
|
+
}
|
409
|
+
else if (options.series) {
|
410
|
+
for (var i=0; i < options.series.length; i++) {
|
411
|
+
if (options.series[i].renderer === $.jqplot.PyramidRenderer) {
|
412
|
+
setopts = true;
|
413
|
+
}
|
414
|
+
}
|
415
|
+
}
|
416
|
+
|
417
|
+
if (setopts) {
|
418
|
+
options.axesDefaults.renderer = $.jqplot.PyramidAxisRenderer;
|
419
|
+
options.grid.renderer = $.jqplot.PyramidGridRenderer;
|
420
|
+
options.seriesDefaults.pointLabels = {show: false};
|
421
|
+
}
|
422
|
+
}
|
423
|
+
|
424
|
+
// called within context of plot
|
425
|
+
// create a canvas which we can draw on.
|
426
|
+
// insert it before the eventCanvas, so eventCanvas will still capture events.
|
427
|
+
function postPlotDraw() {
|
428
|
+
// Memory Leaks patch
|
429
|
+
if (this.plugins.pyramidRenderer && this.plugins.pyramidRenderer.highlightCanvas) {
|
430
|
+
|
431
|
+
this.plugins.pyramidRenderer.highlightCanvas.resetCanvas();
|
432
|
+
this.plugins.pyramidRenderer.highlightCanvas = null;
|
433
|
+
}
|
434
|
+
|
435
|
+
this.plugins.pyramidRenderer = {highlightedSeriesIndex:null};
|
436
|
+
this.plugins.pyramidRenderer.highlightCanvas = new $.jqplot.GenericCanvas();
|
437
|
+
|
438
|
+
this.eventCanvas._elem.before(this.plugins.pyramidRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-pyramidRenderer-highlight-canvas', this._plotDimensions, this));
|
439
|
+
this.plugins.pyramidRenderer.highlightCanvas.setContext();
|
440
|
+
this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); });
|
441
|
+
}
|
442
|
+
|
443
|
+
function highlight (plot, sidx, pidx, points) {
|
444
|
+
var s = plot.series[sidx];
|
445
|
+
var canvas = plot.plugins.pyramidRenderer.highlightCanvas;
|
446
|
+
canvas._ctx.clearRect(0,0,canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
447
|
+
s._highlightedPoint = pidx;
|
448
|
+
plot.plugins.pyramidRenderer.highlightedSeriesIndex = sidx;
|
449
|
+
var opts = {fillStyle: s.highlightColors[pidx], fillRect: false};
|
450
|
+
s.renderer.shapeRenderer.draw(canvas._ctx, points, opts);
|
451
|
+
canvas = null;
|
452
|
+
}
|
453
|
+
|
454
|
+
function unhighlight (plot) {
|
455
|
+
var canvas = plot.plugins.pyramidRenderer.highlightCanvas;
|
456
|
+
canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
457
|
+
for (var i=0; i<plot.series.length; i++) {
|
458
|
+
plot.series[i]._highlightedPoint = null;
|
459
|
+
}
|
460
|
+
plot.plugins.pyramidRenderer.highlightedSeriesIndex = null;
|
461
|
+
plot.target.trigger('jqplotDataUnhighlight');
|
462
|
+
canvas = null;
|
463
|
+
}
|
464
|
+
|
465
|
+
|
466
|
+
function handleMove(ev, gridpos, datapos, neighbor, plot) {
|
467
|
+
if (neighbor) {
|
468
|
+
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
|
469
|
+
var evt1 = jQuery.Event('jqplotDataMouseOver');
|
470
|
+
evt1.pageX = ev.pageX;
|
471
|
+
evt1.pageY = ev.pageY;
|
472
|
+
plot.target.trigger(evt1, ins);
|
473
|
+
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.pyramidRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
|
474
|
+
var evt = jQuery.Event('jqplotDataHighlight');
|
475
|
+
evt.pageX = ev.pageX;
|
476
|
+
evt.pageY = ev.pageY;
|
477
|
+
plot.target.trigger(evt, ins);
|
478
|
+
highlight (plot, neighbor.seriesIndex, neighbor.pointIndex, neighbor.points);
|
479
|
+
}
|
480
|
+
}
|
481
|
+
else if (neighbor == null) {
|
482
|
+
unhighlight (plot);
|
483
|
+
}
|
484
|
+
}
|
485
|
+
|
486
|
+
// Have to add hook here, becuase it needs called before series is inited.
|
487
|
+
$.jqplot.preInitHooks.push(preInit);
|
488
|
+
|
489
|
+
|
490
|
+
})(jQuery);
|
@@ -0,0 +1,57 @@
|
|
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
|
+
* included jsDate library by Chris Leonello:
|
30
|
+
*
|
31
|
+
* Copyright (c) 2010-2011 Chris Leonello
|
32
|
+
*
|
33
|
+
* jsDate is currently available for use in all personal or commercial projects
|
34
|
+
* under both the MIT and GPL version 2.0 licenses. This means that you can
|
35
|
+
* choose the license that best suits your project and use it accordingly.
|
36
|
+
*
|
37
|
+
* jsDate borrows many concepts and ideas from the Date Instance
|
38
|
+
* Methods by Ken Snyder along with some parts of Ken's actual code.
|
39
|
+
*
|
40
|
+
* Ken's origianl Date Instance Methods and copyright notice:
|
41
|
+
*
|
42
|
+
* Ken Snyder (ken d snyder at gmail dot com)
|
43
|
+
* 2008-09-10
|
44
|
+
* version 2.0.2 (http://kendsnyder.com/sandbox/date/)
|
45
|
+
* Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
|
46
|
+
*
|
47
|
+
* jqplotToImage function based on Larry Siden's export-jqplot-to-png.js.
|
48
|
+
* Larry has generously given permission to adapt his code for inclusion
|
49
|
+
* into jqPlot.
|
50
|
+
*
|
51
|
+
* Larry's original code can be found here:
|
52
|
+
*
|
53
|
+
* https://github.com/lsiden/export-jqplot-to-png
|
54
|
+
*
|
55
|
+
*
|
56
|
+
*/
|
57
|
+
(function(c){if(c.jqplot.PyramidAxisRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidAxisRenderer.js",dataType:"script",async:false})}if(c.jqplot.PyramidGridRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidGridRenderer.js",dataType:"script",async:false})}c.jqplot.PyramidRenderer=function(){c.jqplot.LineRenderer.call(this)};c.jqplot.PyramidRenderer.prototype=new c.jqplot.LineRenderer();c.jqplot.PyramidRenderer.prototype.constructor=c.jqplot.PyramidRenderer;c.jqplot.PyramidRenderer.prototype.init=function(j,o){j=j||{};this._type="pyramid";this.barPadding=10;this.barWidth=null;this.fill=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.offsetBars=false;if(j.highlightMouseDown&&j.highlightMouseOver==null){j.highlightMouseOver=false}this.side="right";c.extend(true,this,j);this.renderer.options=j;this._highlightedPoint=null;this._dataColors=[];this._barPoints=[];this.fillAxis="y";this._primaryAxis="_yaxis";this._xnudge=0;var n={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shapeRenderer.init(n);var m=j.shadowOffset;if(m==null){if(this.lineWidth>2.5){m=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{m=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var h={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,angle:this.shadowAngle,offset:m,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shadowRenderer.init(h);o.postDrawHooks.addOnce(f);o.eventListenerHooks.addOnce("jqplotMouseMove",e);if(this.side==="left"){for(var k=0,g=this.data.length;k<g;k++){this.data[k][1]=-Math.abs(this.data[k][1])}}};c.jqplot.PyramidRenderer.prototype.setGridData=function(p){var j=this._xaxis.series_u2p;var o=this._yaxis.series_u2p;var k=this._plotData;var n=this._prevPlotData;this.gridData=[];this._prevGridData=[];var g=k.length;var m=false;var h;for(h=0;h<g;h++){if(k[h][1]<0){this.side="left"}}if(this._yaxis.name==="yMidAxis"&&this.side==="right"){this._xnudge=this._xaxis.max/2000;m=true}for(h=0;h<g;h++){if(k[h][0]!=null&&k[h][1]!=null){this.gridData.push([j(k[h][1]),o(k[h][0])])}else{if(k[h][0]==null){this.gridData.push([j(k[h][1]),null])}else{if(k[h][1]==null){this.gridData.push(null,[o(k[h][0])])}}}if(k[h][1]===0&&m){this.gridData[h][0]=j(this._xnudge)}}};c.jqplot.PyramidRenderer.prototype.makeGridData=function(m,p){var k=this._xaxis.series_u2p;var o=this._yaxis.series_u2p;var j=[];var g=m.length;var n=false;var h;for(h=0;h<g;h++){if(m[h][1]<0){this.side="left"}}if(this._yaxis.name==="yMidAxis"&&this.side==="right"){this._xnudge=this._xaxis.max/2000;n=true}for(h=0;h<g;h++){if(m[h][0]!=null&&m[h][1]!=null){j.push([k(m[h][1]),o(m[h][0])])}else{if(m[h][0]==null){j.push([k(m[h][1]),null])}else{if(m[h][1]==null){j.push([null,o(m[h][0])])}}}if(m[h][1]===0&&n){j[h][0]=k(this._xnudge)}}return j};c.jqplot.PyramidRenderer.prototype.setBarWidth=function(){var k;var g=0;var h=0;var m=this[this._primaryAxis];var q,l,o;g=m.max-m.min;var n=m.numberTicks;var j=(n-1)/2;var p=(this.barPadding===0)?1:0;if(m.name=="xaxis"||m.name=="x2axis"){this.barWidth=(m._offsets.max-m._offsets.min)/g-this.barPadding+p}else{if(this.fill){this.barWidth=(m._offsets.min-m._offsets.max)/g-this.barPadding+p}else{this.barWidth=(m._offsets.min-m._offsets.max)/g}}};c.jqplot.PyramidRenderer.prototype.draw=function(B,I,k){var E;var u=c.extend({},k);var p=(u.shadow!=undefined)?u.shadow:this.shadow;var K=(u.showLine!=undefined)?u.showLine:this.showLine;var C=(u.fill!=undefined)?u.fill:this.fill;var t=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var z,x;this._dataColors=[];this._barPoints=[];if(this.renderer.options.barWidth==null){this.renderer.setBarWidth.call(this)}var D=[],s,F;if(K){var q=new c.jqplot.ColorGenerator(this.negativeSeriesColors);var v=new c.jqplot.ColorGenerator(this.seriesColors);var J=q.get(this.index);if(!this.useNegativeColors){J=u.fillStyle}var o=u.fillStyle;var n;var L=this._xaxis.series_u2p(this._xnudge);var j=this._yaxis.series_u2p(this._yaxis.min);var m=this._yaxis.series_u2p(this._yaxis.max);var H=this.barWidth;var y=H/2;var D=[];var r=this.offsetBars?y:0;for(var E=0,A=I.length;E<A;E++){if(this.data[E][0]==null){continue}n=I[E][1];if(this._plotData[E][1]<0){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){u.fillStyle=q.next()}else{u.fillStyle=v.next()}}}else{if(this.varyBarColor&&!this._stack){u.fillStyle=v.next()}else{u.fillStyle=o}}if(this.fill){if(this._plotData[E][1]>=0){s=I[E][0]-L;F=this.barWidth;D=[L,n-y-r,s,F]}else{s=L-I[E][0];F=this.barWidth;D=[I[E][0],n-y-r,s,F]}this._barPoints.push([[D[0],D[1]+F],[D[0],D[1]],[D[0]+s,D[1]],[D[0]+s,D[1]+F]]);if(p){this.renderer.shadowRenderer.draw(B,D)}var g=u.fillStyle||this.color;this._dataColors.push(g);this.renderer.shapeRenderer.draw(B,D,u)}else{if(E===0){D=[[L,j],[I[E][0],j],[I[E][0],I[E][1]-y-r]]}else{if(E<A-1){D=D.concat([[I[E-1][0],I[E-1][1]-y-r],[I[E][0],I[E][1]+y-r],[I[E][0],I[E][1]-y-r]])}else{D=D.concat([[I[E-1][0],I[E-1][1]-y-r],[I[E][0],I[E][1]+y-r],[I[E][0],m],[L,m]]);if(p){this.renderer.shadowRenderer.draw(B,D)}var g=u.fillStyle||this.color;this._dataColors.push(g);this.renderer.shapeRenderer.draw(B,D,u)}}}}}if(this.highlightColors.length==0){this.highlightColors=c.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){this.highlightColors=[];for(var E=0;E<this._dataColors.length;E++){this.highlightColors.push(this.highlightColors)}}}};function b(l,k,h){h=h||{};h.axesDefaults=h.axesDefaults||{};h.grid=h.grid||{};h.legend=h.legend||{};h.seriesDefaults=h.seriesDefaults||{};var g=false;if(h.seriesDefaults.renderer===c.jqplot.PyramidRenderer){g=true}else{if(h.series){for(var j=0;j<h.series.length;j++){if(h.series[j].renderer===c.jqplot.PyramidRenderer){g=true}}}}if(g){h.axesDefaults.renderer=c.jqplot.PyramidAxisRenderer;h.grid.renderer=c.jqplot.PyramidGridRenderer;h.seriesDefaults.pointLabels={show:false}}}function f(){if(this.plugins.pyramidRenderer&&this.plugins.pyramidRenderer.highlightCanvas){this.plugins.pyramidRenderer.highlightCanvas.resetCanvas();this.plugins.pyramidRenderer.highlightCanvas=null}this.plugins.pyramidRenderer={highlightedSeriesIndex:null};this.plugins.pyramidRenderer.highlightCanvas=new c.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.pyramidRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pyramidRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.pyramidRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(g){d(g.data.plot)})}function a(m,l,j,i){var h=m.series[l];var g=m.plugins.pyramidRenderer.highlightCanvas;g._ctx.clearRect(0,0,g._ctx.canvas.width,g._ctx.canvas.height);h._highlightedPoint=j;m.plugins.pyramidRenderer.highlightedSeriesIndex=l;var k={fillStyle:h.highlightColors[j],fillRect:false};h.renderer.shapeRenderer.draw(g._ctx,i,k);g=null}function d(j){var g=j.plugins.pyramidRenderer.highlightCanvas;g._ctx.clearRect(0,0,g._ctx.canvas.width,g._ctx.canvas.height);for(var h=0;h<j.series.length;h++){j.series[h]._highlightedPoint=null}j.plugins.pyramidRenderer.highlightedSeriesIndex=null;j.target.trigger("jqplotDataUnhighlight");g=null}function e(k,j,n,m,l){if(m){var i=[m.seriesIndex,m.pointIndex,m.data];var h=jQuery.Event("jqplotDataMouseOver");h.pageX=k.pageX;h.pageY=k.pageY;l.target.trigger(h,i);if(l.series[i[0]].highlightMouseOver&&!(i[0]==l.plugins.pyramidRenderer.highlightedSeriesIndex&&i[1]==l.series[i[0]]._highlightedPoint)){var g=jQuery.Event("jqplotDataHighlight");g.pageX=k.pageX;g.pageY=k.pageY;l.target.trigger(g,i);a(l,m.seriesIndex,m.pointIndex,m.points)}}else{if(m==null){d(l)}}}c.jqplot.preInitHooks.push(b)})(jQuery);
|