/*
 * Copyright (c) 2001-2007, TIBCO Software Inc.
 * Use, modification, and distribution subject to terms of license.
 */
jsx3.require("jsx3.chart.CartesianChart","jsx3.chart.PointSeries");jsx3.Class.defineClass("jsx3.chart.PlotChart",jsx3.chart.CartesianChart,null,function(p,d){p.MAG_RADIUS="radius";p.MAG_DIAMETER="diameter";p.MAG_AREA="area";p.DEFAULT_MAX_POINT_RADIUS=30;p.iu={radius:1,diameter:1,area:1};d.init=function(i,m,k,g,q){this.jsxsuper(i,m,k,g,q);this.maxPointRadius=p.DEFAULT_MAX_POINT_RADIUS;this.magnitudeMethod=p.MAG_RADIUS;};d.getMaxPointRadius=function(){return this.maxPointRadius!=null?this.maxPointRadius:Number.POSITIVE_INFINITY;};d.setMaxPointRadius=function(r){this.maxPointRadius=r;};d.getMagnitudeMethod=function(){return this.magnitudeMethod;};d.setMagnitudeMethod=function(j){if(p.iu[j]){this.magnitudeMethod=j;}else{throw new jsx3.IllegalArgumentException("magnitudeMethod",j);}};d.getXRange=function(m){return this.getRangeForField(m,"getXValue");};d.getYRange=function(q){return this.getRangeForField(q,"getYValue");};d.updateView=function(){this.jsxsuper();this.JJ();};d.JJ=function(){var xb=this.M4();var bb=this.aO();var Vb=this.gH();var W=this.getPrimaryXAxis();var G=this.getPrimaryYAxis();if(W==null||G==null||bb.length==0||Vb==null)return;if(!jsx3.chart.isValueAxis(W)){jsx3.chart.LOG.error("bad x axis type: "+W.getClass());return;}if(!jsx3.chart.isValueAxis(G)){jsx3.chart.LOG.error("bad y axis type: "+G.getClass());return;}for(var wb=0;wb<bb.length;wb++){var yc=bb[wb];yc.BV();for(var M=0;M<Vb.length;M++){var rc=Vb[M];var R=yc.getXValue(rc);var Nc=yc.getYValue(rc);if(R==null||Nc==null)continue;R=W.getCoordinateForNoClip(R);Nc=G.getCoordinateForNoClip(Nc);if(yc instanceof jsx3.chart.PointSeries){yc.PM(rc,M,R,Nc);}else{var ob=yc.getMagnitudeValue(rc);if(ob!=null)yc.PM(rc,M,R,Nc,ob);}}yc.updateView();xb.appendChild(yc.l5());}};d.wH=function(b){return b instanceof jsx3.chart.PlotSeries;};d.toString=function(){return "[PlotChart '"+this.getName()+"']";};p.getVersion=function(){return jsx3.chart.q2;};});
