alchemy 1.0.2 → 8.4.4
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.
- checksums.yaml +7 -0
- data/LICENSE +24 -17
- data/README.md +538 -4
- data/lib/alchemy.rb +3 -6
- metadata +61 -266
- data/Rakefile +0 -21
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
- data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
- data/app/assets/images/alchemy/icons/action-icons.png +0 -0
- data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
- data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
- data/app/assets/images/alchemy/icons/error_icon.png +0 -0
- data/app/assets/images/alchemy/icons/objects.png +0 -0
- data/app/assets/images/alchemy/icons/spinner.gif +0 -0
- data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
- data/app/assets/images/alchemy/icons/success_icon.png +0 -0
- data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
- data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
- data/app/assets/javascripts/alchemy/forms.js +0 -25
- data/app/assets/javascripts/alchemy/i18n.js +0 -36
- data/app/assets/javascripts/alchemy/login.js +0 -130
- data/app/assets/javascripts/alchemy/password.js +0 -99
- data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
- data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
- data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
- data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
- data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
- data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -448
- data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -241
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -10
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
- data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
- data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
- data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
- data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
- data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -536
- data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
- data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -161
- data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
- data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -214
- data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -169
- data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
- data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
- data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
- data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
- data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
- data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
- data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
- data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
- data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
- data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
- data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
- data/app/helpers/alchemy/gettext_translations.rb +0 -28
- data/app/helpers/alchemy/layout_helper.rb +0 -19
- data/app/helpers/alchemy/rails_translations.rb +0 -21
- data/app/helpers/alchemy/translation_helper.rb +0 -19
- data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
- data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
- data/app/views/alchemy/layouts/_header_layout.haml +0 -13
- data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
- data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
- data/app/views/alchemy/layouts/base.html.haml +0 -20
- data/app/views/alchemy/layouts/shell_layout.haml +0 -10
- data/lib/alchemy/version.rb +0 -3
- data/test/alchemy_test.rb +0 -7
- data/test/test_helper.rb +0 -9
- data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
- data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
- data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/API.txt +0 -1201
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/FAQ.txt +0 -76
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/LICENSE.txt +0 -22
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/Makefile +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/NEWS.txt +0 -508
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/PLUGINS.txt +0 -137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/README.txt +0 -90
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/ajax.html +0 -143
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/annotating.html +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/arrow-down.gif +0 -0
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/arrow-left.gif +0 -0
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/arrow-right.gif +0 -0
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/arrow-up.gif +0 -0
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/basic.html +0 -38
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth-1.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth-2.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth-3.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth-4.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth-5.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-eu-gdp-growth.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-japan-gdp-growth.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/data-usa-gdp-growth.json +0 -4
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/graph-types.html +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/hs-2004-27-a-large_web.jpg +0 -0
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/image.html +0 -45
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/index.html +0 -44
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/interacting-axes.html +0 -97
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/interacting.html +0 -93
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/layout.css +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/multiple-axes.html +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/navigate.html +0 -118
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/percentiles.html +0 -57
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/pie.html +0 -756
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/realtime.html +0 -83
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/resize.html +0 -61
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/selection.html +0 -114
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/setting-options.html +0 -61
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/stacking.html +0 -77
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/symbols.html +0 -49
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/thresholding.html +0 -54
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/time.html +0 -71
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/tracking.html +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/turning-series.html +0 -98
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/visitors.html +0 -90
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/examples/zooming.html +0 -98
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
- data/vendor/assets/javascripts/alchemy/rails.js +0 -331
- data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(b){function c(D){var h=null;var L=null;var n=null;var B=null;var p=null;var M=0;var F=true;var o=10;var w=0.95;var A=0;var d=false;var z=false;var j=[];D.hooks.processOptions.push(g);D.hooks.bindEvents.push(e);function g(O,N){if(N.series.pie.show){N.grid.show=false;if(N.series.pie.label.show=="auto"){if(N.legend.show){N.series.pie.label.show=false}else{N.series.pie.label.show=true}}if(N.series.pie.radius=="auto"){if(N.series.pie.label.show){N.series.pie.radius=3/4}else{N.series.pie.radius=1}}if(N.series.pie.tilt>1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;R<S.length;++R){for(var Q=0;Q<T;Q++){P+="\t"}if(typeof S[R]=="object"){P+=""+R+":\n";N(S[R],T+1)}else{P+=""+R+": "+S[R]+"\n"}}}N(O);alert(P)}function q(P){for(var N=0;N<P.length;++N){var O=parseFloat(P[N].data[0][1]);if(O){M+=O}}}function E(Q,N,O,P){if(!d){d=true;h=Q.getCanvas();L=b(h).parent();a=Q.getOptions();Q.setData(K(Q.getData()))}}function I(){A=L.children().filter(".legend").children().width();n=Math.min(h.width,(h.height/a.series.pie.tilt))/2;p=(h.height/2)+a.series.pie.offset.top;B=(h.width/2);if(a.series.pie.offset.left=="auto"){if(a.legend.position.match("w")){B+=A/2}else{B-=A/2}}else{B+=a.series.pie.offset.left}if(B<n){B=n}else{if(B>h.width-n){B=h.width-n}}}function v(O){for(var N=0;N<O.length;++N){if(typeof(O[N].data)=="number"){O[N].data=[[1,O[N].data]]}else{if(typeof(O[N].data)=="undefined"||typeof(O[N].data[0])=="undefined"){if(typeof(O[N].data)!="undefined"&&typeof(O[N].data.label)!="undefined"){O[N].label=O[N].data.label}O[N].data=[[1,0]]}}}return O}function K(Q){Q=v(Q);q(Q);var P=0;var S=0;var N=a.series.pie.combine.color;var R=[];for(var O=0;O<Q.length;++O){Q[O].data[0][1]=parseFloat(Q[O].data[0][1]);if(!Q[O].data[0][1]){Q[O].data[0][1]=0}if(Q[O].data[0][1]/M<=a.series.pie.combine.threshold){P+=Q[O].data[0][1];S++;if(!N){N=Q[O].color}}else{R.push({data:[[1,Q[O].data[0][1]]],color:Q[O].color,label:Q[O].label,angle:(Q[O].data[0][1]*(Math.PI*2))/M,percent:(Q[O].data[0][1]/M*100)})}}if(S>0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P<o){F=false;if(P>0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W<T.length;++W){T[W].startAngle=Y;X(T[W].angle,T[W].color,true)}ctx.restore();ctx.save();ctx.lineWidth=a.series.pie.stroke.width;Y=startAngle;for(var W=0;W<T.length;++W){X(T[W].angle,a.series.pie.stroke.color,false)}ctx.restore();J(ctx);if(a.series.pie.label.show){V()}ctx.restore();function X(ab,Z,aa){if(ab<=0){return}if(aa){ctx.fillStyle=Z}else{ctx.strokeStyle=Z;ctx.lineJoin="round"}ctx.beginPath();if(Math.abs(ab-Math.PI*2)>1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab<T.length;++ab){if(T[ab].percent>=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af='<span class="pieLabel" id="pieLabel'+ag+'" style="position:absolute;top:'+am+"px;left:"+ao+'px;">'+aq+"</span>";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('<div class="pieLabelBackground" style="position:absolute;width:'+an.width()+"px;height:"+an.height()+"px;"+al+"background-color:"+ak+';"> </div>').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P<N;O=P){((Q[P][1]<=R[1]&&R[1]<Q[O][1])||(Q[O][1]<=R[1]&&R[1]<Q[P][1]))&&(R[0]<(Q[O][0]-Q[P][0])*(R[1]-Q[P][1])/(Q[O][1]-Q[P][1])+Q[P][0])&&(S=!S)}return S}function u(R,P){var T=D.getData(),O=D.getOptions(),N=O.series.pie.radius>1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q<T.length;++Q){var S=T[Q];if(S.pie.show){ctx.save();ctx.beginPath();ctx.moveTo(0,0);ctx.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);ctx.closePath();x=R-B;y=P-p;if(ctx.isPointInPath){if(ctx.isPointInPath(R-B,P-p)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}else{p1X=(N*Math.cos(S.startAngle));p1Y=(N*Math.sin(S.startAngle));p2X=(N*Math.cos(S.startAngle+(S.angle/4)));p2Y=(N*Math.sin(S.startAngle+(S.angle/4)));p3X=(N*Math.cos(S.startAngle+(S.angle/2)));p3Y=(N*Math.sin(S.startAngle+(S.angle/2)));p4X=(N*Math.cos(S.startAngle+(S.angle/1.5)));p4Y=(N*Math.sin(S.startAngle+(S.angle/1.5)));p5X=(N*Math.cos(S.startAngle+S.angle));p5Y=(N*Math.sin(S.startAngle+S.angle));arrPoly=[[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];arrPoint=[x,y];if(s(arrPoly,arrPoint)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}ctx.restore()}}return null}function t(N){m("plothover",N)}function l(N){m("plotclick",N)}function m(N,T){var O=D.offset(),R=parseInt(T.pageX-O.left),P=parseInt(T.pageY-O.top),V=u(R,P);if(a.grid.autoHighlight){for(var Q=0;Q<j.length;++Q){var S=j[Q];if(S.auto==N&&!(V&&S.series==V.series)){f(S.series)}}}if(V){k(V.series,N)}var U={pageX:T.pageX,pageY:T.pageY};L.trigger(N,[U,V])}function k(O,P){if(typeof O=="number"){O=series[O]}var N=C(O);if(N==-1){j.push({series:O,auto:P});D.triggerRedrawOverlay()}else{if(!P){j[N].auto=false}}}function f(O){if(O==null){j=[];D.triggerRedrawOverlay()}if(typeof O=="number"){O=series[O]}var N=C(O);if(N!=-1){j.splice(N,1);D.triggerRedrawOverlay()}}function C(P){for(var N=0;N<j.length;++N){var O=j[N];if(O.series==P){return N}}return -1}function H(Q,R){var P=Q.getOptions();var N=P.series.pie.radius>1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i<j.length;++i){O(j[i].series)}J(R);R.restore();function O(S){if(S.angle<0){return}R.fillStyle="rgba(255, 255, 255, "+P.series.pie.highlight.opacity+")";R.beginPath();if(Math.abs(S.angle-Math.PI*2)>1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'<div style="font-size:x-small;text-align:center;padding:2px;color:'+e.color+';">'+d+"<br/>"+Math.round(e.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Flot plugin for automatically redrawing plots when the placeholder
|
|
3
|
-
size changes, e.g. on window resizes.
|
|
4
|
-
|
|
5
|
-
It works by listening for changes on the placeholder div (through the
|
|
6
|
-
jQuery resize event plugin) - if the size changes, it will redraw the
|
|
7
|
-
plot.
|
|
8
|
-
|
|
9
|
-
There are no options. If you need to disable the plugin for some
|
|
10
|
-
plots, you can just fix the size of their placeholders.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* Inline dependency:
|
|
15
|
-
* jQuery resize event - v1.1 - 3/14/2010
|
|
16
|
-
* http://benalman.com/projects/jquery-resize-plugin/
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) 2010 "Cowboy" Ben Alman
|
|
19
|
-
* Dual licensed under the MIT and GPL licenses.
|
|
20
|
-
* http://benalman.com/about/license/
|
|
21
|
-
*/
|
|
22
|
-
(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(function ($) {
|
|
26
|
-
var options = { }; // no options
|
|
27
|
-
|
|
28
|
-
function init(plot) {
|
|
29
|
-
function onResize() {
|
|
30
|
-
var placeholder = plot.getPlaceholder();
|
|
31
|
-
|
|
32
|
-
// somebody might have hidden us and we can't plot
|
|
33
|
-
// when we don't have the dimensions
|
|
34
|
-
if (placeholder.width() == 0 || placeholder.height() == 0)
|
|
35
|
-
return;
|
|
36
|
-
|
|
37
|
-
plot.resize();
|
|
38
|
-
plot.setupGrid();
|
|
39
|
-
plot.draw();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function bindEvents(plot, eventHolder) {
|
|
43
|
-
plot.getPlaceholder().resize(onResize);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function shutdown(plot, eventHolder) {
|
|
47
|
-
plot.getPlaceholder().unbind("resize", onResize);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
plot.hooks.bindEvents.push(bindEvents);
|
|
51
|
-
plot.hooks.shutdown.push(shutdown);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
$.plot.plugins.push({
|
|
55
|
-
init: init,
|
|
56
|
-
options: options,
|
|
57
|
-
name: 'resize',
|
|
58
|
-
version: '1.0'
|
|
59
|
-
});
|
|
60
|
-
})(jQuery);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(n,p,u){var w=n([]),s=n.resize=n.extend(n.resize,{}),o,l="setTimeout",m="resize",t=m+"-special-event",v="delay",r="throttleWindow";s[v]=250;s[r]=true;n.event.special[m]={setup:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.add(a);n.data(this,t,{w:a.width(),h:a.height()});if(w.length===1){q()}},teardown:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.not(a);a.removeData(t);if(!w.length){clearTimeout(o)}},add:function(b){if(!s[r]&&this[l]){return false}var c;function a(d,h,g){var f=n(this),e=n.data(this,t);e.w=h!==u?h:f.width();e.h=g!==u?g:f.height();c.apply(this,arguments)}if(n.isFunction(b)){c=b;return a}else{c=b.handler;b.handler=a}}};function q(){o=p[l](function(){w.each(function(){var d=n(this),a=d.width(),b=d.height(),c=n.data(this,t);if(a!==c.w||b!==c.h){d.trigger(m,[c.w=a,c.h=b])}});q()},s[v])}})(jQuery,this);(function(b){var a={};function c(f){function e(){var h=f.getPlaceholder();if(h.width()==0||h.height()==0){return}f.resize();f.setupGrid();f.draw()}function g(i,h){i.getPlaceholder().resize(e)}function d(i,h){i.getPlaceholder().unbind("resize",e)}f.hooks.bindEvents.push(g);f.hooks.shutdown.push(d)}b.plot.plugins.push({init:c,options:a,name:"resize",version:"1.0"})})(jQuery);
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Flot plugin for selecting regions.
|
|
3
|
-
|
|
4
|
-
The plugin defines the following options:
|
|
5
|
-
|
|
6
|
-
selection: {
|
|
7
|
-
mode: null or "x" or "y" or "xy",
|
|
8
|
-
color: color
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
Selection support is enabled by setting the mode to one of "x", "y" or
|
|
12
|
-
"xy". In "x" mode, the user will only be able to specify the x range,
|
|
13
|
-
similarly for "y" mode. For "xy", the selection becomes a rectangle
|
|
14
|
-
where both ranges can be specified. "color" is color of the selection
|
|
15
|
-
(if you need to change the color later on, you can get to it with
|
|
16
|
-
plot.getOptions().selection.color).
|
|
17
|
-
|
|
18
|
-
When selection support is enabled, a "plotselected" event will be
|
|
19
|
-
emitted on the DOM element you passed into the plot function. The
|
|
20
|
-
event handler gets a parameter with the ranges selected on the axes,
|
|
21
|
-
like this:
|
|
22
|
-
|
|
23
|
-
placeholder.bind("plotselected", function(event, ranges) {
|
|
24
|
-
alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
|
|
25
|
-
// similar for yaxis - with multiple axes, the extra ones are in
|
|
26
|
-
// x2axis, x3axis, ...
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
The "plotselected" event is only fired when the user has finished
|
|
30
|
-
making the selection. A "plotselecting" event is fired during the
|
|
31
|
-
process with the same parameters as the "plotselected" event, in case
|
|
32
|
-
you want to know what's happening while it's happening,
|
|
33
|
-
|
|
34
|
-
A "plotunselected" event with no arguments is emitted when the user
|
|
35
|
-
clicks the mouse to remove the selection.
|
|
36
|
-
|
|
37
|
-
The plugin allso adds the following methods to the plot object:
|
|
38
|
-
|
|
39
|
-
- setSelection(ranges, preventEvent)
|
|
40
|
-
|
|
41
|
-
Set the selection rectangle. The passed in ranges is on the same
|
|
42
|
-
form as returned in the "plotselected" event. If the selection mode
|
|
43
|
-
is "x", you should put in either an xaxis range, if the mode is "y"
|
|
44
|
-
you need to put in an yaxis range and both xaxis and yaxis if the
|
|
45
|
-
selection mode is "xy", like this:
|
|
46
|
-
|
|
47
|
-
setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
|
|
48
|
-
|
|
49
|
-
setSelection will trigger the "plotselected" event when called. If
|
|
50
|
-
you don't want that to happen, e.g. if you're inside a
|
|
51
|
-
"plotselected" handler, pass true as the second parameter. If you
|
|
52
|
-
are using multiple axes, you can specify the ranges on any of those,
|
|
53
|
-
e.g. as x2axis/x3axis/... instead of xaxis, the plugin picks the
|
|
54
|
-
first one it sees.
|
|
55
|
-
|
|
56
|
-
- clearSelection(preventEvent)
|
|
57
|
-
|
|
58
|
-
Clear the selection rectangle. Pass in true to avoid getting a
|
|
59
|
-
"plotunselected" event.
|
|
60
|
-
|
|
61
|
-
- getSelection()
|
|
62
|
-
|
|
63
|
-
Returns the current selection in the same format as the
|
|
64
|
-
"plotselected" event. If there's currently no selection, the
|
|
65
|
-
function returns null.
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
(function ($) {
|
|
70
|
-
function init(plot) {
|
|
71
|
-
var selection = {
|
|
72
|
-
first: { x: -1, y: -1}, second: { x: -1, y: -1},
|
|
73
|
-
show: false,
|
|
74
|
-
active: false
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// FIXME: The drag handling implemented here should be
|
|
78
|
-
// abstracted out, there's some similar code from a library in
|
|
79
|
-
// the navigation plugin, this should be massaged a bit to fit
|
|
80
|
-
// the Flot cases here better and reused. Doing this would
|
|
81
|
-
// make this plugin much slimmer.
|
|
82
|
-
var savedhandlers = {};
|
|
83
|
-
|
|
84
|
-
var mouseUpHandler = null;
|
|
85
|
-
|
|
86
|
-
function onMouseMove(e) {
|
|
87
|
-
if (selection.active) {
|
|
88
|
-
updateSelection(e);
|
|
89
|
-
|
|
90
|
-
plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function onMouseDown(e) {
|
|
95
|
-
if (e.which != 1) // only accept left-click
|
|
96
|
-
return;
|
|
97
|
-
|
|
98
|
-
// cancel out any text selections
|
|
99
|
-
document.body.focus();
|
|
100
|
-
|
|
101
|
-
// prevent text selection and drag in old-school browsers
|
|
102
|
-
if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {
|
|
103
|
-
savedhandlers.onselectstart = document.onselectstart;
|
|
104
|
-
document.onselectstart = function () { return false; };
|
|
105
|
-
}
|
|
106
|
-
if (document.ondrag !== undefined && savedhandlers.ondrag == null) {
|
|
107
|
-
savedhandlers.ondrag = document.ondrag;
|
|
108
|
-
document.ondrag = function () { return false; };
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
setSelectionPos(selection.first, e);
|
|
112
|
-
|
|
113
|
-
selection.active = true;
|
|
114
|
-
|
|
115
|
-
// this is a bit silly, but we have to use a closure to be
|
|
116
|
-
// able to whack the same handler again
|
|
117
|
-
mouseUpHandler = function (e) { onMouseUp(e); };
|
|
118
|
-
|
|
119
|
-
$(document).one("mouseup", mouseUpHandler);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function onMouseUp(e) {
|
|
123
|
-
mouseUpHandler = null;
|
|
124
|
-
|
|
125
|
-
// revert drag stuff for old-school browsers
|
|
126
|
-
if (document.onselectstart !== undefined)
|
|
127
|
-
document.onselectstart = savedhandlers.onselectstart;
|
|
128
|
-
if (document.ondrag !== undefined)
|
|
129
|
-
document.ondrag = savedhandlers.ondrag;
|
|
130
|
-
|
|
131
|
-
// no more dragging
|
|
132
|
-
selection.active = false;
|
|
133
|
-
updateSelection(e);
|
|
134
|
-
|
|
135
|
-
if (selectionIsSane())
|
|
136
|
-
triggerSelectedEvent();
|
|
137
|
-
else {
|
|
138
|
-
// this counts as a clear
|
|
139
|
-
plot.getPlaceholder().trigger("plotunselected", [ ]);
|
|
140
|
-
plot.getPlaceholder().trigger("plotselecting", [ null ]);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function getSelection() {
|
|
147
|
-
if (!selectionIsSane())
|
|
148
|
-
return null;
|
|
149
|
-
|
|
150
|
-
var r = {}, c1 = selection.first, c2 = selection.second;
|
|
151
|
-
$.each(plot.getAxes(), function (name, axis) {
|
|
152
|
-
if (axis.used) {
|
|
153
|
-
var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]);
|
|
154
|
-
r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
return r;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function triggerSelectedEvent() {
|
|
161
|
-
var r = getSelection();
|
|
162
|
-
|
|
163
|
-
plot.getPlaceholder().trigger("plotselected", [ r ]);
|
|
164
|
-
|
|
165
|
-
// backwards-compat stuff, to be removed in future
|
|
166
|
-
if (r.xaxis && r.yaxis)
|
|
167
|
-
plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function clamp(min, value, max) {
|
|
171
|
-
return value < min ? min: (value > max ? max: value);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function setSelectionPos(pos, e) {
|
|
175
|
-
var o = plot.getOptions();
|
|
176
|
-
var offset = plot.getPlaceholder().offset();
|
|
177
|
-
var plotOffset = plot.getPlotOffset();
|
|
178
|
-
pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());
|
|
179
|
-
pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());
|
|
180
|
-
|
|
181
|
-
if (o.selection.mode == "y")
|
|
182
|
-
pos.x = pos == selection.first ? 0 : plot.width();
|
|
183
|
-
|
|
184
|
-
if (o.selection.mode == "x")
|
|
185
|
-
pos.y = pos == selection.first ? 0 : plot.height();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function updateSelection(pos) {
|
|
189
|
-
if (pos.pageX == null)
|
|
190
|
-
return;
|
|
191
|
-
|
|
192
|
-
setSelectionPos(selection.second, pos);
|
|
193
|
-
if (selectionIsSane()) {
|
|
194
|
-
selection.show = true;
|
|
195
|
-
plot.triggerRedrawOverlay();
|
|
196
|
-
}
|
|
197
|
-
else
|
|
198
|
-
clearSelection(true);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function clearSelection(preventEvent) {
|
|
202
|
-
if (selection.show) {
|
|
203
|
-
selection.show = false;
|
|
204
|
-
plot.triggerRedrawOverlay();
|
|
205
|
-
if (!preventEvent)
|
|
206
|
-
plot.getPlaceholder().trigger("plotunselected", [ ]);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// function taken from markings support in Flot
|
|
211
|
-
function extractRange(ranges, coord) {
|
|
212
|
-
var axis, from, to, key, axes = plot.getAxes();
|
|
213
|
-
|
|
214
|
-
for (var k in axes) {
|
|
215
|
-
axis = axes[k];
|
|
216
|
-
if (axis.direction == coord) {
|
|
217
|
-
key = coord + axis.n + "axis";
|
|
218
|
-
if (!ranges[key] && axis.n == 1)
|
|
219
|
-
key = coord + "axis"; // support x1axis as xaxis
|
|
220
|
-
if (ranges[key]) {
|
|
221
|
-
from = ranges[key].from;
|
|
222
|
-
to = ranges[key].to;
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// backwards-compat stuff - to be removed in future
|
|
229
|
-
if (!ranges[key]) {
|
|
230
|
-
axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0];
|
|
231
|
-
from = ranges[coord + "1"];
|
|
232
|
-
to = ranges[coord + "2"];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// auto-reverse as an added bonus
|
|
236
|
-
if (from != null && to != null && from > to) {
|
|
237
|
-
var tmp = from;
|
|
238
|
-
from = to;
|
|
239
|
-
to = tmp;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return { from: from, to: to, axis: axis };
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function setSelection(ranges, preventEvent) {
|
|
246
|
-
var axis, range, o = plot.getOptions();
|
|
247
|
-
|
|
248
|
-
if (o.selection.mode == "y") {
|
|
249
|
-
selection.first.x = 0;
|
|
250
|
-
selection.second.x = plot.width();
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
range = extractRange(ranges, "x");
|
|
254
|
-
|
|
255
|
-
selection.first.x = range.axis.p2c(range.from);
|
|
256
|
-
selection.second.x = range.axis.p2c(range.to);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (o.selection.mode == "x") {
|
|
260
|
-
selection.first.y = 0;
|
|
261
|
-
selection.second.y = plot.height();
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
range = extractRange(ranges, "y");
|
|
265
|
-
|
|
266
|
-
selection.first.y = range.axis.p2c(range.from);
|
|
267
|
-
selection.second.y = range.axis.p2c(range.to);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
selection.show = true;
|
|
271
|
-
plot.triggerRedrawOverlay();
|
|
272
|
-
if (!preventEvent && selectionIsSane())
|
|
273
|
-
triggerSelectedEvent();
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
function selectionIsSane() {
|
|
277
|
-
var minSize = 5;
|
|
278
|
-
return Math.abs(selection.second.x - selection.first.x) >= minSize &&
|
|
279
|
-
Math.abs(selection.second.y - selection.first.y) >= minSize;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
plot.clearSelection = clearSelection;
|
|
283
|
-
plot.setSelection = setSelection;
|
|
284
|
-
plot.getSelection = getSelection;
|
|
285
|
-
|
|
286
|
-
plot.hooks.bindEvents.push(function(plot, eventHolder) {
|
|
287
|
-
var o = plot.getOptions();
|
|
288
|
-
if (o.selection.mode != null) {
|
|
289
|
-
eventHolder.mousemove(onMouseMove);
|
|
290
|
-
eventHolder.mousedown(onMouseDown);
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
plot.hooks.drawOverlay.push(function (plot, ctx) {
|
|
296
|
-
// draw selection
|
|
297
|
-
if (selection.show && selectionIsSane()) {
|
|
298
|
-
var plotOffset = plot.getPlotOffset();
|
|
299
|
-
var o = plot.getOptions();
|
|
300
|
-
|
|
301
|
-
ctx.save();
|
|
302
|
-
ctx.translate(plotOffset.left, plotOffset.top);
|
|
303
|
-
|
|
304
|
-
var c = $.color.parse(o.selection.color);
|
|
305
|
-
|
|
306
|
-
ctx.strokeStyle = c.scale('a', 0.8).toString();
|
|
307
|
-
ctx.lineWidth = 1;
|
|
308
|
-
ctx.lineJoin = "round";
|
|
309
|
-
ctx.fillStyle = c.scale('a', 0.4).toString();
|
|
310
|
-
|
|
311
|
-
var x = Math.min(selection.first.x, selection.second.x),
|
|
312
|
-
y = Math.min(selection.first.y, selection.second.y),
|
|
313
|
-
w = Math.abs(selection.second.x - selection.first.x),
|
|
314
|
-
h = Math.abs(selection.second.y - selection.first.y);
|
|
315
|
-
|
|
316
|
-
ctx.fillRect(x, y, w, h);
|
|
317
|
-
ctx.strokeRect(x, y, w, h);
|
|
318
|
-
|
|
319
|
-
ctx.restore();
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
plot.hooks.shutdown.push(function (plot, eventHolder) {
|
|
324
|
-
eventHolder.unbind("mousemove", onMouseMove);
|
|
325
|
-
eventHolder.unbind("mousedown", onMouseDown);
|
|
326
|
-
|
|
327
|
-
if (mouseUpHandler)
|
|
328
|
-
$(document).unbind("mouseup", mouseUpHandler);
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
$.plot.plugins.push({
|
|
334
|
-
init: init,
|
|
335
|
-
options: {
|
|
336
|
-
selection: {
|
|
337
|
-
mode: null, // one of null, "x", "y" or "xy"
|
|
338
|
-
color: "#e8cfac"
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
name: 'selection',
|
|
342
|
-
version: '1.1'
|
|
343
|
-
});
|
|
344
|
-
})(jQuery);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(a){function b(k){var p={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false};var m={};var r=null;function e(s){if(p.active){l(s);k.getPlaceholder().trigger("plotselecting",[g()])}}function n(s){if(s.which!=1){return}document.body.focus();if(document.onselectstart!==undefined&&m.onselectstart==null){m.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&m.ondrag==null){m.ondrag=document.ondrag;document.ondrag=function(){return false}}d(p.first,s);p.active=true;r=function(t){j(t)};a(document).one("mouseup",r)}function j(s){r=null;if(document.onselectstart!==undefined){document.onselectstart=m.onselectstart}if(document.ondrag!==undefined){document.ondrag=m.ondrag}p.active=false;l(s);if(f()){i()}else{k.getPlaceholder().trigger("plotunselected",[]);k.getPlaceholder().trigger("plotselecting",[null])}return false}function g(){if(!f()){return null}var u={},t=p.first,s=p.second;a.each(k.getAxes(),function(v,w){if(w.used){var y=w.c2p(t[w.direction]),x=w.c2p(s[w.direction]);u[v]={from:Math.min(y,x),to:Math.max(y,x)}}});return u}function i(){var s=g();k.getPlaceholder().trigger("plotselected",[s]);if(s.xaxis&&s.yaxis){k.getPlaceholder().trigger("selected",[{x1:s.xaxis.from,y1:s.yaxis.from,x2:s.xaxis.to,y2:s.yaxis.to}])}}function h(t,u,s){return u<t?t:(u>s?s:u)}function d(w,t){var v=k.getOptions();var u=k.getPlaceholder().offset();var s=k.getPlotOffset();w.x=h(0,t.pageX-u.left-s.left,k.width());w.y=h(0,t.pageY-u.top-s.top,k.height());if(v.selection.mode=="y"){w.x=w==p.first?0:k.width()}if(v.selection.mode=="x"){w.y=w==p.first?0:k.height()}}function l(s){if(s.pageX==null){return}d(p.second,s);if(f()){p.show=true;k.triggerRedrawOverlay()}else{q(true)}}function q(s){if(p.show){p.show=false;k.triggerRedrawOverlay();if(!s){k.getPlaceholder().trigger("plotunselected",[])}}}function c(s,w){var t,y,z,A,x=k.getAxes();for(var u in x){t=x[u];if(t.direction==w){A=w+t.n+"axis";if(!s[A]&&t.n==1){A=w+"axis"}if(s[A]){y=s[A].from;z=s[A].to;break}}}if(!s[A]){t=w=="x"?k.getXAxes()[0]:k.getYAxes()[0];y=s[w+"1"];z=s[w+"2"]}if(y!=null&&z!=null&&y>z){var v=y;y=z;z=v}return{from:y,to:z,axis:t}}function o(t,s){var v,u,w=k.getOptions();if(w.selection.mode=="y"){p.first.x=0;p.second.x=k.width()}else{u=c(t,"x");p.first.x=u.axis.p2c(u.from);p.second.x=u.axis.p2c(u.to)}if(w.selection.mode=="x"){p.first.y=0;p.second.y=k.height()}else{u=c(t,"y");p.first.y=u.axis.p2c(u.from);p.second.y=u.axis.p2c(u.to)}p.show=true;k.triggerRedrawOverlay();if(!s&&f()){i()}}function f(){var s=5;return Math.abs(p.second.x-p.first.x)>=s&&Math.abs(p.second.y-p.first.y)>=s}k.clearSelection=q;k.setSelection=o;k.getSelection=g;k.hooks.bindEvents.push(function(t,s){var u=t.getOptions();if(u.selection.mode!=null){s.mousemove(e);s.mousedown(n)}});k.hooks.drawOverlay.push(function(v,D){if(p.show&&f()){var t=v.getPlotOffset();var s=v.getOptions();D.save();D.translate(t.left,t.top);var z=a.color.parse(s.selection.color);D.strokeStyle=z.scale("a",0.8).toString();D.lineWidth=1;D.lineJoin="round";D.fillStyle=z.scale("a",0.4).toString();var B=Math.min(p.first.x,p.second.x),A=Math.min(p.first.y,p.second.y),C=Math.abs(p.second.x-p.first.x),u=Math.abs(p.second.y-p.first.y);D.fillRect(B,A,C,u);D.strokeRect(B,A,C,u);D.restore()}});k.hooks.shutdown.push(function(t,s){s.unbind("mousemove",e);s.unbind("mousedown",n);if(r){a(document).unbind("mouseup",r)}})}a.plot.plugins.push({init:b,options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})})(jQuery);
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Flot plugin for stacking data sets, i.e. putting them on top of each
|
|
3
|
-
other, for accumulative graphs.
|
|
4
|
-
|
|
5
|
-
The plugin assumes the data is sorted on x (or y if stacking
|
|
6
|
-
horizontally). For line charts, it is assumed that if a line has an
|
|
7
|
-
undefined gap (from a null point), then the line above it should have
|
|
8
|
-
the same gap - insert zeros instead of "null" if you want another
|
|
9
|
-
behaviour. This also holds for the start and end of the chart. Note
|
|
10
|
-
that stacking a mix of positive and negative values in most instances
|
|
11
|
-
doesn't make sense (so it looks weird).
|
|
12
|
-
|
|
13
|
-
Two or more series are stacked when their "stack" attribute is set to
|
|
14
|
-
the same key (which can be any number or string or just "true"). To
|
|
15
|
-
specify the default stack, you can set
|
|
16
|
-
|
|
17
|
-
series: {
|
|
18
|
-
stack: null or true or key (number/string)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
or specify it for a specific series
|
|
22
|
-
|
|
23
|
-
$.plot($("#placeholder"), [{ data: [ ... ], stack: true }])
|
|
24
|
-
|
|
25
|
-
The stacking order is determined by the order of the data series in
|
|
26
|
-
the array (later series end up on top of the previous).
|
|
27
|
-
|
|
28
|
-
Internally, the plugin modifies the datapoints in each series, adding
|
|
29
|
-
an offset to the y value. For line series, extra data points are
|
|
30
|
-
inserted through interpolation. If there's a second y value, it's also
|
|
31
|
-
adjusted (e.g for bar charts or filled areas).
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
(function ($) {
|
|
35
|
-
var options = {
|
|
36
|
-
series: { stack: null } // or number/string
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
function init(plot) {
|
|
40
|
-
function findMatchingSeries(s, allseries) {
|
|
41
|
-
var res = null
|
|
42
|
-
for (var i = 0; i < allseries.length; ++i) {
|
|
43
|
-
if (s == allseries[i])
|
|
44
|
-
break;
|
|
45
|
-
|
|
46
|
-
if (allseries[i].stack == s.stack)
|
|
47
|
-
res = allseries[i];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return res;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function stackData(plot, s, datapoints) {
|
|
54
|
-
if (s.stack == null)
|
|
55
|
-
return;
|
|
56
|
-
|
|
57
|
-
var other = findMatchingSeries(s, plot.getData());
|
|
58
|
-
if (!other)
|
|
59
|
-
return;
|
|
60
|
-
|
|
61
|
-
var ps = datapoints.pointsize,
|
|
62
|
-
points = datapoints.points,
|
|
63
|
-
otherps = other.datapoints.pointsize,
|
|
64
|
-
otherpoints = other.datapoints.points,
|
|
65
|
-
newpoints = [],
|
|
66
|
-
px, py, intery, qx, qy, bottom,
|
|
67
|
-
withlines = s.lines.show,
|
|
68
|
-
horizontal = s.bars.horizontal,
|
|
69
|
-
withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
|
|
70
|
-
withsteps = withlines && s.lines.steps,
|
|
71
|
-
fromgap = true,
|
|
72
|
-
keyOffset = horizontal ? 1 : 0,
|
|
73
|
-
accumulateOffset = horizontal ? 0 : 1,
|
|
74
|
-
i = 0, j = 0, l;
|
|
75
|
-
|
|
76
|
-
while (true) {
|
|
77
|
-
if (i >= points.length)
|
|
78
|
-
break;
|
|
79
|
-
|
|
80
|
-
l = newpoints.length;
|
|
81
|
-
|
|
82
|
-
if (points[i] == null) {
|
|
83
|
-
// copy gaps
|
|
84
|
-
for (m = 0; m < ps; ++m)
|
|
85
|
-
newpoints.push(points[i + m]);
|
|
86
|
-
i += ps;
|
|
87
|
-
}
|
|
88
|
-
else if (j >= otherpoints.length) {
|
|
89
|
-
// for lines, we can't use the rest of the points
|
|
90
|
-
if (!withlines) {
|
|
91
|
-
for (m = 0; m < ps; ++m)
|
|
92
|
-
newpoints.push(points[i + m]);
|
|
93
|
-
}
|
|
94
|
-
i += ps;
|
|
95
|
-
}
|
|
96
|
-
else if (otherpoints[j] == null) {
|
|
97
|
-
// oops, got a gap
|
|
98
|
-
for (m = 0; m < ps; ++m)
|
|
99
|
-
newpoints.push(null);
|
|
100
|
-
fromgap = true;
|
|
101
|
-
j += otherps;
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
// cases where we actually got two points
|
|
105
|
-
px = points[i + keyOffset];
|
|
106
|
-
py = points[i + accumulateOffset];
|
|
107
|
-
qx = otherpoints[j + keyOffset];
|
|
108
|
-
qy = otherpoints[j + accumulateOffset];
|
|
109
|
-
bottom = 0;
|
|
110
|
-
|
|
111
|
-
if (px == qx) {
|
|
112
|
-
for (m = 0; m < ps; ++m)
|
|
113
|
-
newpoints.push(points[i + m]);
|
|
114
|
-
|
|
115
|
-
newpoints[l + accumulateOffset] += qy;
|
|
116
|
-
bottom = qy;
|
|
117
|
-
|
|
118
|
-
i += ps;
|
|
119
|
-
j += otherps;
|
|
120
|
-
}
|
|
121
|
-
else if (px > qx) {
|
|
122
|
-
// we got past point below, might need to
|
|
123
|
-
// insert interpolated extra point
|
|
124
|
-
if (withlines && i > 0 && points[i - ps] != null) {
|
|
125
|
-
intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);
|
|
126
|
-
newpoints.push(qx);
|
|
127
|
-
newpoints.push(intery + qy);
|
|
128
|
-
for (m = 2; m < ps; ++m)
|
|
129
|
-
newpoints.push(points[i + m]);
|
|
130
|
-
bottom = qy;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
j += otherps;
|
|
134
|
-
}
|
|
135
|
-
else { // px < qx
|
|
136
|
-
if (fromgap && withlines) {
|
|
137
|
-
// if we come from a gap, we just skip this point
|
|
138
|
-
i += ps;
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
for (m = 0; m < ps; ++m)
|
|
143
|
-
newpoints.push(points[i + m]);
|
|
144
|
-
|
|
145
|
-
// we might be able to interpolate a point below,
|
|
146
|
-
// this can give us a better y
|
|
147
|
-
if (withlines && j > 0 && otherpoints[j - otherps] != null)
|
|
148
|
-
bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
|
|
149
|
-
|
|
150
|
-
newpoints[l + accumulateOffset] += bottom;
|
|
151
|
-
|
|
152
|
-
i += ps;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
fromgap = false;
|
|
156
|
-
|
|
157
|
-
if (l != newpoints.length && withbottom)
|
|
158
|
-
newpoints[l + 2] += bottom;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// maintain the line steps invariant
|
|
162
|
-
if (withsteps && l != newpoints.length && l > 0
|
|
163
|
-
&& newpoints[l] != null
|
|
164
|
-
&& newpoints[l] != newpoints[l - ps]
|
|
165
|
-
&& newpoints[l + 1] != newpoints[l - ps + 1]) {
|
|
166
|
-
for (m = 0; m < ps; ++m)
|
|
167
|
-
newpoints[l + ps + m] = newpoints[l + m];
|
|
168
|
-
newpoints[l + 1] = newpoints[l - ps + 1];
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
datapoints.points = newpoints;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
plot.hooks.processDatapoints.push(stackData);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
$.plot.plugins.push({
|
|
179
|
-
init: init,
|
|
180
|
-
options: options,
|
|
181
|
-
name: 'stack',
|
|
182
|
-
version: '1.2'
|
|
183
|
-
});
|
|
184
|
-
})(jQuery);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(b){var a={series:{stack:null}};function c(f){function d(k,j){var h=null;for(var g=0;g<j.length;++g){if(k==j[g]){break}if(j[g].stack==k.stack){h=j[g]}}return h}function e(C,v,g){if(v.stack==null){return}var p=d(v,C.getData());if(!p){return}var z=g.pointsize,F=g.points,h=p.datapoints.pointsize,y=p.datapoints.points,t=[],x,w,k,J,I,r,u=v.lines.show,G=v.bars.horizontal,o=z>2&&(G?g.format[2].x:g.format[2].y),n=u&&v.lines.steps,E=true,q=G?1:0,H=G?0:1,D=0,B=0,A;while(true){if(D>=F.length){break}A=t.length;if(F[D]==null){for(m=0;m<z;++m){t.push(F[D+m])}D+=z}else{if(B>=y.length){if(!u){for(m=0;m<z;++m){t.push(F[D+m])}}D+=z}else{if(y[B]==null){for(m=0;m<z;++m){t.push(null)}E=true;B+=h}else{x=F[D+q];w=F[D+H];J=y[B+q];I=y[B+H];r=0;if(x==J){for(m=0;m<z;++m){t.push(F[D+m])}t[A+H]+=I;r=I;D+=z;B+=h}else{if(x>J){if(u&&D>0&&F[D-z]!=null){k=w+(F[D-z+H]-w)*(J-x)/(F[D-z+q]-x);t.push(J);t.push(k+I);for(m=2;m<z;++m){t.push(F[D+m])}r=I}B+=h}else{if(E&&u){D+=z;continue}for(m=0;m<z;++m){t.push(F[D+m])}if(u&&B>0&&y[B-h]!=null){r=I+(y[B-h+H]-I)*(x-J)/(y[B-h+q]-J)}t[A+H]+=r;D+=z}}E=false;if(A!=t.length&&o){t[A+2]+=r}}}}if(n&&A!=t.length&&A>0&&t[A]!=null&&t[A]!=t[A-z]&&t[A+1]!=t[A-z+1]){for(m=0;m<z;++m){t[A+z+m]=t[A+m]}t[A+1]=t[A-z+1]}}g.points=t}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"stack",version:"1.2"})})(jQuery);
|