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() { 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(); }