-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathECharts.php
78 lines (65 loc) · 1.74 KB
/
ECharts.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace bubifengyun\echarts;
use Hisune\EchartsPHP\ECharts as EchartsPHP;
use Hisune\EchartsPHP\Config;;
use Hisune\EchartsPHP\Doc\IDE\Series;
use Hisune\EchartsPHP\Doc\IDE\XAxis;
use Hisune\EchartsPHP\Doc\IDE\YAxis;
use bubifengyun\echarts\EChartsAsset;
use bubifengyun\echarts\MapAsset;
class ECharts extends EchartsPHP
{
public $_events = [];
protected $jsVar;
/**
* @param $view string, dist of libraries
*/
public function __construct($view, $map = null)
{
$asset = EchartsAsset::register($view);
parent::__construct($asset->baseUrl);
if (is_array($map)) {
$mapAsset = MapAsset::register($view);
$mapUrl = $mapAsset->baseUrl;
foreach ($map as $part) {
Config::addExtraScript($part, $mapUrl);
}
}
}
public function render($id, $attribute = array(), $theme = null)
{
return parent::render($id, $attribute, $theme);
}
public function getOption($render = null, $jsObject = false)
{
return parent::getOption($render, $jsObject);
}
public function setOption(array $options = array())
{
parent::setOption($options);
}
public function on($event, $callback)
{
parent::on($event, $callback);
}
public function setJsVar($name = null)
{
parent::setJsVar($name);
}
public function getJsVar($full = false)
{
return parent::getJsVar($full);
}
public function addSeries(Series $series)
{
parent::addSeries($series);
}
public function addXAxis(XAxis $xAxis)
{
parent::addXAxis($xAxis);
}
public function addYAxis(YAxis $yAxis)
{
parent::addYAxis($yAxis);
}
}