HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
example.official_demo.php
Go to the documentation of this file.
1 <?php // Example from the official demo of HighCharts: http://www.highcharts.com/demo/
2 $this->widget(
3  'booster.widgets.TbHighCharts',
4  array(
5  'options' => array(
6  'title' => array(
7  'text' => 'Monthly Average Temperature',
8  'x' => -20 //center
9  ),
10  'subtitle' => array(
11  'text' => 'Source: WorldClimate.com',
12  'x' -20
13  ),
14  'xAxis' => array(
15  'categories' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
16  ),
17  'yAxis' => array(
18  'title' => array(
19  'text' => 'Temperature (°C)',
20  ),
21  'plotLines' => [
22  [
23  'value' => 0,
24  'width' => 1,
25  'color' => '#808080'
26  ]
27  ],
28  ),
29  'tooltip' => array(
30  'valueSuffix' => '°C'
31  ),
32  'legend' => array(
33  'layout' => 'vertical',
34  'align' => 'right',
35  'verticalAlign' => 'middle',
36  'borderWidth' => 0
37  ),
38  'series' => array(
39  [
40  'name' => 'Tokyo',
41  'data' => [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
42  ],
43  [
44  'name' => 'New York',
45  'data' => [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
46  ],
47  [
48  'name' => 'Berlin',
49  'data' => [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
50  ],
51  [
52  'name' => 'London',
53  'data' => [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
54  ]
55  )
56  ),
57  'htmlOptions' => array(
58  'style' => 'min-width: 310px; height: 400px; margin: 0 auto'
59  )
60  )
61 );