-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
604 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material; | ||
|
||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\BarChart\Material\BarChartOptions; | ||
|
||
/** | ||
* Class BarChart | ||
* | ||
* @author Christophe Meneses | ||
*/ | ||
class BarChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\BarChart | ||
{ | ||
/** | ||
* BarChart constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->options = new BarChartOptions(); | ||
$this->options->setBars('horizontal'); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getPackage() | ||
{ | ||
return 'bar'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getLibrary() | ||
{ | ||
return 'charts'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getType() | ||
{ | ||
return 'Bar'; | ||
} | ||
|
||
/** | ||
* @return BarChartOptions | ||
*/ | ||
public function getOptions() | ||
{ | ||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material; | ||
|
||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ColumnChart\Material\ColumnChartOptions; | ||
|
||
/** | ||
* Class ColumnChart | ||
* | ||
* @author Christophe Meneses | ||
*/ | ||
class ColumnChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\ColumnChart | ||
{ | ||
/** | ||
* ColumnChart constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->options = new ColumnChartOptions(); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getPackage() | ||
{ | ||
return 'bar'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getLibrary() | ||
{ | ||
return 'charts'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getType() | ||
{ | ||
return 'Bar'; | ||
} | ||
|
||
/** | ||
* @return ColumnChartOptions | ||
*/ | ||
public function getOptions() | ||
{ | ||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material; | ||
|
||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineChart\Material\LineChartOptions; | ||
|
||
/** | ||
* Class LineChart | ||
* | ||
* @author Christophe Meneses | ||
*/ | ||
class LineChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\LineChart | ||
{ | ||
/** | ||
* LineChart constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->options = new LineChartOptions(); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getPackage() | ||
{ | ||
return 'line'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getLibrary() | ||
{ | ||
return 'charts'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getType() | ||
{ | ||
return 'Line'; | ||
} | ||
|
||
/** | ||
* @return LineChartOptions | ||
*/ | ||
public function getOptions() | ||
{ | ||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material; | ||
|
||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ScatterChart\Material\ScatterChartOptions; | ||
|
||
/** | ||
* Class ScatterChart | ||
* | ||
* @author Christophe Meneses | ||
*/ | ||
class ScatterChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\ScatterChart | ||
{ | ||
/** | ||
* ScatterChart constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->options = new ScatterChartOptions(); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getPackage() | ||
{ | ||
return 'scatter'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getLibrary() | ||
{ | ||
return 'charts'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getType() | ||
{ | ||
return 'Scatter'; | ||
} | ||
|
||
/** | ||
* @return ScatterChartOptions | ||
*/ | ||
public function getOptions() | ||
{ | ||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
GoogleCharts/Options/BarChart/Material/BarChartOptions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\BarChart\Material; | ||
|
||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Material\Chart; | ||
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Material\MaterialTrait; | ||
|
||
/** | ||
* Class BarChartOptions | ||
* | ||
* @author Christophe Meneses | ||
*/ | ||
class BarChartOptions extends \CMEN\GoogleChartsBundle\GoogleCharts\Options\BarChart\BarChartOptions | ||
{ | ||
use MaterialTrait; | ||
|
||
/** | ||
* Whether the bars in a Material Bar Chart are vertical or horizontal. | ||
* | ||
* @var string | ||
*/ | ||
protected $bars; | ||
|
||
/** | ||
* BarChartOptions constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->chart = new Chart(); | ||
} | ||
|
||
/** | ||
* @param string $bars | ||
* | ||
* @return BarChartOptions | ||
*/ | ||
public function setBars($bars) | ||
{ | ||
$this->bars = $bars; | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.