@@ -16,16 +16,16 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class PolarArea extends Chart implements ChartInterface |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * The internal type of chart. |
|
| 21 | - */ |
|
| 22 | - const TYPE = 'polarArea'; |
|
| 19 | + /** |
|
| 20 | + * The internal type of chart. |
|
| 21 | + */ |
|
| 22 | + const TYPE = 'polarArea'; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * The list of models that should be used for this chart type. |
|
| 26 | - */ |
|
| 27 | - const MODEL = [ |
|
| 28 | - 'dataset' => PolarAreaDataSet::class, |
|
| 29 | - 'options' => PolarAreaOptions::class, |
|
| 30 | - ]; |
|
| 24 | + /** |
|
| 25 | + * The list of models that should be used for this chart type. |
|
| 26 | + */ |
|
| 27 | + const MODEL = [ |
|
| 28 | + 'dataset' => PolarAreaDataSet::class, |
|
| 29 | + 'options' => PolarAreaOptions::class, |
|
| 30 | + ]; |
|
| 31 | 31 | } |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class Line extends Chart |
| 15 | 15 | { |
| 16 | - /** |
|
| 17 | - * The internal type of chart. |
|
| 18 | - */ |
|
| 19 | - const TYPE = 'line'; |
|
| 16 | + /** |
|
| 17 | + * The internal type of chart. |
|
| 18 | + */ |
|
| 19 | + const TYPE = 'line'; |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * The list of models that should be used for this chart type. |
|
| 23 | - */ |
|
| 24 | - const MODEL = [ |
|
| 25 | - 'dataset' => LineDataSet::class, |
|
| 26 | - 'options' => LineOptions::class, |
|
| 27 | - ]; |
|
| 21 | + /** |
|
| 22 | + * The list of models that should be used for this chart type. |
|
| 23 | + */ |
|
| 24 | + const MODEL = [ |
|
| 25 | + 'dataset' => LineDataSet::class, |
|
| 26 | + 'options' => LineOptions::class, |
|
| 27 | + ]; |
|
| 28 | 28 | } |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Doughnut extends Pie |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * The internal type of chart. |
|
| 13 | - */ |
|
| 14 | - const TYPE = 'doughnut'; |
|
| 11 | + /** |
|
| 12 | + * The internal type of chart. |
|
| 13 | + */ |
|
| 14 | + const TYPE = 'doughnut'; |
|
| 15 | 15 | } |
@@ -15,16 +15,16 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Bar extends Chart |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * The internal type of chart. |
|
| 20 | - */ |
|
| 21 | - const TYPE = 'bar'; |
|
| 18 | + /** |
|
| 19 | + * The internal type of chart. |
|
| 20 | + */ |
|
| 21 | + const TYPE = 'bar'; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * The list of models that should be used for this chart type. |
|
| 25 | - */ |
|
| 26 | - const MODEL = [ |
|
| 27 | - 'dataset' => BarDataSet::class, |
|
| 28 | - 'options' => BarOptions::class, |
|
| 29 | - ]; |
|
| 23 | + /** |
|
| 24 | + * The list of models that should be used for this chart type. |
|
| 25 | + */ |
|
| 26 | + const MODEL = [ |
|
| 27 | + 'dataset' => BarDataSet::class, |
|
| 28 | + 'options' => BarOptions::class, |
|
| 29 | + ]; |
|
| 30 | 30 | } |
@@ -16,16 +16,16 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class Scatter extends Chart |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * The internal type of chart. |
|
| 21 | - */ |
|
| 22 | - const TYPE = 'scatter'; |
|
| 19 | + /** |
|
| 20 | + * The internal type of chart. |
|
| 21 | + */ |
|
| 22 | + const TYPE = 'scatter'; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * The list of models that should be used for this chart type. |
|
| 26 | - */ |
|
| 27 | - const MODEL = [ |
|
| 28 | - 'dataset' => ScatterDataSet::class, |
|
| 29 | - 'options' => ScatterOptions::class, |
|
| 30 | - ]; |
|
| 24 | + /** |
|
| 25 | + * The list of models that should be used for this chart type. |
|
| 26 | + */ |
|
| 27 | + const MODEL = [ |
|
| 28 | + 'dataset' => ScatterDataSet::class, |
|
| 29 | + 'options' => ScatterOptions::class, |
|
| 30 | + ]; |
|
| 31 | 31 | } |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class HorizontalBar extends Bar |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * The internal type of chart. |
|
| 13 | - */ |
|
| 14 | - const TYPE = 'horizontalBar'; |
|
| 11 | + /** |
|
| 12 | + * The internal type of chart. |
|
| 13 | + */ |
|
| 14 | + const TYPE = 'horizontalBar'; |
|
| 15 | 15 | } |
@@ -16,16 +16,16 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class Pie extends Chart implements ChartInterface |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * The internal type of chart. |
|
| 21 | - */ |
|
| 22 | - const TYPE = 'pie'; |
|
| 19 | + /** |
|
| 20 | + * The internal type of chart. |
|
| 21 | + */ |
|
| 22 | + const TYPE = 'pie'; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * The list of models that should be used for this chart type. |
|
| 26 | - */ |
|
| 27 | - const MODEL = [ |
|
| 28 | - 'dataset' => PieDataSet::class, |
|
| 29 | - 'options' => PieOptions::class, |
|
| 30 | - ]; |
|
| 24 | + /** |
|
| 25 | + * The list of models that should be used for this chart type. |
|
| 26 | + */ |
|
| 27 | + const MODEL = [ |
|
| 28 | + 'dataset' => PieDataSet::class, |
|
| 29 | + 'options' => PieOptions::class, |
|
| 30 | + ]; |
|
| 31 | 31 | } |
@@ -11,25 +11,25 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class DataSetCollection extends ArrayAccess implements \JsonSerializable |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * @return array |
|
| 16 | - */ |
|
| 17 | - public function getArrayCopy() |
|
| 18 | - { |
|
| 19 | - $rows = []; |
|
| 20 | - foreach ($this->data as $row) { |
|
| 21 | - /** @var DataSet $row */ |
|
| 22 | - $rows[] = $row->getArrayCopy(); |
|
| 23 | - } |
|
| 14 | + /** |
|
| 15 | + * @return array |
|
| 16 | + */ |
|
| 17 | + public function getArrayCopy() |
|
| 18 | + { |
|
| 19 | + $rows = []; |
|
| 20 | + foreach ($this->data as $row) { |
|
| 21 | + /** @var DataSet $row */ |
|
| 22 | + $rows[] = $row->getArrayCopy(); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - return $rows; |
|
| 26 | - } |
|
| 25 | + return $rows; |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @return string |
|
| 30 | - */ |
|
| 31 | - public function jsonSerialize() |
|
| 32 | - { |
|
| 33 | - return Json::encode($this->getArrayCopy()); |
|
| 34 | - } |
|
| 28 | + /** |
|
| 29 | + * @return string |
|
| 30 | + */ |
|
| 31 | + public function jsonSerialize() |
|
| 32 | + { |
|
| 33 | + return Json::encode($this->getArrayCopy()); |
|
| 34 | + } |
|
| 35 | 35 | } |
@@ -16,10 +16,10 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function getArrayCopy() |
| 18 | 18 | { |
| 19 | - $rows = []; |
|
| 19 | + $rows = [ ]; |
|
| 20 | 20 | foreach ($this->data as $row) { |
| 21 | 21 | /** @var DataSet $row */ |
| 22 | - $rows[] = $row->getArrayCopy(); |
|
| 22 | + $rows[ ] = $row->getArrayCopy(); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | return $rows; |
@@ -13,348 +13,348 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class DataSet implements ChartOwnedInterface, ArraySerializableInterface, \JsonSerializable |
| 15 | 15 | { |
| 16 | - use ChartOwned; |
|
| 17 | - use ArraySerializable; |
|
| 18 | - |
|
| 19 | - /** |
|
| 20 | - * @var string |
|
| 21 | - */ |
|
| 22 | - protected $type; |
|
| 23 | - |
|
| 24 | - /** |
|
| 25 | - * @var Data |
|
| 26 | - */ |
|
| 27 | - protected $data; |
|
| 28 | - |
|
| 29 | - /** |
|
| 30 | - * @var string |
|
| 31 | - */ |
|
| 32 | - protected $label; |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 37 | - protected $xAxisID; |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * @var string |
|
| 41 | - */ |
|
| 42 | - protected $yAxisID; |
|
| 43 | - |
|
| 44 | - /** |
|
| 45 | - * @var string|string[] |
|
| 46 | - */ |
|
| 47 | - protected $backgroundColor; |
|
| 48 | - |
|
| 49 | - /** |
|
| 50 | - * @var string|string[] |
|
| 51 | - */ |
|
| 52 | - protected $borderColor; |
|
| 53 | - |
|
| 54 | - /** |
|
| 55 | - * @var int|int[] |
|
| 56 | - */ |
|
| 57 | - protected $borderWidth; |
|
| 58 | - |
|
| 59 | - /** |
|
| 60 | - * @var string |
|
| 61 | - */ |
|
| 62 | - protected $borderSkipped; |
|
| 63 | - |
|
| 64 | - /** |
|
| 65 | - * @var string|string[] |
|
| 66 | - */ |
|
| 67 | - protected $hoverBackgroundColor; |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * @var string|string[] |
|
| 71 | - */ |
|
| 72 | - protected $hoverBorderColor; |
|
| 73 | - |
|
| 74 | - /** |
|
| 75 | - * @var int|int[] |
|
| 76 | - */ |
|
| 77 | - protected $hoverBorderWidth; |
|
| 78 | - |
|
| 79 | - /** |
|
| 80 | - * @return string |
|
| 81 | - */ |
|
| 82 | - public function getType() |
|
| 83 | - { |
|
| 84 | - return $this->type; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * @param string $type |
|
| 89 | - * |
|
| 90 | - * @return $this |
|
| 91 | - */ |
|
| 92 | - public function setType($type) |
|
| 93 | - { |
|
| 94 | - $this->type = $type; |
|
| 95 | - |
|
| 96 | - return $this; |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * @return Data |
|
| 101 | - */ |
|
| 102 | - public function data() |
|
| 103 | - { |
|
| 104 | - if (is_null($this->data)) { |
|
| 105 | - $this->data = new Data(); |
|
| 106 | - } |
|
| 107 | - |
|
| 108 | - return $this->data; |
|
| 109 | - } |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * @return string |
|
| 113 | - */ |
|
| 114 | - public function getLabel() |
|
| 115 | - { |
|
| 116 | - return $this->label; |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - /** |
|
| 120 | - * @param string $label |
|
| 121 | - * |
|
| 122 | - * @return $this |
|
| 123 | - */ |
|
| 124 | - public function setLabel($label) |
|
| 125 | - { |
|
| 126 | - $this->label = strval($label); |
|
| 127 | - |
|
| 128 | - return $this; |
|
| 129 | - } |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * @return string |
|
| 133 | - */ |
|
| 134 | - public function getXAxisID() |
|
| 135 | - { |
|
| 136 | - return $this->xAxisID; |
|
| 137 | - } |
|
| 138 | - |
|
| 139 | - /** |
|
| 140 | - * @param string $xAxisID |
|
| 141 | - * |
|
| 142 | - * @return $this |
|
| 143 | - */ |
|
| 144 | - public function setXAxisID($xAxisID) |
|
| 145 | - { |
|
| 146 | - $this->xAxisID = strval($xAxisID); |
|
| 147 | - |
|
| 148 | - return $this; |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - /** |
|
| 152 | - * @return string |
|
| 153 | - */ |
|
| 154 | - public function getYAxisID() |
|
| 155 | - { |
|
| 156 | - return $this->yAxisID; |
|
| 157 | - } |
|
| 158 | - |
|
| 159 | - /** |
|
| 160 | - * @param string $yAxisID |
|
| 161 | - * |
|
| 162 | - * @return $this |
|
| 163 | - */ |
|
| 164 | - public function setYAxisID($yAxisID) |
|
| 165 | - { |
|
| 166 | - $this->yAxisID = strval($yAxisID); |
|
| 167 | - |
|
| 168 | - return $this; |
|
| 169 | - } |
|
| 170 | - |
|
| 171 | - /** |
|
| 172 | - * @return string|string[] |
|
| 173 | - */ |
|
| 174 | - public function getBackgroundColor() |
|
| 175 | - { |
|
| 176 | - return $this->backgroundColor; |
|
| 177 | - } |
|
| 178 | - |
|
| 179 | - /** |
|
| 180 | - * @param string|string[] $backgroundColor |
|
| 181 | - * |
|
| 182 | - * @return $this |
|
| 183 | - */ |
|
| 184 | - public function setBackgroundColor($backgroundColor) |
|
| 185 | - { |
|
| 186 | - if (is_array($backgroundColor)) { |
|
| 187 | - $backgroundColor = array_map('strval', $backgroundColor); |
|
| 188 | - } |
|
| 189 | - if (! is_array($backgroundColor)) { |
|
| 190 | - $backgroundColor = strval($backgroundColor); |
|
| 191 | - } |
|
| 192 | - |
|
| 193 | - $this->backgroundColor = $backgroundColor; |
|
| 194 | - |
|
| 195 | - return $this; |
|
| 196 | - } |
|
| 197 | - |
|
| 198 | - /** |
|
| 199 | - * @return string|string[] |
|
| 200 | - */ |
|
| 201 | - public function getBorderColor() |
|
| 202 | - { |
|
| 203 | - return $this->borderColor; |
|
| 204 | - } |
|
| 205 | - |
|
| 206 | - /** |
|
| 207 | - * @param string|string[] $borderColor |
|
| 208 | - * |
|
| 209 | - * @return $this |
|
| 210 | - */ |
|
| 211 | - public function setBorderColor($borderColor) |
|
| 212 | - { |
|
| 213 | - if (is_array($borderColor)) { |
|
| 214 | - $borderColor = array_map('strval', $borderColor); |
|
| 215 | - } |
|
| 216 | - if (! is_array($borderColor)) { |
|
| 217 | - $borderColor = strval($borderColor); |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - $this->borderColor = $borderColor; |
|
| 221 | - |
|
| 222 | - return $this; |
|
| 223 | - } |
|
| 224 | - |
|
| 225 | - /** |
|
| 226 | - * @return int|int[] |
|
| 227 | - */ |
|
| 228 | - public function getBorderWidth() |
|
| 229 | - { |
|
| 230 | - return $this->borderWidth; |
|
| 231 | - } |
|
| 232 | - |
|
| 233 | - /** |
|
| 234 | - * @param int|int[] $borderWidth |
|
| 235 | - * |
|
| 236 | - * @return $this |
|
| 237 | - */ |
|
| 238 | - public function setBorderWidth($borderWidth) |
|
| 239 | - { |
|
| 240 | - if (is_array($borderWidth)) { |
|
| 241 | - $borderWidth = array_map('intval', $borderWidth); |
|
| 242 | - } |
|
| 243 | - if (! is_array($borderWidth)) { |
|
| 244 | - $borderWidth = intval($borderWidth); |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - $this->borderWidth = $borderWidth; |
|
| 248 | - |
|
| 249 | - return $this; |
|
| 250 | - } |
|
| 251 | - |
|
| 252 | - /** |
|
| 253 | - * @return string |
|
| 254 | - */ |
|
| 255 | - public function getBorderSkipped() |
|
| 256 | - { |
|
| 257 | - return $this->borderSkipped; |
|
| 258 | - } |
|
| 259 | - |
|
| 260 | - /** |
|
| 261 | - * @param string $borderSkipped |
|
| 262 | - * |
|
| 263 | - * @return $this |
|
| 264 | - */ |
|
| 265 | - public function setBorderSkipped($borderSkipped) |
|
| 266 | - { |
|
| 267 | - $this->borderSkipped = strval($borderSkipped); |
|
| 268 | - |
|
| 269 | - return $this; |
|
| 270 | - } |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * @return string|string[] |
|
| 274 | - */ |
|
| 275 | - public function getHoverBackgroundColor() |
|
| 276 | - { |
|
| 277 | - return $this->hoverBackgroundColor; |
|
| 278 | - } |
|
| 279 | - |
|
| 280 | - /** |
|
| 281 | - * @param string|string[] $hoverBackgroundColor |
|
| 282 | - * |
|
| 283 | - * @return $this |
|
| 284 | - */ |
|
| 285 | - public function setHoverBackgroundColor($hoverBackgroundColor) |
|
| 286 | - { |
|
| 287 | - if (is_array($hoverBackgroundColor)) { |
|
| 288 | - $hoverBackgroundColor = array_map('strval', $hoverBackgroundColor); |
|
| 289 | - } |
|
| 290 | - if (! is_array($hoverBackgroundColor)) { |
|
| 291 | - $hoverBackgroundColor = strval($hoverBackgroundColor); |
|
| 292 | - } |
|
| 293 | - |
|
| 294 | - $this->hoverBackgroundColor = $hoverBackgroundColor; |
|
| 295 | - |
|
| 296 | - return $this; |
|
| 297 | - } |
|
| 298 | - |
|
| 299 | - /** |
|
| 300 | - * @return string|string[] |
|
| 301 | - */ |
|
| 302 | - public function getHoverBorderColor() |
|
| 303 | - { |
|
| 304 | - return $this->hoverBorderColor; |
|
| 305 | - } |
|
| 306 | - |
|
| 307 | - /** |
|
| 308 | - * @param string|string[] $hoverBorderColor |
|
| 309 | - * |
|
| 310 | - * @return $this |
|
| 311 | - */ |
|
| 312 | - public function setHoverBorderColor($hoverBorderColor) |
|
| 313 | - { |
|
| 314 | - if (is_array($hoverBorderColor)) { |
|
| 315 | - $hoverBorderColor = array_map('strval', $hoverBorderColor); |
|
| 316 | - } |
|
| 317 | - if (! is_array($hoverBorderColor)) { |
|
| 318 | - $hoverBorderColor = strval($hoverBorderColor); |
|
| 319 | - } |
|
| 320 | - |
|
| 321 | - $this->hoverBorderColor = $hoverBorderColor; |
|
| 322 | - |
|
| 323 | - return $this; |
|
| 324 | - } |
|
| 325 | - |
|
| 326 | - /** |
|
| 327 | - * @return int|int[] |
|
| 328 | - */ |
|
| 329 | - public function getHoverBorderWidth() |
|
| 330 | - { |
|
| 331 | - return $this->hoverBorderWidth; |
|
| 332 | - } |
|
| 333 | - |
|
| 334 | - /** |
|
| 335 | - * @param int|int[] $hoverBorderWidth |
|
| 336 | - * |
|
| 337 | - * @return $this |
|
| 338 | - */ |
|
| 339 | - public function setHoverBorderWidth($hoverBorderWidth) |
|
| 340 | - { |
|
| 341 | - if (is_array($hoverBorderWidth)) { |
|
| 342 | - $hoverBorderWidth = array_map('intval', $hoverBorderWidth); |
|
| 343 | - } |
|
| 344 | - if (! is_array($hoverBorderWidth)) { |
|
| 345 | - $hoverBorderWidth = intval($hoverBorderWidth); |
|
| 346 | - } |
|
| 347 | - |
|
| 348 | - $this->hoverBorderWidth = $hoverBorderWidth; |
|
| 349 | - |
|
| 350 | - return $this; |
|
| 351 | - } |
|
| 352 | - |
|
| 353 | - /** |
|
| 354 | - * |
|
| 355 | - */ |
|
| 356 | - public function jsonSerialize() |
|
| 357 | - { |
|
| 358 | - return Json::encode($this->getArrayCopy()); |
|
| 359 | - } |
|
| 16 | + use ChartOwned; |
|
| 17 | + use ArraySerializable; |
|
| 18 | + |
|
| 19 | + /** |
|
| 20 | + * @var string |
|
| 21 | + */ |
|
| 22 | + protected $type; |
|
| 23 | + |
|
| 24 | + /** |
|
| 25 | + * @var Data |
|
| 26 | + */ |
|
| 27 | + protected $data; |
|
| 28 | + |
|
| 29 | + /** |
|
| 30 | + * @var string |
|
| 31 | + */ |
|
| 32 | + protected $label; |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | + protected $xAxisID; |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * @var string |
|
| 41 | + */ |
|
| 42 | + protected $yAxisID; |
|
| 43 | + |
|
| 44 | + /** |
|
| 45 | + * @var string|string[] |
|
| 46 | + */ |
|
| 47 | + protected $backgroundColor; |
|
| 48 | + |
|
| 49 | + /** |
|
| 50 | + * @var string|string[] |
|
| 51 | + */ |
|
| 52 | + protected $borderColor; |
|
| 53 | + |
|
| 54 | + /** |
|
| 55 | + * @var int|int[] |
|
| 56 | + */ |
|
| 57 | + protected $borderWidth; |
|
| 58 | + |
|
| 59 | + /** |
|
| 60 | + * @var string |
|
| 61 | + */ |
|
| 62 | + protected $borderSkipped; |
|
| 63 | + |
|
| 64 | + /** |
|
| 65 | + * @var string|string[] |
|
| 66 | + */ |
|
| 67 | + protected $hoverBackgroundColor; |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * @var string|string[] |
|
| 71 | + */ |
|
| 72 | + protected $hoverBorderColor; |
|
| 73 | + |
|
| 74 | + /** |
|
| 75 | + * @var int|int[] |
|
| 76 | + */ |
|
| 77 | + protected $hoverBorderWidth; |
|
| 78 | + |
|
| 79 | + /** |
|
| 80 | + * @return string |
|
| 81 | + */ |
|
| 82 | + public function getType() |
|
| 83 | + { |
|
| 84 | + return $this->type; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * @param string $type |
|
| 89 | + * |
|
| 90 | + * @return $this |
|
| 91 | + */ |
|
| 92 | + public function setType($type) |
|
| 93 | + { |
|
| 94 | + $this->type = $type; |
|
| 95 | + |
|
| 96 | + return $this; |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * @return Data |
|
| 101 | + */ |
|
| 102 | + public function data() |
|
| 103 | + { |
|
| 104 | + if (is_null($this->data)) { |
|
| 105 | + $this->data = new Data(); |
|
| 106 | + } |
|
| 107 | + |
|
| 108 | + return $this->data; |
|
| 109 | + } |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * @return string |
|
| 113 | + */ |
|
| 114 | + public function getLabel() |
|
| 115 | + { |
|
| 116 | + return $this->label; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + /** |
|
| 120 | + * @param string $label |
|
| 121 | + * |
|
| 122 | + * @return $this |
|
| 123 | + */ |
|
| 124 | + public function setLabel($label) |
|
| 125 | + { |
|
| 126 | + $this->label = strval($label); |
|
| 127 | + |
|
| 128 | + return $this; |
|
| 129 | + } |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * @return string |
|
| 133 | + */ |
|
| 134 | + public function getXAxisID() |
|
| 135 | + { |
|
| 136 | + return $this->xAxisID; |
|
| 137 | + } |
|
| 138 | + |
|
| 139 | + /** |
|
| 140 | + * @param string $xAxisID |
|
| 141 | + * |
|
| 142 | + * @return $this |
|
| 143 | + */ |
|
| 144 | + public function setXAxisID($xAxisID) |
|
| 145 | + { |
|
| 146 | + $this->xAxisID = strval($xAxisID); |
|
| 147 | + |
|
| 148 | + return $this; |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * @return string |
|
| 153 | + */ |
|
| 154 | + public function getYAxisID() |
|
| 155 | + { |
|
| 156 | + return $this->yAxisID; |
|
| 157 | + } |
|
| 158 | + |
|
| 159 | + /** |
|
| 160 | + * @param string $yAxisID |
|
| 161 | + * |
|
| 162 | + * @return $this |
|
| 163 | + */ |
|
| 164 | + public function setYAxisID($yAxisID) |
|
| 165 | + { |
|
| 166 | + $this->yAxisID = strval($yAxisID); |
|
| 167 | + |
|
| 168 | + return $this; |
|
| 169 | + } |
|
| 170 | + |
|
| 171 | + /** |
|
| 172 | + * @return string|string[] |
|
| 173 | + */ |
|
| 174 | + public function getBackgroundColor() |
|
| 175 | + { |
|
| 176 | + return $this->backgroundColor; |
|
| 177 | + } |
|
| 178 | + |
|
| 179 | + /** |
|
| 180 | + * @param string|string[] $backgroundColor |
|
| 181 | + * |
|
| 182 | + * @return $this |
|
| 183 | + */ |
|
| 184 | + public function setBackgroundColor($backgroundColor) |
|
| 185 | + { |
|
| 186 | + if (is_array($backgroundColor)) { |
|
| 187 | + $backgroundColor = array_map('strval', $backgroundColor); |
|
| 188 | + } |
|
| 189 | + if (! is_array($backgroundColor)) { |
|
| 190 | + $backgroundColor = strval($backgroundColor); |
|
| 191 | + } |
|
| 192 | + |
|
| 193 | + $this->backgroundColor = $backgroundColor; |
|
| 194 | + |
|
| 195 | + return $this; |
|
| 196 | + } |
|
| 197 | + |
|
| 198 | + /** |
|
| 199 | + * @return string|string[] |
|
| 200 | + */ |
|
| 201 | + public function getBorderColor() |
|
| 202 | + { |
|
| 203 | + return $this->borderColor; |
|
| 204 | + } |
|
| 205 | + |
|
| 206 | + /** |
|
| 207 | + * @param string|string[] $borderColor |
|
| 208 | + * |
|
| 209 | + * @return $this |
|
| 210 | + */ |
|
| 211 | + public function setBorderColor($borderColor) |
|
| 212 | + { |
|
| 213 | + if (is_array($borderColor)) { |
|
| 214 | + $borderColor = array_map('strval', $borderColor); |
|
| 215 | + } |
|
| 216 | + if (! is_array($borderColor)) { |
|
| 217 | + $borderColor = strval($borderColor); |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + $this->borderColor = $borderColor; |
|
| 221 | + |
|
| 222 | + return $this; |
|
| 223 | + } |
|
| 224 | + |
|
| 225 | + /** |
|
| 226 | + * @return int|int[] |
|
| 227 | + */ |
|
| 228 | + public function getBorderWidth() |
|
| 229 | + { |
|
| 230 | + return $this->borderWidth; |
|
| 231 | + } |
|
| 232 | + |
|
| 233 | + /** |
|
| 234 | + * @param int|int[] $borderWidth |
|
| 235 | + * |
|
| 236 | + * @return $this |
|
| 237 | + */ |
|
| 238 | + public function setBorderWidth($borderWidth) |
|
| 239 | + { |
|
| 240 | + if (is_array($borderWidth)) { |
|
| 241 | + $borderWidth = array_map('intval', $borderWidth); |
|
| 242 | + } |
|
| 243 | + if (! is_array($borderWidth)) { |
|
| 244 | + $borderWidth = intval($borderWidth); |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + $this->borderWidth = $borderWidth; |
|
| 248 | + |
|
| 249 | + return $this; |
|
| 250 | + } |
|
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * @return string |
|
| 254 | + */ |
|
| 255 | + public function getBorderSkipped() |
|
| 256 | + { |
|
| 257 | + return $this->borderSkipped; |
|
| 258 | + } |
|
| 259 | + |
|
| 260 | + /** |
|
| 261 | + * @param string $borderSkipped |
|
| 262 | + * |
|
| 263 | + * @return $this |
|
| 264 | + */ |
|
| 265 | + public function setBorderSkipped($borderSkipped) |
|
| 266 | + { |
|
| 267 | + $this->borderSkipped = strval($borderSkipped); |
|
| 268 | + |
|
| 269 | + return $this; |
|
| 270 | + } |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * @return string|string[] |
|
| 274 | + */ |
|
| 275 | + public function getHoverBackgroundColor() |
|
| 276 | + { |
|
| 277 | + return $this->hoverBackgroundColor; |
|
| 278 | + } |
|
| 279 | + |
|
| 280 | + /** |
|
| 281 | + * @param string|string[] $hoverBackgroundColor |
|
| 282 | + * |
|
| 283 | + * @return $this |
|
| 284 | + */ |
|
| 285 | + public function setHoverBackgroundColor($hoverBackgroundColor) |
|
| 286 | + { |
|
| 287 | + if (is_array($hoverBackgroundColor)) { |
|
| 288 | + $hoverBackgroundColor = array_map('strval', $hoverBackgroundColor); |
|
| 289 | + } |
|
| 290 | + if (! is_array($hoverBackgroundColor)) { |
|
| 291 | + $hoverBackgroundColor = strval($hoverBackgroundColor); |
|
| 292 | + } |
|
| 293 | + |
|
| 294 | + $this->hoverBackgroundColor = $hoverBackgroundColor; |
|
| 295 | + |
|
| 296 | + return $this; |
|
| 297 | + } |
|
| 298 | + |
|
| 299 | + /** |
|
| 300 | + * @return string|string[] |
|
| 301 | + */ |
|
| 302 | + public function getHoverBorderColor() |
|
| 303 | + { |
|
| 304 | + return $this->hoverBorderColor; |
|
| 305 | + } |
|
| 306 | + |
|
| 307 | + /** |
|
| 308 | + * @param string|string[] $hoverBorderColor |
|
| 309 | + * |
|
| 310 | + * @return $this |
|
| 311 | + */ |
|
| 312 | + public function setHoverBorderColor($hoverBorderColor) |
|
| 313 | + { |
|
| 314 | + if (is_array($hoverBorderColor)) { |
|
| 315 | + $hoverBorderColor = array_map('strval', $hoverBorderColor); |
|
| 316 | + } |
|
| 317 | + if (! is_array($hoverBorderColor)) { |
|
| 318 | + $hoverBorderColor = strval($hoverBorderColor); |
|
| 319 | + } |
|
| 320 | + |
|
| 321 | + $this->hoverBorderColor = $hoverBorderColor; |
|
| 322 | + |
|
| 323 | + return $this; |
|
| 324 | + } |
|
| 325 | + |
|
| 326 | + /** |
|
| 327 | + * @return int|int[] |
|
| 328 | + */ |
|
| 329 | + public function getHoverBorderWidth() |
|
| 330 | + { |
|
| 331 | + return $this->hoverBorderWidth; |
|
| 332 | + } |
|
| 333 | + |
|
| 334 | + /** |
|
| 335 | + * @param int|int[] $hoverBorderWidth |
|
| 336 | + * |
|
| 337 | + * @return $this |
|
| 338 | + */ |
|
| 339 | + public function setHoverBorderWidth($hoverBorderWidth) |
|
| 340 | + { |
|
| 341 | + if (is_array($hoverBorderWidth)) { |
|
| 342 | + $hoverBorderWidth = array_map('intval', $hoverBorderWidth); |
|
| 343 | + } |
|
| 344 | + if (! is_array($hoverBorderWidth)) { |
|
| 345 | + $hoverBorderWidth = intval($hoverBorderWidth); |
|
| 346 | + } |
|
| 347 | + |
|
| 348 | + $this->hoverBorderWidth = $hoverBorderWidth; |
|
| 349 | + |
|
| 350 | + return $this; |
|
| 351 | + } |
|
| 352 | + |
|
| 353 | + /** |
|
| 354 | + * |
|
| 355 | + */ |
|
| 356 | + public function jsonSerialize() |
|
| 357 | + { |
|
| 358 | + return Json::encode($this->getArrayCopy()); |
|
| 359 | + } |
|
| 360 | 360 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | if (is_array($backgroundColor)) { |
| 187 | 187 | $backgroundColor = array_map('strval', $backgroundColor); |
| 188 | 188 | } |
| 189 | - if (! is_array($backgroundColor)) { |
|
| 189 | + if (!is_array($backgroundColor)) { |
|
| 190 | 190 | $backgroundColor = strval($backgroundColor); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | if (is_array($borderColor)) { |
| 214 | 214 | $borderColor = array_map('strval', $borderColor); |
| 215 | 215 | } |
| 216 | - if (! is_array($borderColor)) { |
|
| 216 | + if (!is_array($borderColor)) { |
|
| 217 | 217 | $borderColor = strval($borderColor); |
| 218 | 218 | } |
| 219 | 219 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | if (is_array($borderWidth)) { |
| 241 | 241 | $borderWidth = array_map('intval', $borderWidth); |
| 242 | 242 | } |
| 243 | - if (! is_array($borderWidth)) { |
|
| 243 | + if (!is_array($borderWidth)) { |
|
| 244 | 244 | $borderWidth = intval($borderWidth); |
| 245 | 245 | } |
| 246 | 246 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | if (is_array($hoverBackgroundColor)) { |
| 288 | 288 | $hoverBackgroundColor = array_map('strval', $hoverBackgroundColor); |
| 289 | 289 | } |
| 290 | - if (! is_array($hoverBackgroundColor)) { |
|
| 290 | + if (!is_array($hoverBackgroundColor)) { |
|
| 291 | 291 | $hoverBackgroundColor = strval($hoverBackgroundColor); |
| 292 | 292 | } |
| 293 | 293 | |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | if (is_array($hoverBorderColor)) { |
| 315 | 315 | $hoverBorderColor = array_map('strval', $hoverBorderColor); |
| 316 | 316 | } |
| 317 | - if (! is_array($hoverBorderColor)) { |
|
| 317 | + if (!is_array($hoverBorderColor)) { |
|
| 318 | 318 | $hoverBorderColor = strval($hoverBorderColor); |
| 319 | 319 | } |
| 320 | 320 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | if (is_array($hoverBorderWidth)) { |
| 342 | 342 | $hoverBorderWidth = array_map('intval', $hoverBorderWidth); |
| 343 | 343 | } |
| 344 | - if (! is_array($hoverBorderWidth)) { |
|
| 344 | + if (!is_array($hoverBorderWidth)) { |
|
| 345 | 345 | $hoverBorderWidth = intval($hoverBorderWidth); |
| 346 | 346 | } |
| 347 | 347 | |