public function __construct() { parent::__construct(); $this->type = new GoogleChartType(GoogleChartType::TWO_DIMENSIONAL_PIE); $this->color = GoogleChartColor::create(); $this->label = GoogleChartLabel::create(); $this->data = GoogleChartData::create()->addDataSet(GoogleChartDataSet::create())->setEncoding(GoogleChartDataTextEncoding::create()); }
public function __construct($width, $height) { if ($width > self::MAX_WIDTH) { throw new InvalidArgumentException(sprintf('Max width for Map Chart is %d.', self::MAX_WIDTH)); } if ($height > self::MAX_HEIGHT) { throw new InvalidArgumentException(sprintf('Max height for Map Chart is %d.', self::MAX_HEIGHT)); } parent::__construct('t', $width, $height); }
public function __construct() { parent::__construct(); $this->type = new GoogleChartType(GoogleChartType::LINE); $this->color = GoogleChartColor::create(); $this->legend = GoogleChartLegend::create()->setPosition(GoogleChartLegendPositionType::create(GoogleChartLegendPositionType::BOTTOM)); $this->data = GoogleChartData::create()->setEncoding(GoogleChartDataTextEncoding::create())->setDataScaling(); $this->axesCollection = GoogleChartAxisCollection::create(); $this->style = GoogleChartLineStyle::create(); $this->labelStyle = GoogleChartLabelStyle::create(); }
/** * Construct via parent, adding chart title if passed. * * Also create data array structure. * * @param string $title - chart title * * @access public */ public function __construct($title = false) { parent::__construct($title); $this->data = array("x" => array(), "y" => array(), "size" => array()); }
/** * Construct via parent, adding chart title if passed. * * @param string $title - chart title * * @access public */ public function __construct($title = false) { parent::__construct($title); }
public function __construct($type, $width, $height) { parent::__construct($type, $width, $height); $this->setScale(0, 100); }