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

Side by Side Diff: third_party/flot/jquery.flot.fillbetween.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.fillbetween.js ('k') | third_party/flot/jquery.flot.image.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:{fillBetween:null}};function init(plot){functio n findBottomSeries(s,allseries){var i;for(i=0;i<allseries.length;++i){if(allseri es[i].id===s.fillBetween){return allseries[i]}}if(typeof s.fillBetween==="number "){if(s.fillBetween<0||s.fillBetween>=allseries.length){return null}return allse ries[s.fillBetween]}return null}function computeFillBottoms(plot,s,datapoints){i f(s.fillBetween==null){return}var other=findBottomSeries(s,plot.getData());if(!o ther){return}var ps=datapoints.pointsize,points=datapoints.points,otherps=other. datapoints.pointsize,otherpoints=other.datapoints.points,newpoints=[],px,py,inte ry,qx,qy,bottom,withlines=s.lines.show,withbottom=ps>2&&datapoints.format[2].y,w ithsteps=withlines&&s.lines.steps,fromgap=true,i=0,j=0,l,m;while(true){if(i>=poi nts.length){break}l=newpoints.length;if(points[i]==null){for(m=0;m<ps;++m){newpo ints.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){fo r(m=0;m<ps;++m){newpoints.push(null)}fromgap=true;j+=otherps}else{px=points[i];p y=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)/(p oints[i-ps]-px);newpoints.push(qx);newpoints.push(intery);for(m=2;m<ps;++m){newp oints.push(points[i+m])}bottom=qy}j+=otherps}else{if(fromgap&&withlines){i+=ps;c ontinue}for(m=0;m<ps;++m){newpoints.push(points[i+m])}if(withlines&&j>0&&otherpo ints[j-otherps]!=null){bottom=qy+(otherpoints[j-otherps+1]-qy)*(px-qx)/(otherpoi nts[j-otherps]-qx)}i+=ps}fromgap=false;if(l!==newpoints.length&&withbottom){newp oints[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<p s;++m){newpoints[l+ps+m]=newpoints[l+m]}newpoints[l+1]=newpoints[l-ps+1]}}datapo ints.points=newpoints}plot.hooks.processDatapoints.push(computeFillBottoms)}$.pl ot.plugins.push({init:init,options:options,name:"fillbetween",version:"1.0"})})( jQuery);
OLDNEW
« no previous file with comments | « third_party/flot/jquery.flot.fillbetween.js ('k') | third_party/flot/jquery.flot.image.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698