//defines real dimension of attributes x1,y1,x2,y2...the number must be the same for x and y column
int numAttsX = 0;
int numAttsY = 0;
for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();
String name=new String(object.getKey());
if(!name.equalsIgnoreCase("x")) {
if (String.valueOf(name.charAt(0)).equalsIgnoreCase("x"))
numAttsX++;
else if (String.valueOf(name.charAt(0)).equalsIgnoreCase("y"))
numAttsY++;
}
}
int maxNumAtts = (numAttsX < numAttsY)? numAttsY : numAttsX;
//double[] x=new double[atts.size()];
//double[] y=new double[atts.size()];
double[] x=new double[maxNumAtts];
double[] y=new double[maxNumAtts];
String name="";
String value="";
//run all the attributes of the serie
for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();
name=new String(object.getKey());
value=(((String)object.getValue()).equals("null"))?"0":new String((String)object.getValue());
if(name.equalsIgnoreCase("x"))
{
catValue=value;
}