afreechart/src/main/java/org/afree/chart/axis/NumberAxis.java
/**
     * Converts a data value to a coordinate in Java2D space, assuming that the
     * axis runs along one edge of the specified dataArea.
     * <p>
     * Note that it is possible for the coordinate to fall outside the plotArea.
     * 
     * @param value
     *            the data value.
     * @param area
     *            the area for plotting the data.
     * @param edge
     *            the axis location.
     * 
     * @return The Java2D coordinate.
     * 
     * @see #java2DToValue(double, RectShape, RectangleEdge)
     */
Converts a data value to a coordinate in Java2D space, assuming that the
axis runs along one edge of the specified dataArea.

Note that it is possible for the coordinate to fall outside the plotArea.

@param value
the data value.
@param area
the area for plotting the data.
@param edge
the axis location.

@return The Java2D coordinate.


Converts a data value to a coordinate in Java2D space assuming that the axis runs along one edge of the specified dataArea . Note that it is possible for the coordinate to fall outside the plotArea . @param value the data value . @param area the area for plotting the data . @param edge the axis location . @return The Java2D coordinate .
public double valueToJava2D(double value, RectShape area,
            RectangleEdge edge) {
        double axisMin = this.mRange.getLowerBound();
        double axisMax = this.mRange.getUpperBound();
        double min = 0.0;
        double max = 0.0;
        if (RectangleEdge.isTopOrBottom(edge)) {
            min = area.getX();
            max = area.getMaxX();
        } else if (RectangleEdge.isLeftOrRight(edge)) {
            max = area.getMinY();
            min = area.getMaxY();
        }
        if (this.mInverted) {
            return max - ((value - axisMin) / (axisMax - axisMin))
                    * (max - min);
        } else {
            return min + ((value - axisMin) / (axisMax - axisMin))
                    * (max - min);
        }
    }
public double valueToJava2D ( double value , RectShape area , RectangleEdge edge ) { double axisMin = this . mRange . getLowerBound ( ) ; double axisMax = this . mRange . getUpperBound ( ) ; double min = 0.0 ; double max = 0.0 ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { min = area . getX ( ) ; max = area . getMaxX ( ) ; } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { max = area . getMinY ( ) ; min = area . getMaxY ( ) ; } if ( this . mInverted ) { return max - ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( max - min ) ; } else { return min + ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( max - min ) ; } }
Converts a data value to a coordinate in Java2D space, assuming that the
 axis runs along one edge of the specified dataArea.
Converts a data value to a coordinate in Java2D space assuming that the axis runs along one edge of the specified dataArea .
//perfromance tuning //        Range range = getRange(); //        double axisMin = range.getLowerBound(); //        double axisMax = range.getUpperBound(); //        if (isInverted()) {