Skip to content

Commit 1ff5d15

Browse files
authored
Merge pull request #28 from Practically/feat/27
feat: add support for stacked charts
2 parents 2a8e6c3 + dd9808d commit 1ff5d15

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/BaseDataset.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ abstract class BaseDataset extends \yii\base\Component
119119
*/
120120
public $label = '';
121121

122+
/**
123+
* @var string|null
124+
*/
125+
public $xAxisID = null;
126+
127+
/**
128+
* @var string|null
129+
*/
130+
public $yAxisID = null;
131+
132+
/**
133+
* @var string|null
134+
*/
135+
public $stack = null;
136+
122137
/**
123138
* Populates `$this->data` manipulating a query row into the correct format
124139
* for the dataset format use are using
@@ -192,6 +207,18 @@ public function getDataset()
192207
$dataset['label'] = $this->label;
193208
}
194209

210+
if ($this->xAxisID !== null) {
211+
$dataset['xAxisID'] = $this->xAxisID;
212+
}
213+
214+
if ($this->yAxisID !== null) {
215+
$dataset['yAxisID'] = $this->yAxisID;
216+
}
217+
218+
if ($this->stack !== null) {
219+
$dataset['stack'] = $this->stack;
220+
}
221+
195222
return $dataset;
196223
}
197224

0 commit comments

Comments
 (0)