double dBaseZero = ((scBase.getType() & IConstants.NUMERICAL) == IConstants.NUMERICAL && !oaxBase
double dBaseZero = ((scBase.getType() & NUMERICAL) == IConstants.NUMERICAL && !oaxBase
    public final SeriesRenderingHints getSeriesRenderingHints(Series seOrthogonal) throws NullValueException,        DataFormatException, NotFoundException, OutOfSyncException, UndefinedValueException, UnexpectedInputException    {        if (seOrthogonal == null || seOrthogonal.getClass() == SeriesImpl.class) // EMPTY PLOT RENDERING TECHNIQUE        {            return null;        }        OneAxis oaxOrthogonal = findOrthogonalAxis(seOrthogonal);        if (oaxOrthogonal == null)        {            throw new NotFoundException("Axis definition for series " + seOrthogonal + " could not be found");        }        OneAxis oaxBase = aax.getPrimaryBase();                AutoScale scBase = oaxBase.getScale();        AutoScale scOrthogonal = oaxOrthogonal.getScale();        int iTickCount = scBase.getTickCount();        int iUnitCount = iTickCount;        double dUnitSize = scBase.getUnitSize();        if (scBase.getType() == IConstants.DATE_TIME)        {            // TBD: HANDLE DATETIME VALUE VS TEXT AXIS        }        double[] daTickCoordinates = scBase.getTickCordinates();        Object oDataBase = null;        DataSetIterator dsiDataBase = scBase.getData();        Object oDataOrthogonal;        DataSetIterator dsiDataOrthogonal = getTypedDataSet(seOrthogonal, oaxOrthogonal.getScale().getType());        double dOrthogonalZero = 0;        if ((scOrthogonal.getType() & LOGARITHMIC) == 0)        {            dOrthogonalZero = getLocation(scOrthogonal, 0);        }        else        {            dOrthogonalZero = scOrthogonal.getStart();        }        double dBaseZero = ((scBase.getType() & IConstants.NUMERICAL) == IConstants.NUMERICAL && !oaxBase            .isCategoryScale()) ? getLocation(scBase, 0) : scBase.getStart();        if (scBase.getType() == TEXT || oaxBase.isCategoryScale())        {            iUnitCount--;        }        final int iDirection = (oaxBase.getOrientation() == HORIZONTAL) ? 1 : -1;        double dX = 0, dY = 0, dLength = 0;        Location lo;        final int iBaseCount = dsiDataBase.size();        final int iOrthogonalCount = dsiDataOrthogonal.size();        if (iBaseCount != iOrthogonalCount)        {            throw new OutOfSyncException("Base axis contains " + iBaseCount + " items; orthogonal axis contains "                + iOrthogonalCount + " items.");        }        final DataPointHints[] dpa = new DataPointHints[iBaseCount];        final boolean bScatter = (oaxBase.getScale().getType() != IConstants.TEXT && !oaxBase.isCategoryScale());                // OPTIMIZED PRE-FETCH FORMAT SPECIFIERS FOR ALL DATA POINTS        final DataPoint dp = seOrthogonal.getDataPoint();        final EList el = dp.getComponents();        DataPointComponent dpc;        DataPointComponentType dpct;        FormatSpecifier fsBase = null, fsOrthogonal = null, fsSeries = null;        for (int i = 0; i < el.size(); i++)        {            dpc = (DataPointComponent) el.get(i);            dpct = dpc.getType();            if (dpct == DataPointComponentType.BASE_VALUE_LITERAL)            {                fsBase = dpc.getFormatSpecifier();            }            else if (dpct == DataPointComponentType.ORTHOGONAL_VALUE_LITERAL)            {                fsOrthogonal = dpc.getFormatSpecifier();            }            else if (dpct == DataPointComponentType.SERIES_VALUE_LITERAL)            {                fsSeries = dpc.getFormatSpecifier();            }        }                dsiDataBase.reset();        dsiDataOrthogonal.reset();        for (int i = 0; i < iBaseCount; i++)        {            oDataBase = dsiDataBase.next();            oDataOrthogonal = dsiDataOrthogonal.next();            if (!bScatter)            {                if (aax.areAxesSwapped())                {                    dY = daTickCoordinates[0] - dUnitSize * i;                    try                    {                        dX = getLocation(scOrthogonal, oDataOrthogonal);                    }                    catch (NullValueException nvex )                    {                        dX = dOrthogonalZero;                    }                    catch (DataFormatException dfex )                    {                        dX = dOrthogonalZero; // FOR CUSTOM DATA ELEMENTS                    }                }                else                {                    dX = daTickCoordinates[0] + dUnitSize * i;                    try                    {                        dY = getLocation(scOrthogonal, oDataOrthogonal);                    }                    catch (NullValueException nvex )                    {                        dY = dOrthogonalZero;                    }                    catch (DataFormatException dfex )                    {                        dY = dOrthogonalZero; // FOR CUSTOM DATA ELEMENTS                    }                }            }            else            // SCATTER CHARTS (BASE AXIS != CATEGORY AXIS)            {                try                {                    dX = getLocation(scBase, oDataBase);                }                catch (NullValueException nvex )                {                    dX = dBaseZero;                }                catch (DataFormatException dfex )                {                    dX = dBaseZero; // FOR CUSTOM DATA ELEMENTS                }                try                {                    dY = getLocation(scOrthogonal, oDataOrthogonal);                }                catch (NullValueException nvex )                {                    dY = dOrthogonalZero; // MAP TO ZERO                }                catch (DataFormatException dfex )                {                    dY = dOrthogonalZero; // FOR CUSTOM DATA ELEMENTS                }                if (aax.areAxesSwapped())                {                    final double dTemp = dX;                    dX = dY;                    dY = dTemp;                }            }            lo = LocationImpl.create(dX, dY);            dLength = (i < iTickCount - 1) ? daTickCoordinates[i + 1] - daTickCoordinates[i] : 0;            dpa[i] = new DataPointHints(                oDataBase, oDataOrthogonal,                 seOrthogonal.getSeriesIdentifier(),                 seOrthogonal.getDataPoint(),                fsBase, fsOrthogonal, fsSeries,                lo, dLength, lcl            );        }        return new SeriesRenderingHints(this, oaxBase.getAxisCoordinate(), scOrthogonal.getStart(), dOrthogonalZero,            dSeriesThickness, daTickCoordinates, dpa, scBase, scOrthogonal, ssl);    }