-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md~
47 lines (36 loc) · 1.37 KB
/
README.md~
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
xavoc-addons
============
add the following code in your frontend class to enjoy further xavoc-addons for agile
$this->addLocation('.',array(
"addons"=>'xavoc-addons'
));
First Chart addon
use following page code to test
<?php
class page_index extends Page {
function init(){
parent::init();
$ch=$this->add('chart/Chart')
->setTitle("My Title",null,"my sub title")
->setChartType('line')
->setXAxisTitle("Months")
->setYAxisTitle("Sales")
->setXAxis(array("Jan","Feb","Mar","Apr","May","jun","july","Aug","sep","oct","nov","dec"))
->setLegendsOptions(array("layout"=>"vertical","align"=>"right","verticalAlign"=>"top"))
;
$btn2=$this->add('Button','btn2')->set('JSCLICKED')->js('click')->univ()->addSeries(array(
"name"=>"london",
"data"=>array(rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10))
));
$jv=$this->add('View');
$this->add('Button','btn')
->js('click',$jv->js()->reload(array('btn'=>true)));
;
if($_GET['btn']){
$jv->js(true)->_selector($ch->name)->univ()->addSeries(array(
"name"=>"london",
"data"=>array(rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10),rand(1,10))
))->execute();
}
}
}