Пример #1
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();
   }
 }
Пример #2
0
 /**
  * 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();
 }
Пример #3
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;
 }