summaryrefslogtreecommitdiffstats
path: root/src/charts/pie.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-05-10 15:47:46 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-05-10 15:47:46 +0000
commit9b1f82b08a5fb5b6cbc6f8f478dd987df9b02053 (patch)
tree01b6027151314286e051f07ae7ce29f98856c3f2 /src/charts/pie.php
parentabea356249129ec79d757b514781695b248dcb92 (diff)
downloadzetacomponents-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.php23
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 );
+ }
+ }
+
}
?>
OpenPOWER on IntegriCloud