1 | <?php |
||
10 | class Data |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $arrayToDataTable; |
||
16 | |||
17 | /** |
||
18 | * @var boolean |
||
19 | */ |
||
20 | private $firstRowIsData; |
||
21 | |||
22 | /** |
||
23 | * @return array |
||
24 | */ |
||
25 | public function getArrayToDataTable() |
||
29 | |||
30 | /** |
||
31 | * This method takes in a two-dimensional array. The data types of each column are interpreted automatically from |
||
32 | * the data given. If a cell has no value, specify a null or empty value as appropriate. Column data types can also |
||
33 | * be specified using the object literal notation in the first row (the column header row) of the array |
||
34 | * (i.e. ['label' => 'Start Date', 'type' => 'date']). Optional data roles may be used as well, but they must be |
||
35 | * defined explicitly using object literal notation. Object literal notation may also be used for any cell, |
||
36 | * allowing you to define Cell Objects). |
||
37 | * |
||
38 | * @param array $arrayToDataTable A two-dimensional array, where each row represents a row in the data table. |
||
39 | * @param boolean $firstRowIsData If firstRowIsData is false (the default), the first row will be interpreted |
||
40 | * as header labels. |
||
41 | */ |
||
42 | 2 | public function setArrayToDataTable($arrayToDataTable, $firstRowIsData = false) |
|
47 | |||
48 | /** |
||
49 | * Returns Javascript of data. |
||
50 | * |
||
51 | * @param string $dataName Variable name who will contain the data Javascript |
||
52 | * |
||
53 | * @return string A Javascript string |
||
54 | * |
||
55 | * @throws GoogleChartsException |
||
56 | */ |
||
57 | 2 | public function draw($dataName) |
|
100 | } |
||
101 |