afreechart/src/main/java/org/afree/chart/axis/DateAxis.java
/**
     * Translates the data value to the display coordinates (Java 2D User Space)
     * of the chart.
     *
     * @param value  the date to be plotted.
     * @param area  the RectShape (in Java2D space) where the data is to be
     *              plotted.
     * @param edge  the axis location.
     *
     * @return The coordinate corresponding to the supplied data value.
     */
Translates the data value to the display coordinates (Java 2D User Space)
of the chart.

@param value  the date to be plotted.
@param area  the RectShape (in Java2D space) where the data is to be
plotted.
@param edge  the axis location.

@return The coordinate corresponding to the supplied data value.
Translates the data value to the display coordinates ( Java 2D User Space ) of the chart . @param value the date to be plotted . @param area the RectShape ( in Java2D space ) where the data is to be plotted . @param edge the axis location . @return The coordinate corresponding to the supplied data value .
public double valueToJava2D(double value, RectShape area,
                                RectangleEdge edge) {
        value = this.timeline.toTimelineValue((long) value);
        DateRange range = (DateRange) this.mRange;
        double axisMin = this.timeline.toTimelineValue(range.getLowerMillis());
        double axisMax = this.timeline.toTimelineValue(range.getUpperMillis());
        double result = 0.0;
        if (RectangleEdge.isTopOrBottom(edge)) {
            double minX = area.getX();
            double maxX = area.getMaxX();
            if (this.mInverted) {
                result = maxX + ((value - axisMin) / (axisMax - axisMin))
                         * (minX - maxX);
            }
            else {
                result = minX + ((value - axisMin) / (axisMax - axisMin))
                         * (maxX - minX);
            }
        }
        else if (RectangleEdge.isLeftOrRight(edge)) {
            double minY = area.getMinY();
            double maxY = area.getMaxY();
            if (this.mInverted) {
                result = minY + (((value - axisMin) / (axisMax - axisMin))
                         * (maxY - minY));
            }
            else {
                result = maxY - (((value - axisMin) / (axisMax - axisMin))
                         * (maxY - minY));
            }
        }
        return result;
    }
public double valueToJava2D ( double value , RectShape area , RectangleEdge edge ) { value = this . timeline . toTimelineValue ( ( long ) value ) ; DateRange range = ( DateRange ) this . mRange ; double axisMin = this . timeline . toTimelineValue ( range . getLowerMillis ( ) ) ; double axisMax = this . timeline . toTimelineValue ( range . getUpperMillis ( ) ) ; double result = 0.0 ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { double minX = area . getX ( ) ; double maxX = area . getMaxX ( ) ; if ( this . mInverted ) { result = maxX + ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( minX - maxX ) ; } else { result = minX + ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( maxX - minX ) ; } } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { double minY = area . getMinY ( ) ; double maxY = area . getMaxY ( ) ; if ( this . mInverted ) { result = minY + ( ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( maxY - minY ) ) ; } else { result = maxY - ( ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( maxY - minY ) ) ; } } return result ; }
Translates the data value to the display coordinates (Java 2D User Space)
 of the chart.
Translates the data value to the display coordinates ( Java 2D User Space ) of the chart .
//performance tuning //        DateRange range = (DateRange) getRange(); //if (isInverted()) { //if (isInverted()) {