src/pyams_skin/resources/js/ext/flot/jquery.flot.fillbetween.min.js
changeset 475 79ae32c82e3e
parent 98 89a28618a327
child 546 9f02c09d2393
--- a/src/pyams_skin/resources/js/ext/flot/jquery.flot.fillbetween.min.js	Mon Dec 03 13:52:31 2018 +0100
+++ b/src/pyams_skin/resources/js/ext/flot/jquery.flot.fillbetween.min.js	Wed Dec 05 16:21:23 2018 +0100
@@ -1,7 +1,1 @@
-/* Javascript plotting library for jQuery, version 0.8.3.
-
-Copyright (c) 2007-2014 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-*/
-(function($){var options={series:{fillBetween:null}};function init(plot){function findBottomSeries(s,allseries){var i;for(i=0;i<allseries.length;++i){if(allseries[i].id===s.fillBetween){return allseries[i]}}if(typeof s.fillBetween==="number"){if(s.fillBetween<0||s.fillBetween>=allseries.length){return null}return allseries[s.fillBetween]}return null}function computeFillBottoms(plot,s,datapoints){if(s.fillBetween==null){return}var other=findBottomSeries(s,plot.getData());if(!other){return}var ps=datapoints.pointsize,points=datapoints.points,otherps=other.datapoints.pointsize,otherpoints=other.datapoints.points,newpoints=[],px,py,intery,qx,qy,bottom,withlines=s.lines.show,withbottom=ps>2&&datapoints.format[2].y,withsteps=withlines&&s.lines.steps,fromgap=true,i=0,j=0,l,m;while(true){if(i>=points.length){break}l=newpoints.length;if(points[i]==null){for(m=0;m<ps;++m){newpoints.push(points[i+m])}i+=ps}else if(j>=otherpoints.length){if(!withlines){for(m=0;m<ps;++m){newpoints.push(points[i+m])}}i+=ps}else if(otherpoints[j]==null){for(m=0;m<ps;++m){newpoints.push(null)}fromgap=true;j+=otherps}else{px=points[i];py=points[i+1];qx=otherpoints[j];qy=otherpoints[j+1];bottom=0;if(px===qx){for(m=0;m<ps;++m){newpoints.push(points[i+m])}bottom=qy;i+=ps;j+=otherps}else if(px>qx){if(withlines&&i>0&&points[i-ps]!=null){intery=py+(points[i-ps+1]-py)*(qx-px)/(points[i-ps]-px);newpoints.push(qx);newpoints.push(intery);for(m=2;m<ps;++m){newpoints.push(points[i+m])}bottom=qy}j+=otherps}else{if(fromgap&&withlines){i+=ps;continue}for(m=0;m<ps;++m){newpoints.push(points[i+m])}if(withlines&&j>0&&otherpoints[j-otherps]!=null){bottom=qy+(otherpoints[j-otherps+1]-qy)*(px-qx)/(otherpoints[j-otherps]-qx)}i+=ps}fromgap=false;if(l!==newpoints.length&&withbottom){newpoints[l+2]=bottom}}if(withsteps&&l!==newpoints.length&&l>0&&newpoints[l]!==null&&newpoints[l]!==newpoints[l-ps]&&newpoints[l+1]!==newpoints[l-ps+1]){for(m=0;m<ps;++m){newpoints[l+ps+m]=newpoints[l+m]}newpoints[l+1]=newpoints[l-ps+1]}}datapoints.points=newpoints}plot.hooks.processDatapoints.push(computeFillBottoms)}$.plot.plugins.push({init:init,options:options,name:"fillbetween",version:"1.0"})})(jQuery);
\ No newline at end of file
+!function(e){jQuery.plot.plugins.push({init:function(e){function n(e,n){var l;for(l=0;l<n.length;++l)if(n[l].id===e.fillBetween)return n[l];return"number"==typeof e.fillBetween?e.fillBetween<0||e.fillBetween>=n.length?null:n[e.fillBetween]:null}e.hooks.processDatapoints.push(function(e,l,i){if(null!=l.fillBetween){var t=n(l,e.getData());if(t){for(var s,f,o,u,p,r,h,a,g=i.pointsize,w=i.points,B=t.datapoints.pointsize,c=t.datapoints.points,v=[],d=l.lines.show,m=g>2&&i.format[2].y,y=d&&l.lines.steps,b=!0,z=0,D=0;!(z>=w.length);){if(h=v.length,null==w[z]){for(a=0;a<g;++a)v.push(w[z+a]);z+=g}else if(D>=c.length){if(!d)for(a=0;a<g;++a)v.push(w[z+a]);z+=g}else if(null==c[D]){for(a=0;a<g;++a)v.push(null);b=!0,D+=B}else{if(s=w[z],f=w[z+1],u=c[D],p=c[D+1],r=0,s===u){for(a=0;a<g;++a)v.push(w[z+a]);r=p,z+=g,D+=B}else if(s>u){if(d&&z>0&&null!=w[z-g]){for(o=f+(w[z-g+1]-f)*(u-s)/(w[z-g]-s),v.push(u),v.push(o),a=2;a<g;++a)v.push(w[z+a]);r=p}D+=B}else{if(b&&d){z+=g;continue}for(a=0;a<g;++a)v.push(w[z+a]);d&&D>0&&null!=c[D-B]&&(r=p+(c[D-B+1]-p)*(s-u)/(c[D-B]-u)),z+=g}b=!1,h!==v.length&&m&&(v[h+2]=r)}if(y&&h!==v.length&&h>0&&null!==v[h]&&v[h]!==v[h-g]&&v[h+1]!==v[h-g+1]){for(a=0;a<g;++a)v[h+g+a]=v[h+a];v[h+1]=v[h-g+1]}}i.points=v}}})},options:{series:{fillBetween:null}},name:"fillbetween",version:"1.0"})}();