From: Dan Vanderkam Date: Mon, 30 Nov 2009 05:07:27 +0000 (-0500) Subject: remove dependence on PlotKit.Base as well X-Git-Tag: v1.0.0~851 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=3df0ccf0a09d28577e3a695302f1deb926ae8a83;p=dygraphs.git remove dependence on PlotKit.Base as well --- diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 0813691..5b07496 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -2,17 +2,15 @@ // All Rights Reserved. /** - * @fileoverview Subclasses various parts of PlotKit to meet the additional - * needs of Dygraph: grid overlays and error bars + * @fileoverview Based on PlotKit, but modified to meet the needs of dygraphs. + * In particular, support for: + * - grid overlays + * - error bars + * - dygraphs attribute system */ -// Subclass PlotKit.Layout to add: -// 1. Sigma/errorBars properties -// 2. Copy error terms for PlotKit.CanvasRenderer._renderLineChart - /** - * Creates a new DygraphLayout object. Options are the same as those allowed - * by the PlotKit.Layout constructor. + * Creates a new DygraphLayout object. * @param {Object} options Options for PlotKit.Layout * @return {Object} The DygraphLayout object */ @@ -121,7 +119,6 @@ DygraphLayout.prototype.evaluateWithError = function() { for (var setName in this.datasets) { var j = 0; var dataset = this.datasets[setName]; - if (PlotKit.Base.isFuncLike(dataset)) continue; for (var j = 0; j < dataset.length; j++, i++) { var item = dataset[j]; var xv = parseFloat(item[0]); @@ -189,7 +186,7 @@ DygraphCanvasRenderer = function(dygraph, element, layout, options) { this.container = this.element.parentNode; // Stuff relating to Canvas on IE support - this.isIE = PlotKit.Base.excanvasSupported(); + this.isIE = (/MSIE/.test(navigator.userAgent) && !window.opera); if (this.isIE && !isNil(G_vmlCanvasManager)) { this.IEDelay = 0.5; diff --git a/dygraph-combined.js b/dygraph-combined.js index 59b1cf1..f694954 100644 --- a/dygraph-combined.js +++ b/dygraph-combined.js @@ -3858,196 +3858,6 @@ signal=MochiKit.Signal.signal; MochiKit.Base._exportSymbols(this,MochiKit.Signal); -/*** - - PlotKit.PlotKit 0.9.1 : PACKED VERSION - - THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please - diff against the source tree, not this file. - - For more information, . - - Copyright (c) 2006. Alastair Tse. - -***/ - -try{ -if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "PlotKit depends on MochiKit.{Base,Color,DOM}"; -} -if(typeof (PlotKit)=="undefined"){ -PlotKit={}; -} -PlotKit.NAME="PlotKit"; -PlotKit.VERSION="0.8"; -PlotKit.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.toString=function(){ -return this.__repr__(); -}; -if(typeof (PlotKit.Base)=="undefined"){ -PlotKit.Base={}; -} -PlotKit.Base.NAME="PlotKit.Base"; -PlotKit.Base.VERSION=PlotKit.VERSION; -PlotKit.Base.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.Base.toString=function(){ -return this.__repr__(); -}; -PlotKit.Base.usingPrototype=function(){ -try{ -return (typeof (Object.extend)=="function"); -} -catch(e){ -return false; -} -}; -MochiKit.Base.update(PlotKit.Base,{collapse:function(_1){ -var m=MochiKit.Base; -var _3=new Array(); -for(var i=0;i<_1.length;i++){ -_3=m.concat(_3,_1[i]); -} -if(PlotKit.Base.usingPrototype()){ -delete _3.extend; -delete _3.from; -delete _3.inspect; -} -return _3; -},uniq:function(_5){ -var m=MochiKit.Base; -if(!m.isArrayLike(_5)||(_5.length<1)){ -return new Array(); -} -var _6=new Array(); -var _7=_5[0]; -_6.push(_5[0]); -for(var i=1;i<_5.length;i++){ -if(m.compare(_5[i],_7)!=0){ -_7=_5[i]; -_6.push(_5[i]); -} -} -return _6; -},palette:function(_8,_9,_10,_11){ -var _12=MochiKit.Base.isUndefinedOrNull; -var _13=new Array(); -if(_12(_11)){ -_11=0.1; -} -if(_12(_10)){ -_10=0.4; -} -if(_12(_9)){ -_9=-0.2; -} -var _14=_9; -while(_14<=_10){ -_13.push(_14); -_14+=_11; -} -var _15=function(_16,_17){ -return _16.lighterColorWithLevel(_17); -}; -return MochiKit.Base.map(partial(_15,_8),_13); -},excanvasSupported:function(){ -if(/MSIE/.test(navigator.userAgent)&&!window.opera){ -return true; -} -return false; -},findPosX:function(obj){ -var _19=0; -if(obj.offsetParent){ -while(obj.offsetParent){ -_19+=obj.offsetLeft; -obj=obj.offsetParent; -} -}else{ -if(obj.x){ -_19+=obj.x; -} -} -return _19; -},findPosY:function(obj){ -var _20=0; -if(obj.offsetParent){ -while(obj.offsetParent){ -_20+=obj.offsetTop; -obj=obj.offsetParent; -} -}else{ -if(obj.y){ -_20+=obj.y; -} -} -return _20; -},isFuncLike:function(obj){ -return (typeof (obj)=="function"); -}}); -PlotKit.Base.map=function(fn,lst){ -if(PlotKit.Base.usingPrototype()){ -var _23=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_23.push(fn(lst[x])); -} -return _23; -}else{ -return MochiKit.Base.map(fn,lst); -} -}; -PlotKit.Base.items=function(lst){ -if(PlotKit.Base.usingPrototype()){ -var _25=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_25.push([x,lst[x]]); -} -return _25; -}else{ -return MochiKit.Base.items(lst); -} -}; -PlotKit.Base.keys=function(lst){ -if(PlotKit.Base.usingPrototype()){ -var _26=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_26.push(x); -} -return _26; -}else{ -return MochiKit.Base.keys(lst); -} -}; -PlotKit.Base.baseColors=function(){ -var _27=MochiKit.Color.Color.fromHexString; -return [_27("#476fb2"),_27("#be2c2b"),_27("#85b730"),_27("#734a99"),_27("#26a1c5"),_27("#fb8707"),_27("#000000")]; -}; -PlotKit.Base.EXPORT=["baseColors","collapse","findPosX","findPosY","uniq","isFuncLike","excanvasSupported"]; -PlotKit.Base.EXPORT_OK=[]; -PlotKit.Base.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.Base.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.Base); - - Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(x,pad,r){if(typeof (r)=="undefined"){r=10}for(;parseInt(x,10)1;r/=10){x=pad.toString()+x}return x.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(d){return Date.ext.locales[d.locale].a[d.getDay()]},A:function(d){return Date.ext.locales[d.locale].A[d.getDay()]},b:function(d){return Date.ext.locales[d.locale].b[d.getMonth()]},B:function(d){return Date.ext.locales[d.locale].B[d.getMonth()]},c:"toLocaleString",C:function(d){return Date.ext.util.xPad(parseInt(d.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(d){return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100,10),0)},G:function(d){var y=d.getFullYear();var V=parseInt(Date.ext.formats.V(d),10);var W=parseInt(Date.ext.formats.W(d),10);if(W>V){y++}else{if(W===0&&V>=52){y--}}return y},H:["getHours","0"],I:function(d){var I=d.getHours()%12;return Date.ext.util.xPad(I===0?12:I,0)},j:function(d){var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*60000;var doy=parseInt(ms/60000/60/24,10)+1;return Date.ext.util.xPad(doy,0,100)},m:function(d){return Date.ext.util.xPad(d.getMonth()+1,0)},M:["getMinutes","0"],p:function(d){return Date.ext.locales[d.locale].p[d.getHours()>=12?1:0]},P:function(d){return Date.ext.locales[d.locale].P[d.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(d){var dow=d.getDay();return dow===0?7:dow},U:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0)},V:function(d){var woy=parseInt(Date.ext.formats.W(d),10);var dow1_1=(new Date(""+d.getFullYear()+"/1/1")).getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&(new Date(""+d.getFullYear()+"/12/31")).getDay()<4){idow=1}else{if(idow===0){idow=Date.ext.formats.V(new Date(""+(d.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(idow,0)},w:"getDay",W:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=7-Date.ext.formats.u(d);var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0,10)},y:function(d){return Date.ext.util.xPad(d.getFullYear()%100,0)},Y:"getFullYear",z:function(d){var o=d.getTimezoneOffset();var H=Date.ext.util.xPad(parseInt(Math.abs(o/60),10),0);var M=Date.ext.util.xPad(o%60,0);return(o>0?"-":"+")+H+M},Z:function(d){return d.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(d){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(fmt){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var d=this;while(fmt.match(/%[cDhnrRtTxXzZ]/)){fmt=fmt.replace(/%([cDhnrRtTxXzZ])/g,function(m0,m1){var f=Date.ext.aggregates[m1];return(f=="locale"?Date.ext.locales[d.locale][m1]:f)})}var str=fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(m0,m1){var f=Date.ext.formats[m1];if(typeof (f)=="string"){return d[f]()}else{if(typeof (f)=="function"){return f.call(d,d)}else{if(typeof (f)=="object"&&typeof (f[0])=="string"){return Date.ext.util.xPad(d[f[0]](),f[1])}else{return m1}}}});d=null;return str}; DygraphLayout=function(_1,_2){ this.dygraph_=_1; @@ -4134,9 +3944,6 @@ var i=0; for(var _19 in this.datasets){ var j=0; var _20=this.datasets[_19]; -if(PlotKit.Base.isFuncLike(_20)){ -continue; -} for(var j=0;j<_20.length;j++,i++){ var _21=_20[j]; var xv=parseFloat(_21[0]); @@ -4162,7 +3969,7 @@ MochiKit.Base.update(this.options,_28); this.layout=_27; this.element=MochiKit.DOM.getElement(_26); this.container=this.element.parentNode; -this.isIE=PlotKit.Base.excanvasSupported(); +this.isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera); if(this.isIE&&!isNil(G_vmlCanvasManager)){ this.IEDelay=0.5; this.maxTries=5; @@ -4622,35 +4429,63 @@ MochiKit.Base.update(this.plotter_.options,this.renderOptions_); MochiKit.Base.update(this.layoutOptions_,this.user_attrs_); MochiKit.Base.update(this.layoutOptions_,this.attrs_); }; +Dygraph.findPosX=function(obj){ +var _112=0; +if(obj.offsetParent){ +while(obj.offsetParent){ +_112+=obj.offsetLeft; +obj=obj.offsetParent; +} +}else{ +if(obj.x){ +_112+=obj.x; +} +} +return _112; +}; +Dygraph.findPosY=function(obj){ +var _113=0; +if(obj.offsetParent){ +while(obj.offsetParent){ +_113+=obj.offsetTop; +obj=obj.offsetParent; +} +}else{ +if(obj.y){ +_113+=obj.y; +} +} +return _113; +}; Dygraph.prototype.createStatusMessage_=function(){ if(!this.attr_("labelsDiv")){ -var _111=this.attr_("labelsDivWidth"); -var _112={"style":{"position":"absolute","fontSize":"14px","zIndex":10,"width":_111+"px","top":"0px","left":(this.width_-_111-2)+"px","background":"white","textAlign":"left","overflow":"hidden"}}; -MochiKit.Base.update(_112["style"],this.attr_("labelsDivStyles")); -var div=MochiKit.DOM.DIV(_112); +var _114=this.attr_("labelsDivWidth"); +var _115={"style":{"position":"absolute","fontSize":"14px","zIndex":10,"width":_114+"px","top":"0px","left":(this.width_-_114-2)+"px","background":"white","textAlign":"left","overflow":"hidden"}}; +MochiKit.Base.update(_115["style"],this.attr_("labelsDivStyles")); +var div=MochiKit.DOM.DIV(_115); MochiKit.DOM.appendChildNodes(this.graphDiv,div); this.attrs_.labelsDiv=div; } }; Dygraph.prototype.createRollInterface_=function(){ -var _113=this.attr_("showRoller")?"block":"none"; -var _114={"type":"text","size":"2","value":this.rollPeriod_,"style":{"position":"absolute","zIndex":10,"top":(this.plotter_.area.h-25)+"px","left":(this.plotter_.area.x+1)+"px","display":_113}}; -var _115=MochiKit.DOM.INPUT(_114); +var _116=this.attr_("showRoller")?"block":"none"; +var _117={"type":"text","size":"2","value":this.rollPeriod_,"style":{"position":"absolute","zIndex":10,"top":(this.plotter_.area.h-25)+"px","left":(this.plotter_.area.x+1)+"px","display":_116}}; +var _118=MochiKit.DOM.INPUT(_117); var pa=this.graphDiv; -MochiKit.DOM.appendChildNodes(pa,_115); -connect(_115,"onchange",this,function(){ -this.adjustRoll(_115.value); +MochiKit.DOM.appendChildNodes(pa,_118); +connect(_118,"onchange",this,function(){ +this.adjustRoll(_118.value); }); -return _115; +return _118; }; Dygraph.prototype.createDragInterface_=function(){ var self=this; -var _118=false; -var _119=null; -var _120=null; -var _121=null; +var _121=false; var _122=null; var _123=null; +var _124=null; +var _125=null; +var _126=null; var px=0; var py=0; var getX=function(e){ @@ -4659,166 +4494,166 @@ return e.mouse().page.x-px; var getY=function(e){ return e.mouse().page.y-py; }; -connect(this.hidden_,"onmousemove",function(_128){ -if(_118){ -_121=getX(_128); -_122=getY(_128); -self.drawZoomRect_(_119,_121,_123); -_123=_121; +connect(this.hidden_,"onmousemove",function(_131){ +if(_121){ +_124=getX(_131); +_125=getY(_131); +self.drawZoomRect_(_122,_124,_126); +_126=_124; } }); -connect(this.hidden_,"onmousedown",function(_129){ -_118=true; -px=PlotKit.Base.findPosX(self.canvas_); -py=PlotKit.Base.findPosY(self.canvas_); -_119=getX(_129); -_120=getY(_129); +connect(this.hidden_,"onmousedown",function(_132){ +_121=true; +px=Dygraph.findPosX(self.canvas_); +py=Dygraph.findPosY(self.canvas_); +_122=getX(_132); +_123=getY(_132); }); -connect(document,"onmouseup",this,function(_130){ -if(_118){ -_118=false; -_119=null; -_120=null; +connect(document,"onmouseup",this,function(_133){ +if(_121){ +_121=false; +_122=null; +_123=null; } }); -connect(this.hidden_,"onmouseout",this,function(_131){ -if(_118){ -_121=null; -_122=null; +connect(this.hidden_,"onmouseout",this,function(_134){ +if(_121){ +_124=null; +_125=null; } }); -connect(this.hidden_,"onmouseup",this,function(_132){ -if(_118){ -_118=false; -_121=getX(_132); -_122=getY(_132); -var _133=Math.abs(_121-_119); -var _134=Math.abs(_122-_120); -if(_133<2&&_134<2&&self.attr_("clickCallback")!=null&&self.lastx_!=undefined){ -self.attr_("clickCallback")(_132,new Date(self.lastx_)); -} -if(_133>=10){ -self.doZoom_(Math.min(_119,_121),Math.max(_119,_121)); +connect(this.hidden_,"onmouseup",this,function(_135){ +if(_121){ +_121=false; +_124=getX(_135); +_125=getY(_135); +var _136=Math.abs(_124-_122); +var _137=Math.abs(_125-_123); +if(_136<2&&_137<2&&self.attr_("clickCallback")!=null&&self.lastx_!=undefined){ +self.attr_("clickCallback")(_135,new Date(self.lastx_)); +} +if(_136>=10){ +self.doZoom_(Math.min(_122,_124),Math.max(_122,_124)); }else{ self.canvas_.getContext("2d").clearRect(0,0,self.canvas_.width,self.canvas_.height); } -_119=null; -_120=null; +_122=null; +_123=null; } }); -connect(this.hidden_,"ondblclick",this,function(_135){ +connect(this.hidden_,"ondblclick",this,function(_138){ self.dateWindow_=null; self.drawGraph_(self.rawData_); -var _136=self.rawData_[0][0]; -var _137=self.rawData_[self.rawData_.length-1][0]; +var _139=self.rawData_[0][0]; +var _140=self.rawData_[self.rawData_.length-1][0]; if(self.attr_("zoomCallback")){ -self.attr_("zoomCallback")(_136,_137); +self.attr_("zoomCallback")(_139,_140); } }); }; -Dygraph.prototype.drawZoomRect_=function(_138,endX,_140){ +Dygraph.prototype.drawZoomRect_=function(_141,endX,_143){ var ctx=this.canvas_.getContext("2d"); -if(_140){ -ctx.clearRect(Math.min(_138,_140),0,Math.abs(_138-_140),this.height_); +if(_143){ +ctx.clearRect(Math.min(_141,_143),0,Math.abs(_141-_143),this.height_); } -if(endX&&_138){ +if(endX&&_141){ ctx.fillStyle="rgba(128,128,128,0.33)"; -ctx.fillRect(Math.min(_138,endX),0,Math.abs(endX-_138),this.height_); +ctx.fillRect(Math.min(_141,endX),0,Math.abs(endX-_141),this.height_); } }; -Dygraph.prototype.doZoom_=function(lowX,_142){ -var _143=this.layout_.points; -var _144=null; -var _145=null; -for(var i=0;i<_143.length;i++){ -var cx=_143[i].canvasx; -var x=_143[i].xval; -if(cx_144)){ -_144=x; +Dygraph.prototype.doZoom_=function(lowX,_145){ +var _146=this.layout_.points; +var _147=null; +var _148=null; +for(var i=0;i<_146.length;i++){ +var cx=_146[i].canvasx; +var x=_146[i].xval; +if(cx_147)){ +_147=x; } -if(cx>_142&&(_145==null||x<_145)){ -_145=x; +if(cx>_145&&(_148==null||x<_148)){ +_148=x; } } -if(_144==null){ -_144=_143[0].xval; +if(_147==null){ +_147=_146[0].xval; } -if(_145==null){ -_145=_143[_143.length-1].xval; +if(_148==null){ +_148=_146[_146.length-1].xval; } -this.dateWindow_=[_144,_145]; +this.dateWindow_=[_147,_148]; this.drawGraph_(this.rawData_); if(this.attr_("zoomCallback")){ -this.attr_("zoomCallback")(_144,_145); +this.attr_("zoomCallback")(_147,_148); } }; -Dygraph.prototype.mouseMove_=function(_147){ -var _148=_147.mouse().page.x-PlotKit.Base.findPosX(this.hidden_); -var _149=this.layout_.points; -var _150=-1; -var _151=-1; -var _152=1e+100; +Dygraph.prototype.mouseMove_=function(_150){ +var _151=_150.mouse().page.x-Dygraph.findPosX(this.hidden_); +var _152=this.layout_.points; +var _153=-1; +var _154=-1; +var _155=1e+100; var idx=-1; -for(var i=0;i<_149.length;i++){ -var dist=Math.abs(_149[i].canvasx-_148); -if(dist>_152){ +for(var i=0;i<_152.length;i++){ +var dist=Math.abs(_152[i].canvasx-_151); +if(dist>_155){ break; } -_152=dist; +_155=dist; idx=i; } if(idx>=0){ -_150=_149[idx].xval; +_153=_152[idx].xval; } -if(_148>_149[_149.length-1].canvasx){ -_150=_149[_149.length-1].xval; +if(_151>_152[_152.length-1].canvasx){ +_153=_152[_152.length-1].xval; } -var _155=[]; -for(var i=0;i<_149.length;i++){ -if(_149[i].xval==_150){ -_155.push(_149[i]); +var _158=[]; +for(var i=0;i<_152.length;i++){ +if(_152[i].xval==_153){ +_158.push(_152[i]); } } -var _156=this.attr_("highlightCircleSize"); +var _159=this.attr_("highlightCircleSize"); var ctx=this.canvas_.getContext("2d"); if(this.previousVerticalX_>=0){ var px=this.previousVerticalX_; -ctx.clearRect(px-_156-1,0,2*_156+2,this.height_); +ctx.clearRect(px-_159-1,0,2*_159+2,this.height_); } var isOK=function(x){ return x&&!isNaN(x); }; -if(_155.length>0){ -var _148=_155[0].canvasx; -var _158=this.attr_("xValueFormatter")(_150,this)+":"; +if(_158.length>0){ +var _151=_158[0].canvasx; +var _161=this.attr_("xValueFormatter")(_153,this)+":"; var clen=this.colors_.length; -for(var i=0;i<_155.length;i++){ -if(!isOK(_155[i].canvasy)){ +for(var i=0;i<_158.length;i++){ +if(!isOK(_158[i].canvasy)){ continue; } if(this.attr_("labelsSeparateLines")){ -_158+="
"; +_161+="
"; } -var _160=_155[i]; -_158+=" "+_160.name+":"+this.round_(_160.yval,2); +var _163=_158[i]; +_161+=" "+_163.name+":"+this.round_(_163.yval,2); } -this.attr_("labelsDiv").innerHTML=_158; -this.lastx_=_150; +this.attr_("labelsDiv").innerHTML=_161; +this.lastx_=_153; ctx.save(); -for(var i=0;i<_155.length;i++){ -if(!isOK(_155[i%clen].canvasy)){ +for(var i=0;i<_158.length;i++){ +if(!isOK(_158[i%clen].canvasy)){ continue; } ctx.beginPath(); ctx.fillStyle=this.colors_[i%clen].toRGBString(); -ctx.arc(_148,_155[i%clen].canvasy,_156,0,360,false); +ctx.arc(_151,_158[i%clen].canvasy,_159,0,360,false); ctx.fill(); } ctx.restore(); -this.previousVerticalX_=_148; +this.previousVerticalX_=_151; } }; -Dygraph.prototype.mouseOut_=function(_161){ +Dygraph.prototype.mouseOut_=function(_164){ var ctx=this.canvas_.getContext("2d"); ctx.clearRect(0,0,this.width_,this.height_); this.attr_("labelsDiv").innerHTML=""; @@ -4831,34 +4666,34 @@ return ""+x; } }; Dygraph.prototype.hmsString_=function(date){ -var _163=Dygraph.zeropad; +var _166=Dygraph.zeropad; var d=new Date(date); if(d.getSeconds()){ -return _163(d.getHours())+":"+_163(d.getMinutes())+":"+_163(d.getSeconds()); +return _166(d.getHours())+":"+_166(d.getMinutes())+":"+_166(d.getSeconds()); }else{ if(d.getMinutes()){ -return _163(d.getHours())+":"+_163(d.getMinutes()); +return _166(d.getHours())+":"+_166(d.getMinutes()); }else{ -return _163(d.getHours()); +return _166(d.getHours()); } } }; Dygraph.dateString_=function(date,self){ -var _165=Dygraph.zeropad; +var _168=Dygraph.zeropad; var d=new Date(date); var year=""+d.getFullYear(); -var _167=_165(d.getMonth()+1); -var day=_165(d.getDate()); +var _170=_168(d.getMonth()+1); +var day=_168(d.getDate()); var ret=""; var frac=d.getHours()*3600+d.getMinutes()*60+d.getSeconds(); if(frac){ ret=" "+self.hmsString_(date); } -return year+"/"+_167+"/"+day+ret; +return year+"/"+_170+"/"+day+ret; }; -Dygraph.prototype.round_=function(num,_171){ -var _172=Math.pow(10,_171); -return Math.round(num*_172)/_172; +Dygraph.prototype.round_=function(num,_174){ +var _175=Math.pow(10,_174); +return Math.round(num*_175)/_175; }; Dygraph.prototype.loadedEvent_=function(data){ this.rawData_=this.parseCSV_(data); @@ -4867,16 +4702,16 @@ this.drawGraph_(this.rawData_); Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"]; Dygraph.prototype.addXTicks_=function(){ -var _174,endDate; +var _177,endDate; if(this.dateWindow_){ -_174=this.dateWindow_[0]; +_177=this.dateWindow_[0]; endDate=this.dateWindow_[1]; }else{ -_174=this.rawData_[0][0]; +_177=this.rawData_[0][0]; endDate=this.rawData_[this.rawData_.length-1][0]; } -var _175=this.attr_("xTicker")(_174,endDate,this); -this.layout_.updateOptions({xTicks:_175}); +var _178=this.attr_("xTicker")(_177,endDate,this); +this.layout_.updateOptions({xTicks:_178}); }; Dygraph.SECONDLY=0; Dygraph.TEN_SECONDLY=1; @@ -4905,161 +4740,161 @@ Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600; Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600*6; Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400; Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800; -Dygraph.prototype.NumXTicks=function(_176,_177,_178){ -if(_178=Dygraph.DAILY){ -_187.push({v:t,label:new Date(t+3600*1000).strftime(_189)}); +if(frac==0||_189>=Dygraph.DAILY){ +_190.push({v:t,label:new Date(t+3600*1000).strftime(_192)}); }else{ -_187.push({v:t,label:this.hmsString_(t)}); +_190.push({v:t,label:this.hmsString_(t)}); } } }else{ -var _191; -var _192=1; -if(_186==Dygraph.MONTHLY){ -_191=[0,1,2,3,4,5,6,7,8,9,10,11,12]; +var _194; +var _195=1; +if(_189==Dygraph.MONTHLY){ +_194=[0,1,2,3,4,5,6,7,8,9,10,11,12]; }else{ -if(_186==Dygraph.QUARTERLY){ -_191=[0,3,6,9]; +if(_189==Dygraph.QUARTERLY){ +_194=[0,3,6,9]; }else{ -if(_186==Dygraph.BIANNUAL){ -_191=[0,6]; +if(_189==Dygraph.BIANNUAL){ +_194=[0,6]; }else{ -if(_186==Dygraph.ANNUAL){ -_191=[0]; +if(_189==Dygraph.ANNUAL){ +_194=[0]; }else{ -if(_186==Dygraph.DECADAL){ -_191=[0]; -_192=10; +if(_189==Dygraph.DECADAL){ +_194=[0]; +_195=10; } } } } } -var _193=new Date(_184).getFullYear(); -var _194=new Date(_185).getFullYear(); -var _195=Dygraph.zeropad; -for(var i=_193;i<=_194;i++){ -if(i%_192!=0){ +var _196=new Date(_187).getFullYear(); +var _197=new Date(_188).getFullYear(); +var _198=Dygraph.zeropad; +for(var i=_196;i<=_197;i++){ +if(i%_195!=0){ continue; } -for(var j=0;j<_191.length;j++){ -var _196=i+"/"+_195(1+_191[j])+"/01"; -var t=Date.parse(_196); -if(t<_184||t>_185){ +for(var j=0;j<_194.length;j++){ +var _199=i+"/"+_198(1+_194[j])+"/01"; +var t=Date.parse(_199); +if(t<_187||t>_188){ continue; } -_187.push({v:t,label:new Date(t).strftime("%b %y")}); +_190.push({v:t,label:new Date(t).strftime("%b %y")}); } } } -return _187; +return _190; }; -Dygraph.dateTicker=function(_197,_198,self){ -var _199=-1; +Dygraph.dateTicker=function(_200,_201,self){ +var _202=-1; for(var i=0;i=self.attr_("pixelsPerXLabel")){ -_199=i; +var _203=self.NumXTicks(_200,_201,i); +if(self.width_/_203>=self.attr_("pixelsPerXLabel")){ +_202=i; break; } } -if(_199>=0){ -return self.GetXAxis(_197,_198,_199); +if(_202>=0){ +return self.GetXAxis(_200,_201,_202); }else{ } }; Dygraph.numericTicks=function(minV,maxV,self){ -var _203=[1,2,5]; -var _204,low_val,high_val,nTicks; -var _205=self.attr_("pixelsPerYLabel"); +var _206=[1,2,5]; +var _207,low_val,high_val,nTicks; +var _208=self.attr_("pixelsPerYLabel"); for(var i=-10;i<50;i++){ -var _206=Math.pow(10,i); -for(var j=0;j<_203.length;j++){ -_204=_206*_203[j]; -low_val=Math.floor(minV/_204)*_204; -high_val=Math.ceil(maxV/_204)*_204; -nTicks=(high_val-low_val)/_204; -var _207=self.height_/nTicks; -if(_207>_205){ +var _209=Math.pow(10,i); +for(var j=0;j<_206.length;j++){ +_207=_209*_206[j]; +low_val=Math.floor(minV/_207)*_207; +high_val=Math.ceil(maxV/_207)*_207; +nTicks=(high_val-low_val)/_207; +var _210=self.height_/nTicks; +if(_210>_208){ break; } } -if(_207>_205){ +if(_210>_208){ break; } } -var _208=[]; +var _211=[]; for(var i=0;i=k*k*k){ -_210=self.round_(_209/(k*k*k),1)+"B"; +if(_212>=k*k*k){ +_213=self.round_(_212/(k*k*k),1)+"B"; }else{ -if(_209>=k*k){ -_210=self.round_(_209/(k*k),1)+"M"; +if(_212>=k*k){ +_213=self.round_(_212/(k*k),1)+"M"; }else{ -if(_209>=k){ -_210=self.round_(_209/k,1)+"K"; +if(_212>=k){ +_213=self.round_(_212/k,1)+"K"; } } } } -_208.push({label:_210,v:_209}); +_211.push({label:_213,v:_212}); } -return _208; +return _211; }; Dygraph.prototype.addYTicks_=function(minY,maxY){ -var _214=Dygraph.numericTicks(minY,maxY,this); -this.layout_.updateOptions({yAxis:[minY,maxY],yTicks:_214}); +var _217=Dygraph.numericTicks(minY,maxY,this); +this.layout_.updateOptions({yAxis:[minY,maxY],yTicks:_217}); }; -Dygraph.prototype.extremeValues_=function(_215){ +Dygraph.prototype.extremeValues_=function(_218){ var minY=null,maxY=null; var bars=this.attr_("errorBars")||this.attr_("customBars"); if(bars){ -for(var j=0;j<_215.length;j++){ -var y=_215[j][1][0]; +for(var j=0;j<_218.length;j++){ +var y=_218[j][1][0]; if(!y){ continue; } -var low=y-_215[j][1][1]; -var high=y+_215[j][1][2]; +var low=y-_218[j][1][1]; +var high=y+_218[j][1][2]; if(low>y){ low=y; } @@ -5074,8 +4909,8 @@ minY=low; } } }else{ -for(var j=0;j<_215.length;j++){ -var y=_215[j][1]; +for(var j=0;j<_218.length;j++){ +var y=_218[j][1]; if(!y){ continue; } @@ -5095,64 +4930,64 @@ this.layout_.removeAllDatasets(); this.setColors_(); this.attrs_["pointSize"]=0.5*this.attr_("highlightCircleSize"); for(var i=1;i=low&&_219[k][0]<=high){ -_220.push(_219[k]); +var _223=[]; +for(var k=0;k<_222.length;k++){ +if(_222[k][0]>=low&&_222[k][0]<=high){ +_223.push(_222[k]); } } -_219=_220; +_222=_223; } -var _221=this.extremeValues_(_219); -var _222=_221[0]; -var _223=_221[1]; -if(!minY||_222maxY){ -maxY=_223; +if(!maxY||_226>maxY){ +maxY=_226; } if(bars){ var vals=[]; -for(var j=0;j<_219.length;j++){ -vals[j]=[_219[j][0],_219[j][1][0],_219[j][1][1],_219[j][1][2]]; +for(var j=0;j<_222.length;j++){ +vals[j]=[_222[j][0],_222[j][1][0],_222[j][1][1],_222[j][1][2]]; } this.layout_.addDataset(this.attr_("labels")[i],vals); }else{ -this.layout_.addDataset(this.attr_("labels")[i],_219); +this.layout_.addDataset(this.attr_("labels")[i],_222); } } if(this.valueRange_!=null){ this.addYTicks_(this.valueRange_[0],this.valueRange_[1]); }else{ var span=maxY-minY; -var _226=maxY+0.1*span; -var _227=minY-0.1*span; -if(_227<0&&minY>=0){ -_227=0; +var _229=maxY+0.1*span; +var _230=minY-0.1*span; +if(_230<0&&minY>=0){ +_230=0; } -if(_226>0&&maxY<=0){ -_226=0; +if(_229>0&&maxY<=0){ +_229=0; } if(this.attr_("includeZero")){ if(maxY<0){ -_226=0; +_229=0; } if(minY>0){ -_227=0; +_230=0; } } -this.addYTicks_(_227,_226); +this.addYTicks_(_230,_229); } this.addXTicks_(); this.layout_.evaluateWithError(); @@ -5160,44 +4995,44 @@ this.plotter_.clear(); this.plotter_.render(); this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height); }; -Dygraph.prototype.rollingAverage=function(_228,_229){ -if(_228.length<2){ -return _228; +Dygraph.prototype.rollingAverage=function(_231,_232){ +if(_231.length<2){ +return _231; } -var _229=Math.min(_229,_228.length-1); -var _230=[]; -var _231=this.attr_("sigma"); +var _232=Math.min(_232,_231.length-1); +var _233=[]; +var _234=this.attr_("sigma"); if(this.fractions_){ var num=0; var den=0; var mult=100; -for(var i=0;i<_228.length;i++){ -num+=_228[i][1][0]; -den+=_228[i][1][1]; -if(i-_229>=0){ -num-=_228[i-_229][1][0]; -den-=_228[i-_229][1][1]; -} -var date=_228[i][0]; -var _234=den?num/den:0; +for(var i=0;i<_231.length;i++){ +num+=_231[i][1][0]; +den+=_231[i][1][1]; +if(i-_232>=0){ +num-=_231[i-_232][1][0]; +den-=_231[i-_232][1][1]; +} +var date=_231[i][0]; +var _237=den?num/den:0; if(this.attr_("errorBars")){ if(this.wilsonInterval_){ if(den){ -var p=_234<0?0:_234,n=den; -var pm=_231*Math.sqrt(p*(1-p)/n+_231*_231/(4*n*n)); -var _237=1+_231*_231/den; -var low=(p+_231*_231/(2*den)-pm)/_237; -var high=(p+_231*_231/(2*den)+pm)/_237; -_230[i]=[date,[p*mult,(p-low)*mult,(high-p)*mult]]; +var p=_237<0?0:_237,n=den; +var pm=_234*Math.sqrt(p*(1-p)/n+_234*_234/(4*n*n)); +var _240=1+_234*_234/den; +var low=(p+_234*_234/(2*den)-pm)/_240; +var high=(p+_234*_234/(2*den)+pm)/_240; +_233[i]=[date,[p*mult,(p-low)*mult,(high-p)*mult]]; }else{ -_230[i]=[date,[0,0,0]]; +_233[i]=[date,[0,0,0]]; } }else{ -var _238=den?_231*Math.sqrt(_234*(1-_234)/den):1; -_230[i]=[date,[mult*_234,mult*_238,mult*_238]]; +var _241=den?_234*Math.sqrt(_237*(1-_237)/den):1; +_233[i]=[date,[mult*_237,mult*_241,mult*_241]]; } }else{ -_230[i]=[date,mult*_234]; +_233[i]=[date,mult*_237]; } } }else{ @@ -5205,105 +5040,105 @@ if(this.attr_("customBars")){ var low=0; var mid=0; var high=0; -var _240=0; -for(var i=0;i<_228.length;i++){ -var data=_228[i][1]; +var _243=0; +for(var i=0;i<_231.length;i++){ +var data=_231[i][1]; var y=data[1]; -_230[i]=[_228[i][0],[y,y-data[0],data[2]-y]]; +_233[i]=[_231[i][0],[y,y-data[0],data[2]-y]]; low+=data[0]; mid+=y; high+=data[2]; -_240+=1; -if(i-_229>=0){ -var prev=_228[i-_229]; +_243+=1; +if(i-_232>=0){ +var prev=_231[i-_232]; low-=prev[1][0]; mid-=prev[1][1]; high-=prev[1][2]; -_240-=1; +_243-=1; } -_230[i]=[_228[i][0],[1*mid/_240,1*(mid-low)/_240,1*(high-mid)/_240]]; +_233[i]=[_231[i][0],[1*mid/_243,1*(mid-low)/_243,1*(high-mid)/_243]]; } }else{ -var _242=Math.min(_229-1,_228.length-2); +var _245=Math.min(_232-1,_231.length-2); if(!this.attr_("errorBars")){ -if(_229==1){ -return _228; +if(_232==1){ +return _231; } -for(var i=0;i<_228.length;i++){ +for(var i=0;i<_231.length;i++){ var sum=0; -var _244=0; -for(var j=Math.max(0,i-_229+1);j=0||str.indexOf("/")>=0||isNaN(parseFloat(str))){ -_249=true; +_252=true; }else{ if(str.length==8&&str>"19700101"&&str<"20371231"){ -_249=true; +_252=true; } } -if(_249){ +if(_252){ this.attrs_.xValueFormatter=Dygraph.dateString_; this.attrs_.xValueParser=Dygraph.dateParser; this.attrs_.xTicker=Dygraph.dateTicker; @@ -5319,57 +5154,57 @@ this.attrs_.xTicker=Dygraph.numericTicks; }; Dygraph.prototype.parseCSV_=function(data){ var ret=[]; -var _250=data.split("\n"); -var _251=0; +var _253=data.split("\n"); +var _254=0; if(this.labelsFromCSV_){ -_251=1; -this.attrs_.labels=_250[0].split(","); -} -var _252; -var _253=false; -var _254=this.attr_("labels").length; -for(var i=_251;i<_250.length;i++){ -var line=_250[i]; +_254=1; +this.attrs_.labels=_253[0].split(","); +} +var _255; +var _256=false; +var _257=this.attr_("labels").length; +for(var i=_254;i<_253.length;i++){ +var line=_253[i]; if(line.length==0){ continue; } -var _256=line.split(","); -if(_256.length<2){ +var _259=line.split(","); +if(_259.length<2){ continue; } -var _257=[]; -if(!_253){ -this.detectTypeFromString_(_256[0]); -_252=this.attr_("xValueParser"); -_253=true; +var _260=[]; +if(!_256){ +this.detectTypeFromString_(_259[0]); +_255=this.attr_("xValueParser"); +_256=true; } -_257[0]=_252(_256[0],this); +_260[0]=_255(_259[0],this); if(this.fractions_){ -for(var j=1;j<_256.length;j++){ -var vals=_256[j].split("/"); -_257[j]=[parseFloat(vals[0]),parseFloat(vals[1])]; +for(var j=1;j<_259.length;j++){ +var vals=_259[j].split("/"); +_260[j]=[parseFloat(vals[0]),parseFloat(vals[1])]; } }else{ if(this.attr_("errorBars")){ -for(var j=1;j<_256.length;j+=2){ -_257[(j+1)/2]=[parseFloat(_256[j]),parseFloat(_256[j+1])]; +for(var j=1;j<_259.length;j+=2){ +_260[(j+1)/2]=[parseFloat(_259[j]),parseFloat(_259[j+1])]; } }else{ if(this.attr_("customBars")){ -for(var j=1;j<_256.length;j++){ -var vals=_256[j].split(";"); -_257[j]=[parseFloat(vals[0]),parseFloat(vals[1]),parseFloat(vals[2])]; +for(var j=1;j<_259.length;j++){ +var vals=_259[j].split(";"); +_260[j]=[parseFloat(vals[0]),parseFloat(vals[1]),parseFloat(vals[2])]; } }else{ -for(var j=1;j<_256.length;j++){ -_257[j]=parseFloat(_256[j]); +for(var j=1;j<_259.length;j++){ +_260[j]=parseFloat(_259[j]); } } } } -ret.push(_257); -if(_257.length!=_254){ -this.error("Number of columns in line "+i+" ("+_257.length+") does not agree with number of labels ("+_254+") "+line); +ret.push(_260); +if(_260.length!=_257){ +this.error("Number of columns in line "+i+" ("+_260.length+") does not agree with number of labels ("+_257+") "+line); } } return ret; @@ -5393,19 +5228,19 @@ this.attrs_.labels.push("Y"+i); if(MochiKit.Base.isDateLike(data[0][0])){ this.attrs_.xValueFormatter=Dygraph.dateString_; this.attrs_.xTicker=Dygraph.dateTicker; -var _258=MochiKit.Base.clone(data); +var _261=MochiKit.Base.clone(data); for(var i=0;i=0){ this.loadedEvent_(this.file_); }else{ var req=new XMLHttpRequest(); -var _265=this; +var _268=this; req.onreadystatechange=function(){ if(req.readyState==4){ if(req.status==200){ -_265.loadedEvent_(req.responseText); +_268.loadedEvent_(req.responseText); } } }; @@ -5494,36 +5329,36 @@ this.error("Unknown data format: "+(typeof this.file_)); } } }; -Dygraph.prototype.updateOptions=function(_266){ -if(_266.rollPeriod){ -this.rollPeriod_=_266.rollPeriod; +Dygraph.prototype.updateOptions=function(_269){ +if(_269.rollPeriod){ +this.rollPeriod_=_269.rollPeriod; } -if(_266.dateWindow){ -this.dateWindow_=_266.dateWindow; +if(_269.dateWindow){ +this.dateWindow_=_269.dateWindow; } -if(_266.valueRange){ -this.valueRange_=_266.valueRange; +if(_269.valueRange){ +this.valueRange_=_269.valueRange; } -MochiKit.Base.update(this.user_attrs_,_266); +MochiKit.Base.update(this.user_attrs_,_269); this.labelsFromCSV_=(this.attr_("labels")==null); this.layout_.updateOptions({"errorBars":this.attr_("errorBars")}); -if(_266["file"]&&_266["file"]!=this.file_){ -this.file_=_266["file"]; +if(_269["file"]&&_269["file"]!=this.file_){ +this.file_=_269["file"]; this.start_(); }else{ this.drawGraph_(this.rawData_); } }; -Dygraph.prototype.adjustRoll=function(_267){ -this.rollPeriod_=_267; +Dygraph.prototype.adjustRoll=function(_270){ +this.rollPeriod_=_270; this.drawGraph_(this.rawData_); }; -Dygraph.GVizChart=function(_268){ -this.container=_268; +Dygraph.GVizChart=function(_271){ +this.container=_271; }; -Dygraph.GVizChart.prototype.draw=function(data,_269){ +Dygraph.GVizChart.prototype.draw=function(data,_272){ this.container.innerHTML=""; -this.date_graph=new Dygraph(this.container,data,_269); +this.date_graph=new Dygraph(this.container,data,_272); }; DateGraph=Dygraph; diff --git a/dygraph.js b/dygraph.js index 445bfbf..df41fdc 100644 --- a/dygraph.js +++ b/dygraph.js @@ -353,6 +353,34 @@ Dygraph.prototype.setColors_ = function() { MochiKit.Base.update(this.layoutOptions_, this.attrs_); } +// The following functions are from quirksmode.org +// http://www.quirksmode.org/js/findpos.html +Dygraph.findPosX = function(obj) { + var curleft = 0; + if (obj.offsetParent) { + while (obj.offsetParent) { + curleft += obj.offsetLeft; + obj = obj.offsetParent; + } + } + else if (obj.x) + curleft += obj.x; + return curleft; +}; + +Dygraph.findPosY = function(obj) { + var curtop = 0; + if (obj.offsetParent) { + while (obj.offsetParent) { + curtop += obj.offsetTop; + obj = obj.offsetParent; + } + } + else if (obj.y) + curtop += obj.y; + return curtop; +}; + /** * Create the div that contains information on the selected point(s) * This goes in the top right of the canvas, unless an external div has already @@ -439,8 +467,8 @@ Dygraph.prototype.createDragInterface_ = function() { // Track the beginning of drag events connect(this.hidden_, 'onmousedown', function(event) { mouseDown = true; - px = PlotKit.Base.findPosX(self.canvas_); - py = PlotKit.Base.findPosY(self.canvas_); + px = Dygraph.findPosX(self.canvas_); + py = Dygraph.findPosY(self.canvas_); dragStartX = getX(event); dragStartY = getY(event); }); @@ -574,7 +602,7 @@ Dygraph.prototype.doZoom_ = function(lowX, highX) { * @private */ Dygraph.prototype.mouseMove_ = function(event) { - var canvasx = event.mouse().page.x - PlotKit.Base.findPosX(this.hidden_); + var canvasx = event.mouse().page.x - Dygraph.findPosX(this.hidden_); var points = this.layout_.points; var lastx = -1; diff --git a/generate-combined.sh b/generate-combined.sh index 92740dd..d39b9f4 100755 --- a/generate-combined.sh +++ b/generate-combined.sh @@ -3,12 +3,6 @@ # This packed JS includes a partial copy of MochiKit and PlotKit. # It winds up being 146k uncompressed and 37k gzipped. -# Generate the packed version of the subset of PlotKit needed by dygraphs. -# This saves ~30k -cd plotkit_v091 -./scripts/pack.py Base > /tmp/plotkit-packed.js -cd .. - # Do the same for MochiKit. This save another 77k. cd mochikit_v14 ./scripts/pack.py \ @@ -27,7 +21,6 @@ java -jar plotkit_v091/scripts/custom_rhino.jar -c /tmp/dygraph.js \ cat \ /tmp/mochikit-packed.js \ -/tmp/plotkit-packed.js \ strftime/strftime-min.js \ /tmp/dygraph-packed.js \ > dygraph-combined.js