Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* The MIT License
Copyright (c) 2011 by Michael Zinsmaier and nergal.dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
(function(b){var a={series:{curvedLines:{active:false,show:false,fit:false,fill:false,fillColor:null,lineWidth:2,curvePointFactor:20,fitPointDist:0.0001}}};function c(g){g.hooks.processOptions.push(h);function h(j,i){if(i.series.curvedLines.active){j.hooks.draw.push(e)}}function e(o,r){var l;var m=o.getData();var k=o.getPlotOffset();for(var n=0;n0){axisx=l.xaxis;axisy=l.yaxis;r.save();r.translate(k.left,k.top);r.lineJoin="round";r.strokeStyle=l.color;if(l.curvedLines.fill){var j=l.curvedLines.fillColor==null?l.color:l.curvedLines.fillColor;var p=b.color.parse(j);p.a=typeof fill=="number"?fill:0.4;p.normalize();r.fillStyle=p.toString()}r.lineWidth=l.curvedLines.lineWidth;var q=d(l.data,l.curvedLines);f(r,q,axisx,axisy,l.curvedLines.fill);r.restore()}}}function f(w,u,t,s,v){var j=2;var n=null;var m=null;var r=0;w.beginPath();for(var o=j;o=p&&q>s.max){if(p>s.max){continue}l=(s.max-q)/(p-q)*(k-l)+l;q=s.max}else{if(p>=q&&p>s.max){if(q>s.max){continue}k=(s.max-q)/(p-q)*(k-l)+l;p=s.max}}if(l<=k&&l=k&&l>t.max){if(k>t.max){continue}q=(t.max-l)/(k-l)*(p-q)+q;l=t.max}else{if(k>=l&&k>t.max){if(l>t.max){continue}p=(t.max-l)/(k-l)*(p-q)+q;k=t.max}}if(l!=n||q!=m){w.lineTo(t.p2c(l),s.p2c(q))}if(n==null){r=p}n=k;m=p;w.lineTo(t.p2c(k),s.p2c(p))}if(v){w.lineTo(t.p2c(t.max),s.p2c(s.min));w.lineTo(t.p2c(t.min),s.p2c(s.min));w.lineTo(t.p2c(t.min),s.p2c(r));w.fill()}w.stroke()}function d(L,K){var q=K.curvePointFactor*L.length;var l=new Array;var w=new Array;if(K.fit){var F=K.fitPointDist;var B=0;for(var D=0;D0){w[B]=L[D-1][1]*F+L[D][1]*(1-F)}else{w[B]=L[D][1]}B++;l[B]=L[D][0];w[B]=L[D][1];B++;l[B]=L[D][0]+0.1;if((D+1)=0;--B){m[B]=m[B]*m[B+1]+I[B]}var o=(l[x-1]-l[0])/(q-1);var u=new Array;var A=new Array;var r=new Array;u[0]=l[0];A[0]=w[0];for(B=1;B1){var z=Math.round((C+y)/2);if(l[z]>u[B]){C=z}else{y=z}}var E=(l[C]-l[y]);if(E==0){return null}var J=(l[C]-u[B])/E;var H=(u[B]-l[y])/E;A[B]=J*w[y]+H*w[C]+((J*J*J-J)*m[y]+(H*H*H-H)*m[C])*(E*E)/6;r.push(u[B]);r.push(A[B])}return r}}b.plot.plugins.push({init:c,options:a,name:"curvedLines",version:"0.2"})})(jQuery);