Added extra configuration options to column chart
This commit is contained in:
@@ -13,6 +13,10 @@ class ColumnChartModel extends BaseChartModel
|
||||
{
|
||||
public $opacity;
|
||||
|
||||
public $columnWidth;
|
||||
|
||||
public $horizontal;
|
||||
|
||||
public $isMultiColumn;
|
||||
|
||||
public $isStacked;
|
||||
@@ -27,7 +31,11 @@ class ColumnChartModel extends BaseChartModel
|
||||
|
||||
$this->onColumnClickEventName = null;
|
||||
|
||||
$this->opacity = 0.5;
|
||||
$this->opacity = 0.75;
|
||||
|
||||
$this->columnWidth = 70;
|
||||
|
||||
$this->horizontal = false;
|
||||
|
||||
$this->isMultiColumn = false;
|
||||
|
||||
@@ -57,6 +65,20 @@ class ColumnChartModel extends BaseChartModel
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setHorizontal($value)
|
||||
{
|
||||
$this->horizontal = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setColumnWidth($value)
|
||||
{
|
||||
$this->columnWidth = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setOpacity($opacity)
|
||||
{
|
||||
$this->opacity = $opacity;
|
||||
@@ -104,6 +126,8 @@ class ColumnChartModel extends BaseChartModel
|
||||
return array_merge(parent::toArray(), [
|
||||
'onColumnClickEventName' => $this->onColumnClickEventName,
|
||||
'opacity' => $this->opacity,
|
||||
'horizontal' => $this->horizontal,
|
||||
'columnWidth' => $this->columnWidth,
|
||||
'isMultiColumn' => $this->isMultiColumn,
|
||||
'isStacked' => $this->isStacked,
|
||||
'data' => $this->data->toArray(),
|
||||
@@ -118,6 +142,10 @@ class ColumnChartModel extends BaseChartModel
|
||||
|
||||
$this->opacity = data_get($array, 'opacity', 0.5);
|
||||
|
||||
$this->columnWidth = data_get($array, 'columnWidth', 70);
|
||||
|
||||
$this->horizontal = data_get($array, 'horizontal', false);
|
||||
|
||||
$this->isMultiColumn = data_get($array, 'isMultiColumn', false);
|
||||
|
||||
$this->isStacked = data_get($array, 'isStacked', false);
|
||||
|
||||
Reference in New Issue
Block a user