public ValueAxis getDomainAxisForDataset(int index) {

        if (index < 0 || index >= getDatasetCount()) {
            throw new IllegalArgumentException("Index " + index
                    + " out of bounds.");
        }

        ValueAxis valueAxis = null;
        Integer axisIndex = (Integer) this.datasetToDomainAxisMap.get(
                new Integer(index));
        if (axisIndex != null) {
            valueAxis = getDomainAxis(axisIndex.intValue());
        }
        else {
            valueAxis = getDomainAxis(0);
        }
        return valueAxis;