diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-05-10 15:47:46 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-05-10 15:47:46 +0000 |
commit | 9b1f82b08a5fb5b6cbc6f8f478dd987df9b02053 (patch) | |
tree | 01b6027151314286e051f07ae7ce29f98856c3f2 /src/charts/pie.php | |
parent | abea356249129ec79d757b514781695b248dcb92 (diff) | |
download | zetacomponents-graph-9b1f82b08a5fb5b6cbc6f8f478dd987df9b02053.zip zetacomponents-graph-9b1f82b08a5fb5b6cbc6f8f478dd987df9b02053.tar.gz |
- Added tests to retrieve and set single data in datasets
- Implemented datasets as far as tested
Diffstat (limited to 'src/charts/pie.php')
-rw-r--r-- | src/charts/pie.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/charts/pie.php b/src/charts/pie.php index dc774c4..5ac49e8 100644 --- a/src/charts/pie.php +++ b/src/charts/pie.php @@ -25,5 +25,28 @@ class ezcGraphPieChart extends ezcGraphChart { } + + /** + * Adds a dataset to the charts data + * + * @param string $name Name of dataset + * @param mixed $values Values to create dataset with + * @throws ezcGraphTooManyDatasetExceptions + * If too many datasets are created + * @return ezcGraphDataset + */ + protected function addDataSet( $name, $values ) + { + if ( count( $this->data ) >= 1 && + !isset( $this->data[$name] ) ) + { + throw new ezcGraphTooManyDatasetsExceptions( $name ); + } + else + { + parent::addDataSet( $name, $values ); + } + } + } ?> |