ValueGrid( GridRange gr, double low, double up, ValueAxisUnit vAxis, double base ) throws RrdException
	{
		double grLower = Double.MAX_VALUE;
		double grUpper = Double.MIN_VALUE;

		if ( gr != null )
		{
			this.rigid		= gr.isRigid();
			grLower			= gr.getLowerValue();
			grUpper			= gr.getUpperValue(); 	
		}
		
		this.lower	= low;
		this.upper	= up;
		this.vAxis	= vAxis;

		// Fill in the scale values
		if ( base != baseValue )
		{
			baseValue			= base;

			double tmp 			= 1;
			for (int i = 1; i < 7; i++) {
				tmp 				*= baseValue;
				scaleValues[6 - i] 	= tmp;
			}
			tmp = 1;
			for (int i = 7; i < scaleValues.length; i++) {
				tmp					*= baseValue;
				scaleValues[i]	 	= ( 1 / tmp );
			}
		}

		// Set an appropriate value axis it not given yet
		setValueAxis();

		if ( !rigid ) {
			this.lower		= ( lower == grLower ? grLower : this.vAxis.getNiceLower( lower ) );
			this.upper		= ( upper == grUpper ? grUpper : this.vAxis.getNiceHigher( upper ) );
		}
	}