afreechart/src/main/java/org/afree/chart/axis/PeriodAxis.java
/**
     * Converts a coordinate in Java2D space to the corresponding data value,
     * assuming that the axis runs along one edge of the specified dataArea.
     *
     * @param java2DValue  the coordinate in Java2D space.
     * @param area  the area in which the data is plotted.
     * @param edge  the edge along which the axis lies.
     *
     * @return The data value.
     */
Converts a coordinate in Java2D space to the corresponding data value,
assuming that the axis runs along one edge of the specified dataArea.

@param java2DValue  the coordinate in Java2D space.
@param area  the area in which the data is plotted.
@param edge  the edge along which the axis lies.

@return The data value.
Converts a coordinate in Java2D space to the corresponding data value assuming that the axis runs along one edge of the specified dataArea . @param java2DValue the coordinate in Java2D space . @param area the area in which the data is plotted . @param edge the edge along which the axis lies . @return The data value .
public double java2DToValue(double java2DValue, RectShape area,
            RectangleEdge edge) {
        double result = Double.NaN;
        double min = 0.0;
        double max = 0.0;
        double axisMin = this.first.getFirstMillisecond();
        double axisMax = this.last.getLastMillisecond();
        if (RectangleEdge.isTopOrBottom(edge)) {
            min = area.getX();
            max = area.getMaxX();
        }
        else if (RectangleEdge.isLeftOrRight(edge)) {
            min = area.getMaxY();
            max = area.getY();
        }
        if (isInverted()) {
             result = axisMax - ((java2DValue - min) / (max - min)
                      * (axisMax - axisMin));
        }
        else {
             result = axisMin + ((java2DValue - min) / (max - min)
                      * (axisMax - axisMin));
        }
        return result;
    }
public double java2DToValue ( double java2DValue , RectShape area , RectangleEdge edge ) { double result = Double . NaN ; double min = 0.0 ; double max = 0.0 ; double axisMin = this . first . getFirstMillisecond ( ) ; double axisMax = this . last . getLastMillisecond ( ) ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { min = area . getX ( ) ; max = area . getMaxX ( ) ; } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { min = area . getMaxY ( ) ; max = area . getY ( ) ; } if ( isInverted ( ) ) { result = axisMax - ( ( java2DValue - min ) / ( max - min ) * ( axisMax - axisMin ) ) ; } else { result = axisMin + ( ( java2DValue - min ) / ( max - min ) * ( axisMax - axisMin ) ) ; } return result ; }
Converts a coordinate in Java2D space to the corresponding data value,
 assuming that the axis runs along one edge of the specified dataArea.
Converts a coordinate in Java2D space to the corresponding data value assuming that the axis runs along one edge of the specified dataArea .