text: /*
   * Copyright (c) 2001-2007, TIBCO Software Inc.
   * Use, modification, and distribution subject to terms of license.
   */
  jsx3.require("jsx3.chart.ChartComponent","jsx3.xml.Cacheable","jsx3.chart.Series");jsx3.Class.defineClass("jsx3.chart.Chart",jsx3.chart.ChartComponent,[jsx3.xml.Cacheable,jsx3.xml.CDF],function(d,f){var _=jsx3.vector;var lc=_.Fill;var M=jsx3.chart;d.tv=1;d.qj=2;d.ZINDEX_DATA=10;d.Xj=990;d.Nh=1000;d.id=20;d.DEFAULT_FILLS=[new lc(3381708,1),new lc(16763904,1),new lc(10079334,1),new lc(13408563,1),new lc(13421772,1),new lc(13382502,1),new lc(16751103,1),new lc(6710886,1)];d.DEFAULT_STROKES=[];d.PART_LEGEND=1<<0;d.Sz={top:1,right:1,bottom:1,left:1};f.init=function(a,e,h,o,i){this.jsxsuper(a);this.setDimensions(e,h,o,i);this.titlePlacement=M.QTOP;this.legendPlacement=M.QRIGHT;this.dataPadding=10;this.borderColor="#999999";this.borderWidth=1;this.borderAlpha=1;this.alpha=1;this.setRelativePosition(jsx3.gui.Block.RELATIVE);};f.getTitlePlacement=function(){return this.titlePlacement;};f.setTitlePlacement=function(r){if(d.Sz[r]){this.titlePlacement=r;}else{throw new jsx3.IllegalArgumentException("titlePlacement",r);}};f.getLegendPlacement=function(){return this.legendPlacement;};f.setLegendPlacement=function(l){if(d.Sz[l]){this.legendPlacement=l;}else{throw new jsx3.IllegalArgumentException("legendPlacement",l);}};f.getDataPadding=function(){return this.dataPadding;};f.setDataPadding=function(a){this.dataPadding=a;};f.getBorderColor=function(){return this.borderColor;};f.setBorderColor=function(l){this.borderColor=l;};f.getBorderWidth=function(){return this.borderWidth;};f.setBorderWidth=function(h){this.borderWidth=h;};f.getBorderAlpha=function(){return this.borderAlpha;};f.setBorderAlpha=function(m){this.borderAlpha=m;};f.getAlpha=function(){return this.alpha;};f.setAlpha=function(o){this.alpha=o!=null?_.F0(o):null;};f.M4=function(){return this.Q0("J4");};f.gH=function(){return this.Q0("RK");};f.xB=function(e){if(e!=null){this.xI("RK",e.selectNodes("/data/record").toArray());}else{this.qX("RK");}};f.getSeries=function(){return this.getDescendantsOfType(M.Series);};f.aO=function(){return this.findDescendants(function(s){return s instanceof M.Series&&s.getDisplay()!=jsx3.gui.Block.DISPLAYNONE;},false,true,false,false);};f.getSeriesIndex=function(o){var Cb=this.getSeries();for(var Cc=0;Cc<Cb.length;Cc++){if(o==Cb[Cc])return Cc;}return -1;};f.getChartTitle=function(){return M.ChartLabel?this.getFirstChildOfType(M.ChartLabel):null;};f.getLegend=function(){return M.Legend?this.getFirstChildOfType(M.Legend):null;};f.VO=function(){return false;};f.wH=jsx3.Method.newAbstract("series");f.getLegendEntryType=function(){jsx3.require("jsx3.chart.Legend");return M.Legend.SHOW_SERIES;};f.Z6=function(q,h){var bc=this.gH();if(bc==null)return null;var Kb=new Array(bc.length);for(var gb=0;gb<bc.length;gb++){Kb[gb]=0;for(var Fc=0;Fc<q.length;Fc++){var Q=q[Fc][h](bc[gb]);if(Q!=null)Kb[gb]+=Math.abs(Q);}}return Kb;};f.tK=function(o,j,h){var P=this.gH();if(P==null)return null;var E=new Array(o.length);for(var v=0;v<o.length;v++){E[v]=0;for(var tc=0;tc<P.length;tc++){var Xb=o[v][j](P[tc]);if(Xb!=null&&(Xb>=0||!h))E[v]+=Math.abs(Xb);}}return E;};f.lL=function(){return _.Canvas.jsxclass;};f.updateView=function(){this.jsxsuper();var ub=this.l5();var Lc=this.getLeft();var Ub=this.getTop();var Sb=this.getWidth();var tb=this.getHeight();if(isNaN(Sb)||isNaN(tb)){var ec=this.getParent().IO(this);if(Sb.toString().indexOf("%")>=0)Sb=Math.round(ec.parentwidth*parseFloat(Sb)/100);if(tb.toString().indexOf("%")>=0)tb=Math.round(ec.parentheight*parseFloat(tb)/100);ub.setWidth(Sb);ub.setHeight(tb);}var R=this.getXML();this.xB(R);var bb=new _.Rectangle(0,0,Sb,tb);ub.appendChild(bb);bb.setZIndex(d.tv);this.AV(bb);this.E_(bb);var dc=this.getPaddingDimensions();var w=this.borderWidth!=null?this.borderWidth:1;Sb=Sb-dc[1]-dc[3]-2*w;tb=tb-dc[0]-dc[2]-2*w;var Nb=new _.Group(dc[3]+w,dc[0]+w,Sb,tb);ub.appendChild(Nb);Nb.setZIndex(d.qj);var kc=this.getChartTitle();if(kc!=null&&kc.getDisplay()!=jsx3.gui.Block.DISPLAYNONE){var zb=M.splitBox(0,0,Sb,tb,this.titlePlacement,kc.getPreferredWidth(),kc.getPreferredHeight());kc.setDimensions(zb[0][0],zb[0][1],zb[0][2],zb[0][3]);kc.setZIndex(d.Nh);kc.updateView();Nb.appendChild(kc.l5());Ub=zb[1][0];Lc=zb[1][1];Sb=zb[1][2];tb=zb[1][3];}else{Ub=0;Lc=0;}var Gc=new _.Group();this.xI("J4",Gc);Nb.appendChild(Gc);var Mc=this.getLegend();if(Mc!=null&&Mc.getDisplay()!=jsx3.gui.Block.DISPLAYNONE){var zb=M.splitBox(Ub,Lc,Sb,tb,this.legendPlacement,Mc.getPreferredWidth(),Mc.getPreferredHeight());Mc.setDimensions(zb[0][0],zb[0][1],zb[0][2],zb[0][3]);Mc.setZIndex(d.Xj);Mc.updateView();Nb.appendChild(Mc.l5());Gc.setDimensions(zb[1][0],zb[1][1],zb[1][2],zb[1][3]);}else{Gc.setDimensions(Ub,Lc,Sb,tb);}var ac=jsx3.html.BlockTag.nR(this.dataPadding);var O=Gc.getDimensions();Gc.setDimensions(O[0]+ac[3],O[1]+ac[0],O[2]-ac[1]-ac[3],O[3]-ac[0]-ac[2]);this.A3();var x=this.aO();for(var sb=0;sb<x.length;sb++){var P=this.VO()?x.length-sb:sb;x[sb].setZIndex(d.id+P);}};f.repaintParts=function(k){if(k&d.PART_LEGEND){var Z=this.getLegend();if(Z!=null)Z.repaint();}};f.toString=function(){return "[Chart '"+this.getName()+"']";};f.onSetChild=function(n){if(M.Legend&&n instanceof M.Legend){if(this.getLegend()!=null){M.LOG.info("can't add legend "+n+" because chart already has a legend");return false;}}else{if(M.ChartLabel&&n instanceof M.ChartLabel){if(this.getChartTitle()!=null){M.LOG.info("can't add title "+n+" because chart already has a title");return false;}}else{if(M.Series&&n instanceof M.Series){if(!this.wH(n)){M.LOG.info("can't add series "+n+" because it isn't of valid type for "+this);return false;}}else{return false;}}}return true;};f.redrawRecord=function(){this.repaint();};f.getMaskProperties=function(){return this.getRelativePosition()==jsx3.gui.Block.ABSOLUTE?M.ChartComponent.MASK_PROPS_ALLEDIT:M.ChartComponent.MASK_PROPS_ALLEDITREL;};f.onDestroy=function(i){this.jsxsuper(i);this.onDestroyCached(i);};f.T5=function(q){if(this.getParent()&&(q==null||isNaN(q.parentwidth)||isNaN(q.parentheight))){q=this.getParent().IO(this);}else{if(q==null){q={};}}var E=this.getRelativePosition()!=jsx3.gui.Block.ABSOLUTE;var sb=E?null:this.getLeft();var Ic=E?null:this.getTop();q.boxtype=E?"relativebox":"box";q.tagname="span";if(q.left==null&&sb!=null)q.left=sb;if(q.top==null&&Ic!=null)q.top=Ic;q.width=this.getWidth();q.height=this.getHeight();return new jsx3.gui.Painted.Box(q);};f.k7=function(a,q,s){if(s.isPositional()){this.B_(a,q,s,3);}else{var bc=this.getWidth();var X=this.getHeight();if(bc.toString().indexOf("%")>=0||X.toString().indexOf("%")>=0){bc=Math.round(a.parentwidth*parseFloat(bc)/100);X=Math.round(a.parentheight*parseFloat(X)/100);var Tb=this.l5();if(q!=null&&(bc!=Tb.getWidth()||X!=Tb.getHeight())&&bc>0&&X>0)s.addRepaint(this);}}};d.getVersion=function(){return M.q2;};});
  