summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-08-15 09:42:17 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-08-15 09:42:17 +0000
commite3f5f4876b49a8274979527fba29fcc004465f85 (patch)
tree772c48686ce53c0baab1d6209e10c123b63765fc
parent04e2d9db41d47bc0364261a1cb30fe502409c339 (diff)
downloadzetacomponents-graph-e3f5f4876b49a8274979527fba29fcc004465f85.zip
zetacomponents-graph-e3f5f4876b49a8274979527fba29fcc004465f85.tar.gz
- Updated design document according to latest API changes
-rw-r--r--design/design.txt26
1 files changed, 16 insertions, 10 deletions
diff --git a/design/design.txt b/design/design.txt
index 267750c..90f6d8f 100644
--- a/design/design.txt
+++ b/design/design.txt
@@ -101,24 +101,30 @@ The following example shows how to use the class: ::
$pie->options->border->color = '#ff0000';
$pie->title = 'Apple Pie';
- $pie['humanoids'] = array( 'monkey' => 54, 'ape' => 37, 'human' => 9 ); // adds a new data set
- $pie['humanoids']->color['monkey'] = 'blueish'; // setting datapoint color
- $pie['humanoids']->highlight( 'monkey' ); // chart type dependent
+ $pie->data['humanoids'] = new ezcGraphArrayDataSet(
+ array( 'monkey' => 54, 'ape' => 37, 'human' => 9 ) // adds a new data set
+ );
+ $pie->data['humanoids']->color['monkey'] = 'blueish'; // setting datapoint color
+ $pie->data['humanoids']->highlight( 'monkey' ); // chart type dependent
$line = new ezcGraphLineChart();
$line->options->backgroundColor = 'pink';
- $line['income'] = array( 1990 => 5, 5.1, 5.4, 5.3, 6.9 );
- $line['income']->color = 'blue';
- $line['income']->symbol = ezcGraph::diamond;
+ $line->data['income'] = new ezcGraphArrayDataSet(
+ array( 1990 => 5, 5.1, 5.4, 5.3, 6.9 )
+ );
+ $line->data['income']->color = 'blue';
+ $line->data['income']->symbol = ezcGraph::diamond;
- $line['incomeWithTax'] = array( 1990 => 4.9, 5.0, 5.2, 5.1, 6.4 );
- $line['incomeWithTax']->color = 'red';
- $line['incomeWithTax']->symbol = ezcGraph::squareWithChupi;
+ $line->data['incomeWithTax'] = new ezcGraphArrayDataSet(
+ array( 1990 => 4.9, 5.0, 5.2, 5.1, 6.4 )
+ );
+ $line->data['incomeWithTax']->color = 'red';
+ $line->data['incomeWithTax']->symbol = ezcGraph::squareWithChupi;
// Create a new averaging line
- $line['averageIncome'] = ezcDataSetAverage::createFrom($line->income[, options]);
+ $line->data['averageIncome'] = new ezcGraphAverageDatasSet( $line->data['income'] [, options] );
$line->renderer = new ezcGraphRenderer2D();
$line->driver = new ezcGraphGDDriver();
OpenPOWER on IntegriCloud