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