-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMultiAxisLineChart.php
46 lines (40 loc) · 1.14 KB
/
MultiAxisLineChart.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace RadiateCode\DaChartjs\Types\Line;
use RadiateCode\DaChartjs\Abstracts\BaseChartType;
use RadiateCode\DaChartjs\Enums\ChartType;
use RadiateCode\DaChartjs\Enums\GeneralOption;
class MultiAxisLineChart extends BaseChartType
{
public function type(): string
{
return ChartType::LINE_CHART;
}
/**
* Default options
*
* @return array|string
*/
protected function defaultOptions()
{
return array_merge(GeneralOption::OPTIONS, [
'stacked' => false,
'scales' => [
'y' => [
'type' => 'linear',
'display' => true,
'position' => 'left',
],
'y1' => [
'type' => 'linear',
'display' => true,
'position' => 'right',
// grid line settings
'grid' => [
'drawOnChartArea' => false,
// only want the grid lines for one axis to show up
],
]
]
]);
}
}