com.googlecode.gflot.client.resources.jquery.flot.fillarea.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gflot Show documentation
Show all versions of gflot Show documentation
A GWT module that provides widgets for creation and manipulation of charts based on the Flot JavaScript
library.
(function(b){var a={series:{fillArea:null}};function c(h){function f(A,t,J,n){function s(m,l,k){if(lm.datamax&&k!=p){m.datamax=k}}if(t.fillArea!==null&&t.fillArea!==undefined){var B=t.fillArea.length;var w=B*2+2;var F=d(w);n.format=F;var G=t.lines.steps;var u=w*J.length;u=G?u*2-1:u;var D=new Array(u);n.pointsize=w;n.points=D;var z=0;for(var E=0;E0&&B>A.length+x){break}B+=x;var D=A[B-x],l=A[B-x+p],C=A[B],k=A[B+p];if(w){if(x>0&&D!=null&&C==null){u=B;x=-x;p=o;continue}if(x<0&&B==n+x){y.fill();w=false;x=-x;p=t;B=n=u+x;continue}}if(D==null||C==null){continue}if(D<=C&&D=C&&D>s.max){if(C>s.max){continue}l=(s.max-D)/(C-D)*(k-l)+l;D=s.max}else{if(C>=D&&C>s.max){if(D>s.max){continue}k=(s.max-D)/(C-D)*(k-l)+l;C=s.max}}if(!w){y.beginPath();y.moveTo(s.p2c(D),r.p2c(l));w=true}if(l>=r.max&&k>=r.max){y.lineTo(s.p2c(D),r.p2c(r.max));y.lineTo(s.p2c(C),r.p2c(r.max));continue}else{if(l<=r.min&&k<=r.min){y.lineTo(s.p2c(D),r.p2c(r.min));y.lineTo(s.p2c(C),r.p2c(r.min));continue}}var q=D,v=C;if(l<=k&&l=r.min){D=(r.min-l)/(k-l)*(C-D)+D;l=r.min}else{if(k<=l&&k=r.min){C=(r.min-l)/(k-l)*(C-D)+D;k=r.min}}if(l>=k&&l>r.max&&k<=r.max){D=(r.max-l)/(k-l)*(C-D)+D;l=r.max}else{if(k>=l&&k>r.max&&l<=r.max){C=(r.max-l)/(k-l)*(C-D)+D;k=r.max}}if(D!=q){y.lineTo(s.p2c(q),r.p2c(l))}y.lineTo(s.p2c(D),r.p2c(l));y.lineTo(s.p2c(C),r.p2c(k));if(C!=v){y.lineTo(s.p2c(C),r.p2c(k));y.lineTo(s.p2c(v),r.p2c(k))}}}function j(n,k){var o=n.fillArea.length;var m=n.fillArea[k].opacity;if(m===null||m===undefined){m=(o-k)/(o+1)}return m}function i(n,k){var m=n.fillArea[k].color;if(m===null||m===undefined){m=n.color}return m}function e(t,y,q){if(q.fillArea!==null&&q.fillArea!==undefined){var n=t.getPlotOffset();y.save();y.translate(n.left,n.top);var x=q.datapoints.points;var k=q.datapoints.pointsize;var v=q.xaxis;var u=q.yaxis;var r=q.fillArea.length;var p,s;var w=k-1;var m=w-2;for(var o=r-1;o>0;o--){p=i(q,o);s=j(q,o);g(x,v,u,y,k,m,w,p,s);w-=2;m-=2}w=k-2;m=w-2;for(o=r-1;o>0;o--){p=i(q,o);s=j(q,o);g(x,v,u,y,k,m,w,p,s);w-=2;m-=2}if(r>0){p=i(q,0);s=j(q,0);g(x,v,u,y,k,2,3,p,s)}y.restore()}}h.hooks.processRawData.push(f);h.hooks.drawSeries.push(e)}b.plot.plugins.push({init:c,options:a,name:"fillarea",version:"1.0"})})(jQuery);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy