Package com.positive.charts.data

Examples of com.positive.charts.data.Range


   *
   * @return The range (or <code>null</code> if the dataset is
   *         <code>null</code> or empty).
   */
  public Range findRangeBounds(final CategoryDataset dataset) {
    final Range r = DatasetUtilities.findStackedRangeBounds(dataset,
        this.seriesToGroupMap);
    return r;
  }
View Full Code Here


   *
   * @return The range (or <code>null</code> if the dataset is empty).
   */
  public Range findRangeBounds(final CategoryDataset dataset) {
    if (this.renderAsPercentages) {
      return new Range(0.0, 1.0);
    } else {
      return DatasetUtilities.findStackedRangeBounds(dataset, this
          .getBase());
    }
  }
View Full Code Here

   * @return The range.
   */
  public Range getDomainBounds(final boolean includeInterval) {
    // first get the range without the interval, then expand it for the
    // interval width
    Range range = DatasetUtilities.findDomainBounds(this.dataset, false);
    if (includeInterval && (range != null)) {
      final double lowerAdj = this.getIntervalWidth()
          * this.getIntervalPositionFactor();
      final double upperAdj = this.getIntervalWidth() - lowerAdj;
      range = new Range(range.getLowerBound() - lowerAdj, range
          .getUpperBound()
          + upperAdj);
    }
    return range;
  }
View Full Code Here

   *
   * @return The minimum value.
   */
  public double getDomainLowerBound(final boolean includeInterval) {
    double result = Double.NaN;
    final Range r = this.getDomainBounds(includeInterval);
    if (r != null) {
      result = r.getLowerBound();
    }
    return result;
  }
View Full Code Here

   *
   * @return The maximum value.
   */
  public double getDomainUpperBound(final boolean includeInterval) {
    double result = Double.NaN;
    final Range r = this.getDomainBounds(includeInterval);
    if (r != null) {
      result = r.getUpperBound();
    }
    return result;
  }
View Full Code Here

   *
   * @return The data range.
   */
  public Range getDataRange(final ValueAxis axis) {

    Range result = null;
    final List mappedDatasets = new ArrayList();

    final int rangeIndex = this.rangeAxes.indexOf(axis);
    if (rangeIndex >= 0) {
      mappedDatasets.addAll(this.datasetsMappedToRangeAxis(rangeIndex));
View Full Code Here

   *            the value at which the grid line should be drawn.
   */
  public void drawDomainGridLine(final GC g2, final XYPlot plot,
      final ValueAxis axis, final Rectangle dataArea, final double value) {

    final Range range = axis.getRange();
    if (!range.contains(value)) {
      return;
    }

    final PlotOrientation orientation = plot.getOrientation();
    final int v = (int) axis.valueToJava2D(value, dataArea, plot
View Full Code Here

   *            the stroke.
   */
  public void drawRangeLine(final GC gc, final XYPlot plot,
      final ValueAxis axis, final Rectangle dataArea, final double value,
      final Color paint, final Stroke stroke) {
    final Range range = axis.getRange();
    if (!range.contains(value)) {
      return;
    }

    if (paint != null) {
      gc.setForeground(paint);
View Full Code Here

          maximum = Math.max(maximum, runningTotal);
        }
      }
    }
    if (!allItemsNull) {
      return new Range(minimum, maximum);
    } else {
      return null;
    }

  }
View Full Code Here

    if (dataset == null) {
      throw new IllegalArgumentException("Null 'dataset' argument.");
    }

    Range result = null;
    // if the dataset implements DomainInfo, life is easier
    if (dataset instanceof DomainInfo) {
      final DomainInfo info = (DomainInfo) dataset;
      result = info.getDomainBounds(includeInterval);
    } else {
View Full Code Here

TOP

Related Classes of com.positive.charts.data.Range

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.