Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: third_party/flot/jquery.flot.stack.min.js

Issue 1235773002: Add jquery and flot to catapult/third_party. (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Rebased Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/flot/jquery.flot.stack.js ('k') | third_party/flot/jquery.flot.symbol.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Javascript plotting library for jQuery, version 0.8.3.
2
3 Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 Licensed under the MIT license.
5
6 */
7 (function($){var options={series:{stack:null}};function init(plot){function find MatchingSeries(s,allseries){var res=null;for(var i=0;i<allseries.length;++i){if( s==allseries[i])break;if(allseries[i].stack==s.stack)res=allseries[i]}return res }function stackData(plot,s,datapoints){if(s.stack==null||s.stack===false)return; var other=findMatchingSeries(s,plot.getData());if(!other)return;var ps=datapoint s.pointsize,points=datapoints.points,otherps=other.datapoints.pointsize,otherpoi nts=other.datapoints.points,newpoints=[],px,py,intery,qx,qy,bottom,withlines=s.l ines.show,horizontal=s.bars.horizontal,withbottom=ps>2&&(horizontal?datapoints.f ormat[2].x:datapoints.format[2].y),withsteps=withlines&&s.lines.steps,fromgap=tr ue,keyOffset=horizontal?1:0,accumulateOffset=horizontal?0:1,i=0,j=0,l,m;while(tr ue){if(i>=points.length)break;l=newpoints.length;if(points[i]==null){for(m=0;m<p s;++m)newpoints.push(points[i+m]);i+=ps}else if(j>=otherpoints.length){if(!withl ines){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=poi nts[i+keyOffset];py=points[i+accumulateOffset];qx=otherpoints[j+keyOffset];qy=ot herpoints[j+accumulateOffset];bottom=0;if(px==qx){for(m=0;m<ps;++m)newpoints.pus h(points[i+m]);newpoints[l+accumulateOffset]+=qy;bottom=qy;i+=ps;j+=otherps}else if(px>qx){if(withlines&&i>0&&points[i-ps]!=null){intery=py+(points[i-ps+accumul ateOffset]-py)*(qx-px)/(points[i-ps+keyOffset]-px);newpoints.push(qx);newpoints. push(intery+qy);for(m=2;m<ps;++m)newpoints.push(points[i+m]);bottom=qy}j+=otherp s}else{if(fromgap&&withlines){i+=ps;continue}for(m=0;m<ps;++m)newpoints.push(poi nts[i+m]);if(withlines&&j>0&&otherpoints[j-otherps]!=null)bottom=qy+(otherpoints [j-otherps+accumulateOffset]-qy)*(px-qx)/(otherpoints[j-otherps+keyOffset]-qx);n ewpoints[l+accumulateOffset]+=bottom;i+=ps}fromgap=false;if(l!=newpoints.length& &withbottom)newpoints[l+2]+=bottom}if(withsteps&&l!=newpoints.length&&l>0&&newpo ints[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(stackData)}$. plot.plugins.push({init:init,options:options,name:"stack",version:"1.2"})})(jQue ry);
OLDNEW
« no previous file with comments | « third_party/flot/jquery.flot.stack.js ('k') | third_party/flot/jquery.flot.symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698