Package org.pentaho.plugin.jfreereport.reportcharts

Examples of org.pentaho.plugin.jfreereport.reportcharts.ExtendedXYZDataset


    zValueColumns = new ArrayList();
  }

  protected Dataset createNewDataset()
  {
    return new ExtendedXYZDataset();
  }
View Full Code Here


  }


  protected void buildDataset()
  {
    final ExtendedXYZDataset xySeriesDataset = (ExtendedXYZDataset) getDataSet();

    final int maxIndex = Math.min(this.xValueColumns.size(),
        Math.min (this.yValueColumns.size(), this.zValueColumns.size()));
    for (int i = 0; i < maxIndex; i++)
    {
      final Comparable seriesName = querySeriesValue(i);
      final Object xValueObject = getDataRow().get((String) xValueColumns.get(i));
      final Object yValueObject = getDataRow().get((String) yValueColumns.get(i));
      final Object zValueObject = getDataRow().get((String) zValueColumns.get(i));
      final Number xValue = (xValueObject instanceof Number) ? (Number) xValueObject : null;
      final Number yValue = (yValueObject instanceof Number) ? (Number) yValueObject : null;
      final Number zValue = (zValueObject instanceof Number) ? (Number) zValueObject : null;

      if (xValue == null || yValue == null || zValue == null)
      {
        continue;
      }

      if (zValue.doubleValue() > xySeriesDataset.getMaxZValue())
      {
        xySeriesDataset.setMaxZValue(zValue.doubleValue());
      }

      final double[][] seriesValues = new double[3][1];
      seriesValues[0][0] = xValue.doubleValue();
      seriesValues[1][0] = yValue.doubleValue();
      seriesValues[2][0] = zValue.doubleValue();

      xySeriesDataset.addSeries(seriesName, seriesValues);
    }
  }
View Full Code Here

    zValueColumns = new ArrayList<String>();
  }

  protected Dataset createNewDataset()
  {
    return new ExtendedXYZDataset();
  }
View Full Code Here

  }


  protected void buildDataset()
  {
    final ExtendedXYZDataset xySeriesDataset = (ExtendedXYZDataset) getDataSet();

    final int maxIndex = Math.min(this.xValueColumns.size(),
        Math.min (this.yValueColumns.size(), this.zValueColumns.size()));
    for (int i = 0; i < maxIndex; i++)
    {
      final Comparable seriesName = querySeriesValue(i);
      final Object xValueObject = getDataRow().get(xValueColumns.get(i));
      final Object yValueObject = getDataRow().get(yValueColumns.get(i));
      final Object zValueObject = getDataRow().get(zValueColumns.get(i));
      final Number xValue = (xValueObject instanceof Number) ? (Number) xValueObject : null;
      final Number yValue = (yValueObject instanceof Number) ? (Number) yValueObject : null;
      final Number zValue = (zValueObject instanceof Number) ? (Number) zValueObject : null;

      if (xValue == null || yValue == null || zValue == null)
      {
        continue;
      }

      if (zValue.doubleValue() > xySeriesDataset.getMaxZValue())
      {
        xySeriesDataset.setMaxZValue(zValue.doubleValue());
      }

      final double[][] seriesValues = new double[3][1];
      seriesValues[0][0] = xValue.doubleValue();
      seriesValues[1][0] = yValue.doubleValue();
      seriesValues[2][0] = zValue.doubleValue();

      xySeriesDataset.addSeries(seriesName, seriesValues);
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.plugin.jfreereport.reportcharts.ExtendedXYZDataset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.