/** * Returns the end x-value (as a double primitive) for an item within a * series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The end x-value. */ public double getEndXValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); return bin.getUpperBound(); }
/** * Returns the end x-value (as a double primitive) for an item within a * series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The end x-value. */ @Override public double getEndXValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); return bin.getUpperBound(); }
/** * Returns the x-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The x-value. */ @Override public double getXValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); return (bin.getLowerBound() + bin.getUpperBound()) / 2.0; }
/** * Returns the x-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The x-value. */ public double getXValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); return (bin.getLowerBound() + bin.getUpperBound()) / 2.0; }
/** * Returns the y-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The y-value. * * @see #getAdjustForBinSize() */ public double getYValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); if (this.adjustForBinSize) { return bin.getItemCount() / (bin.getUpperBound() - bin.getLowerBound()); } else { return bin.getItemCount(); } }
/** * Returns the y-value (as a double primitive) for an item within a series. * * @param series the series index (zero-based). * @param item the item index (zero-based). * * @return The y-value. * * @see #getAdjustForBinSize() */ @Override public double getYValue(int series, int item) { SimpleHistogramBin bin = (SimpleHistogramBin) this.bins.get(item); if (this.adjustForBinSize) { return bin.getItemCount() / (bin.getUpperBound() - bin.getLowerBound()); } else { return bin.getItemCount(); } }