Author: Kore Nordmann
Date: 2006-06-14 18:03:27 +0200 (Wed, 14 Jun 2006)
New Revision: 3134
Log:
- Renamed X_axis and Y_axis to xAxis and yAxis
Modified:
trunk/Graph/src/charts/line.php
trunk/Graph/tests/labeled_axis_test.php
trunk/Graph/tests/numeric_axis_test.php
trunk/Graph/tests/palette_test.php
Modified: trunk/Graph/src/charts/line.php
===================================================================
--- trunk/Graph/src/charts/line.php 2006-06-14 15:34:12 UTC (rev 3133)
+++ trunk/Graph/src/charts/line.php 2006-06-14 16:03:27 UTC (rev 3134)
@@ -21,11 +21,11 @@
parent::__construct();
- $this->addElement( 'X_axis', new ezcGraphChartElementLabeledAxis() );
- $this->elements['X_axis']->position = ezcGraph::LEFT;
+ $this->addElement( 'xAxis', new ezcGraphChartElementLabeledAxis() );
+ $this->elements['xAxis']->position = ezcGraph::LEFT;
- $this->addElement( 'Y_axis', new ezcGraphChartElementNumericAxis() );
- $this->elements['Y_axis']->position = ezcGraph::BOTTOM;
+ $this->addElement( 'yAxis', new ezcGraphChartElementNumericAxis() );
+ $this->elements['yAxis']->position = ezcGraph::BOTTOM;
}
/**
@@ -45,8 +45,8 @@
case 'X_Axis':
if ( $propertyValue instanceof ezcGraphChartElementAxis )
{
- $this->addElement( 'X_axis', $propertyValue );
- $this->elements['X_axis']->position = ezcGraph::LEFT;
+ $this->addElement( 'xAxis', $propertyValue );
+ $this->elements['xAxis']->position = ezcGraph::LEFT;
}
else
{
@@ -56,8 +56,8 @@
case 'Y_Axis':
if ( $propertyValue instanceof ezcGraphChartElementAxis )
{
- $this->addElement( 'Y_axis', $propertyValue );
- $this->elements['Y_axis']->position = ezcGraph::BOTTOM;
+ $this->addElement( 'yAxis', $propertyValue );
+ $this->elements['yAxis']->position = ezcGraph::BOTTOM;
}
else
{
@@ -85,21 +85,21 @@
foreach ( $data as $key => $value )
{
$point = new ezcGraphCoordinate(
- (int) round( $this->elements['X_axis']->getCoordinate(
$boundings, $key ) ),
- (int) round( $this->elements['Y_axis']->getCoordinate(
$boundings, $value ) )
+ (int) round( $this->elements['xAxis']->getCoordinate(
$boundings, $key ) ),
+ (int) round( $this->elements['yAxis']->getCoordinate(
$boundings, $value ) )
);
// Fill the line
if ( $lastPoint !== false && $this->options->fillLines !==
false )
{
- $axisPosition = (int) round(
$this->elements['Y_axis']->getCoordinate( $boundings, false ) );
+ $axisPosition = (int) round(
$this->elements['yAxis']->getCoordinate( $boundings, false ) );
$lastAxisPoint = new ezcGraphCoordinate(
- (int) round( $this->elements['X_axis']->getCoordinate(
$boundings, $lastKey ) ),
+ (int) round( $this->elements['xAxis']->getCoordinate(
$boundings, $lastKey ) ),
$axisPosition
);
$axisPoint = new ezcGraphCoordinate(
- (int) round( $this->elements['X_axis']->getCoordinate(
$boundings, $key ) ),
+ (int) round( $this->elements['xAxis']->getCoordinate(
$boundings, $key ) ),
$axisPosition
);
@@ -216,12 +216,12 @@
$values[] = $value;
}
- $this->elements['X_axis']->addData( $labels );
- $this->elements['Y_axis']->addData( $values );
+ $this->elements['xAxis']->addData( $labels );
+ $this->elements['yAxis']->addData( $values );
}
- $this->elements['X_axis']->calculateAxisBoundings();
- $this->elements['Y_axis']->calculateAxisBoundings();
+ $this->elements['xAxis']->calculateAxisBoundings();
+ $this->elements['yAxis']->calculateAxisBoundings();
// Generate legend
$this->elements['legend']->generateFromDatasets( $this->data );
@@ -252,13 +252,13 @@
// Special settings for special elements
switch ( $name )
{
- case 'X_axis':
+ case 'xAxis':
// get Position of 0 on the Y-axis for orientation of the
x-axis
- $element->nullPosition =
$this->elements['Y_axis']->getCoordinate( $boundings, false );
+ $element->nullPosition =
$this->elements['yAxis']->getCoordinate( $boundings, false );
break;
- case 'Y_axis':
+ case 'yAxis':
// get Position of 0 on the X-axis for orientation of the
y-axis
- $element->nullPosition =
$this->elements['X_axis']->getCoordinate( $boundings, false );
+ $element->nullPosition =
$this->elements['xAxis']->getCoordinate( $boundings, false );
break;
}
$this->driver->options->font = $element->font;
Modified: trunk/Graph/tests/labeled_axis_test.php
===================================================================
--- trunk/Graph/tests/labeled_axis_test.php 2006-06-14 15:34:12 UTC (rev
3133)
+++ trunk/Graph/tests/labeled_axis_test.php 2006-06-14 16:03:27 UTC (rev
3134)
@@ -46,7 +46,7 @@
$chart = ezcGraph::create( 'Line' );
$this->assertTrue(
- $chart->X_axis instanceof ezcGraphChartElementLabeledAxis
+ $chart->xAxis instanceof ezcGraphChartElementLabeledAxis
);
}
@@ -63,7 +63,7 @@
'2002',
'2003',
),
- $this->getNonPublicProperty( $chart->X_axis, 'labels' )
+ $this->getNonPublicProperty( $chart->xAxis, 'labels' )
);
}
@@ -83,7 +83,7 @@
'2004',
'2005',
),
- $this->getNonPublicProperty( $chart->X_axis, 'labels' )
+ $this->getNonPublicProperty( $chart->xAxis, 'labels' )
);
}
@@ -104,7 +104,7 @@
'2005',
'2006',
),
- $this->getNonPublicProperty( $chart->X_axis, 'labels' )
+ $this->getNonPublicProperty( $chart->xAxis, 'labels' )
);
}
@@ -112,7 +112,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->X_axis->position = ezcGraph::LEFT;
+ $chart->xAxis->position = ezcGraph::LEFT;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -123,31 +123,31 @@
$this->assertEquals(
67.5,
- $chart->X_axis->getCoordinate( $testBoundings, false ),
+ $chart->xAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
67.5,
- $chart->X_axis->getCoordinate( $testBoundings, '2000' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2000' ),
'Wrong minimal value. '
);
$this->assertEquals(
172.5,
- $chart->X_axis->getCoordinate( $testBoundings, 2001 ),
+ $chart->xAxis->getCoordinate( $testBoundings, 2001 ),
'Wrong mid value. '
);
$this->assertEquals(
382.5,
- $chart->X_axis->getCoordinate( $testBoundings, '2003' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2003' ),
'Wrong maximum value. '
);
$this->assertEquals(
67.5,
- $chart->X_axis->getCoordinate( $testBoundings, '1991' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '1991' ),
'Wrong return for unknown value. '
);
}
@@ -156,7 +156,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->X_axis->position = ezcGraph::RIGHT;
+ $chart->xAxis->position = ezcGraph::RIGHT;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -167,31 +167,31 @@
$this->assertEquals(
382.5,
- $chart->X_axis->getCoordinate( $testBoundings, false ),
+ $chart->xAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
382.5,
- $chart->X_axis->getCoordinate( $testBoundings, '2000' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2000' ),
'Wrong minimal value. '
);
$this->assertEquals(
277.5,
- $chart->X_axis->getCoordinate( $testBoundings, 2001 ),
+ $chart->xAxis->getCoordinate( $testBoundings, 2001 ),
'Wrong mid value. '
);
$this->assertEquals(
67.5,
- $chart->X_axis->getCoordinate( $testBoundings, '2003' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2003' ),
'Wrong maximum value. '
);
$this->assertEquals(
382.5,
- $chart->X_axis->getCoordinate( $testBoundings, '1991' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '1991' ),
'Wrong return for unknown value. '
);
}
@@ -200,7 +200,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->X_axis->position = ezcGraph::TOP;
+ $chart->xAxis->position = ezcGraph::TOP;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -211,31 +211,31 @@
$this->assertEquals(
87.75,
- $chart->X_axis->getCoordinate( $testBoundings, false ),
+ $chart->xAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
87.75,
- $chart->X_axis->getCoordinate( $testBoundings, '2000' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2000' ),
'Wrong minimal value. '
);
$this->assertEquals(
164.25,
- $chart->X_axis->getCoordinate( $testBoundings, 2001 ),
+ $chart->xAxis->getCoordinate( $testBoundings, 2001 ),
'Wrong mid value. '
);
$this->assertEquals(
317.25,
- $chart->X_axis->getCoordinate( $testBoundings, '2003' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2003' ),
'Wrong maximum value. '
);
$this->assertEquals(
87.75,
- $chart->X_axis->getCoordinate( $testBoundings, '1991' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '1991' ),
'Wrong return for unknown value. '
);
}
@@ -244,7 +244,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->X_axis->position = ezcGraph::BOTTOM;
+ $chart->xAxis->position = ezcGraph::BOTTOM;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -255,31 +255,31 @@
$this->assertEquals(
317.25,
- $chart->X_axis->getCoordinate( $testBoundings, false ),
+ $chart->xAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
317.25,
- $chart->X_axis->getCoordinate( $testBoundings, '2000' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2000' ),
'Wrong minimal value. '
);
$this->assertEquals(
240.75,
- $chart->X_axis->getCoordinate( $testBoundings, 2001 ),
+ $chart->xAxis->getCoordinate( $testBoundings, 2001 ),
'Wrong mid value. '
);
$this->assertEquals(
87.75,
- $chart->X_axis->getCoordinate( $testBoundings, '2003' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '2003' ),
'Wrong maximum value. '
);
$this->assertEquals(
317.25,
- $chart->X_axis->getCoordinate( $testBoundings, '1991' ),
+ $chart->xAxis->getCoordinate( $testBoundings, '1991' ),
'Wrong return for unknown value. '
);
}
@@ -396,7 +396,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->X_axis->grid = '#BBBBBB';
+ $chart->xAxis->grid = '#BBBBBB';
$mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array(
'drawLine',
Modified: trunk/Graph/tests/numeric_axis_test.php
===================================================================
--- trunk/Graph/tests/numeric_axis_test.php 2006-06-14 15:34:12 UTC (rev
3133)
+++ trunk/Graph/tests/numeric_axis_test.php 2006-06-14 16:03:27 UTC (rev
3134)
@@ -46,68 +46,68 @@
$chart = ezcGraph::create( 'Line' );
$this->assertTrue(
- $chart->Y_axis instanceof ezcGraphChartElementNumericAxis
+ $chart->yAxis instanceof ezcGraphChartElementNumericAxis
);
}
public function testManualScaling()
{
$chart = ezcGraph::create( 'Line' );
- $chart->Y_axis->min = 10;
- $chart->Y_axis->max = 50;
- $chart->Y_axis->majorStep = 10;
- $chart->Y_axis->minorStep = 1;
+ $chart->yAxis->min = 10;
+ $chart->yAxis->max = 50;
+ $chart->yAxis->majorStep = 10;
+ $chart->yAxis->minorStep = 1;
$this->assertEquals(
10.,
- $this->getNonPublicProperty( $chart->Y_axis, 'min' )
+ $this->getNonPublicProperty( $chart->yAxis, 'min' )
);
$this->assertEquals(
50.,
- $this->getNonPublicProperty( $chart->Y_axis, 'max' )
+ $this->getNonPublicProperty( $chart->yAxis, 'max' )
);
$this->assertEquals(
10.,
- $this->getNonPublicProperty( $chart->Y_axis, 'majorStep' )
+ $this->getNonPublicProperty( $chart->yAxis, 'majorStep' )
);
$this->assertEquals(
1.,
- $this->getNonPublicProperty( $chart->Y_axis, 'minorStep' )
+ $this->getNonPublicProperty( $chart->yAxis, 'minorStep' )
);
}
public function testManualScalingPublicProperties()
{
$chart = ezcGraph::create( 'Line' );
- $chart->Y_axis->min = 10;
- $chart->Y_axis->max = 50;
- $chart->Y_axis->majorStep = 10;
- $chart->Y_axis->minorStep = 1;
+ $chart->yAxis->min = 10;
+ $chart->yAxis->max = 50;
+ $chart->yAxis->majorStep = 10;
+ $chart->yAxis->minorStep = 1;
$this->assertEquals(
10.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
50.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
10.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
1.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -120,25 +120,25 @@
$this->assertEquals(
0.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
150.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
25.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
5.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -151,25 +151,25 @@
$this->assertEquals(
0.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
5.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
1.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
.25,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -182,25 +182,25 @@
$this->assertEquals(
-2.5,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
5.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
2.5,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
.5,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -213,25 +213,25 @@
$this->assertEquals(
1000.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
1500.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
100.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
25.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -245,25 +245,25 @@
$this->assertEquals(
1000.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
1750.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
250.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
50.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -272,30 +272,30 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->majorStep = 50;
+ $chart->yAxis->majorStep = 50;
$chart->render( 500, 200 );
$this->assertEquals(
1000.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
1450.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
50.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
10.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -304,7 +304,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->position = ezcGraph::LEFT;
+ $chart->yAxis->position = ezcGraph::LEFT;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -315,25 +315,25 @@
$this->assertEquals(
67.5,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
67.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1000 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1000 ),
'Wrong minimal value. '
);
$this->assertEquals(
193.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1200 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1200 ),
'Wrong mid value. '
);
$this->assertEquals(
382.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1500 ),
'Wrong maximum value. '
);
}
@@ -342,7 +342,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->position = ezcGraph::RIGHT;
+ $chart->yAxis->position = ezcGraph::RIGHT;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -353,25 +353,25 @@
$this->assertEquals(
382.5,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
382.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1000 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1000 ),
'Wrong minimal value. '
);
$this->assertEquals(
256.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1200 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1200 ),
'Wrong mid value. '
);
$this->assertEquals(
67.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1500 ),
'Wrong maximum value. '
);
}
@@ -380,7 +380,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->position = ezcGraph::TOP;
+ $chart->yAxis->position = ezcGraph::TOP;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -391,25 +391,25 @@
$this->assertEquals(
87.75,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
87.75,
- $chart->Y_axis->getCoordinate( $testBoundings, 1000 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1000 ),
'Wrong minimal value. '
);
$this->assertEquals(
179.55,
- $chart->Y_axis->getCoordinate( $testBoundings, 1200 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1200 ),
'Wrong mid value. '
);
$this->assertEquals(
317.25,
- $chart->Y_axis->getCoordinate( $testBoundings, 1500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1500 ),
'Wrong maximum value. '
);
}
@@ -418,7 +418,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->position = ezcGraph::BOTTOM;
+ $chart->yAxis->position = ezcGraph::BOTTOM;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -429,25 +429,25 @@
$this->assertEquals(
317.25,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
317.25,
- $chart->Y_axis->getCoordinate( $testBoundings, 1000 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1000 ),
'Wrong minimal value. '
);
$this->assertEquals(
225.45,
- $chart->Y_axis->getCoordinate( $testBoundings, 1200 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1200 ),
'Wrong mid value. '
);
$this->assertEquals(
87.75,
- $chart->Y_axis->getCoordinate( $testBoundings, 1500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1500 ),
'Wrong maximum value. '
);
}
@@ -456,8 +456,8 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => -300, 1300, 1012, 1450 );
- $chart->Y_axis->majorStep = 500;
- $chart->Y_axis->position = ezcGraph::LEFT;
+ $chart->yAxis->majorStep = 500;
+ $chart->yAxis->position = ezcGraph::LEFT;
$chart->render( 500, 200 );
$testBoundings = new ezcGraphBoundings();
@@ -468,25 +468,25 @@
$this->assertEquals(
146.25,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
$this->assertEquals(
67.5,
- $chart->Y_axis->getCoordinate( $testBoundings, -500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, -500 ),
'Wrong minimal value. '
);
$this->assertEquals(
335.25,
- $chart->Y_axis->getCoordinate( $testBoundings, 1200 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1200 ),
'Wrong mid value. '
);
$this->assertEquals(
382.5,
- $chart->Y_axis->getCoordinate( $testBoundings, 1500 ),
+ $chart->yAxis->getCoordinate( $testBoundings, 1500 ),
'Wrong maximum value. '
);
}
@@ -507,7 +507,7 @@
$this->assertEquals(
130,
- $chart->Y_axis->getCoordinate( $testBoundings, false ),
+ $chart->yAxis->getCoordinate( $testBoundings, false ),
'Wrong initial axis position. '
);
}
@@ -627,7 +627,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->grid = ezcGraphColor::fromHex( '#BBBBBB' );
+ $chart->yAxis->grid = ezcGraphColor::fromHex( '#BBBBBB' );
$mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array(
'drawLine',
@@ -727,7 +727,7 @@
{
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 1045, 1300, 1012, 1450 );
- $chart->Y_axis->minorGrid = '#BBBBBB';
+ $chart->yAxis->minorGrid = '#BBBBBB';
$mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array(
'drawLine',
@@ -884,25 +884,25 @@
$this->assertEquals(
60.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
80.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
5.,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
1.,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
@@ -914,25 +914,25 @@
$this->assertEquals(
0.,
- $chart->Y_axis->min,
+ $chart->yAxis->min,
'As value for: min; '
);
$this->assertEquals(
1.,
- $chart->Y_axis->max,
+ $chart->yAxis->max,
'As value for: max; '
);
$this->assertEquals(
.25,
- $chart->Y_axis->majorStep,
+ $chart->yAxis->majorStep,
'As value for: majorStep; '
);
$this->assertEquals(
.05,
- $chart->Y_axis->minorStep,
+ $chart->yAxis->minorStep,
'As value for: minorStep; '
);
}
Modified: trunk/Graph/tests/palette_test.php
===================================================================
--- trunk/Graph/tests/palette_test.php 2006-06-14 15:34:12 UTC (rev 3133)
+++ trunk/Graph/tests/palette_test.php 2006-06-14 16:03:27 UTC (rev 3134)
@@ -352,7 +352,7 @@
$this->assertEquals(
ezcGraphColor::fromHex( '#2E3436' ),
- $chart->X_axis->border,
+ $chart->xAxis->border,
'Chart background not set from pallet.'
);
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components