Line 2... |
Line 2... |
2 |
|
2 |
|
3 |
<?php
|
3 |
<?php
|
4 |
|
4 |
|
5 |
if (wpsg_isSizedArray($this->view['chart']['data']))
|
5 |
if (wpsg_isSizedArray($this->view['chart']['data']))
|
6 |
{
|
6 |
{
|
- |
|
7 |
unset($this->view['chart']['data']['template']);
|
7 |
|
8 |
|
8 |
for ($i = 0; $i < count($this->view['chart']['data']); $i++)
|
9 |
for ($i = 0; $i < count($this->view['chart']['data']); $i++)
|
9 |
{
|
10 |
{
|
10 |
|
11 |
|
11 |
$chartJS['legend'][$i] = "{";
|
12 |
$chartJS['legend'][$i] = "{";
|
Line 15... |
Line 16... |
15 |
$chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
|
16 |
$chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',";
|
16 |
}
|
17 |
}
|
17 |
|
18 |
|
18 |
$chartJS['legend'][$i] .= " highlighter: {";
|
19 |
$chartJS['legend'][$i] .= " highlighter: {";
|
19 |
|
20 |
|
20 |
$chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
|
21 |
$chartJS['legend'][$i] .= " formatString: '<table><tr><td>%s ".wpsg_getStr($this->view['chart']['data'][$i]['year']).", %s ".$this->get_option('wpsg_currency')."</td></tr></table>'";
|
21 |
|
22 |
|
22 |
$chartJS['legend'][$i] .= " }";
|
23 |
$chartJS['legend'][$i] .= " }";
|
23 |
|
24 |
|
24 |
$chartJS['legend'][$i] .= "}";
|
25 |
$chartJS['legend'][$i] .= "}";
|
25 |
|
26 |
|
Line 71... |
Line 72... |
71 |
|
72 |
|
72 |
jQuery(document).ready(function(){
|
73 |
jQuery(document).ready(function(){
|
73 |
<?php foreach ($chartJS['area'] as $index => $area) { ?>
|
74 |
<?php foreach ($chartJS['area'] as $index => $area) { ?>
|
74 |
var <?php echo $index; ?> = <?php echo $area; ?>;
|
75 |
var <?php echo $index; ?> = <?php echo $area; ?>;
|
75 |
<?php } ?>
|
76 |
<?php } ?>
|
76 |
|
77 |
|
77 |
var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
|
78 |
var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [<?php echo implode(',', array_keys($chartJS['area'])); ?>], {
|
78 |
animate: true,
|
79 |
animate: true,
|
79 |
axesDefaults: {
|
80 |
axesDefaults: {
|
80 |
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
|
81 |
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
|
81 |
},
|
82 |
},
|
Line 87... |
Line 88... |
87 |
placement: 'outside'
|
88 |
placement: 'outside'
|
88 |
},
|
89 |
},
|
89 |
axes:{
|
90 |
axes:{
|
90 |
xaxis:{
|
91 |
xaxis:{
|
91 |
renderer:jQuery.jqplot.DateAxisRenderer,
|
92 |
renderer:jQuery.jqplot.DateAxisRenderer,
|
92 |
label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
|
93 |
label:'<?php echo wpsg_hspc(wpsg_getStr($this->view['chart']['info']['xaxis']['label'])); ?>',
|
- |
|
94 |
label:'<?php echo wpsg_hspc(wpsg_getStr($this->view['chart']['data'][0]['label'])); ?>',
|
93 |
tickOptions:{formatString:'%d'},
|
95 |
tickOptions:{formatString:'%d'},
|
94 |
tickInterval: '1 day',
|
96 |
tickInterval: '1 day',
|
95 |
min:'<?php echo date('Y', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['min']); ?>',
|
97 |
min:'<?php echo date('Y', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['min']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['min']); ?>',
|
96 |
max:'<?php echo date('Y', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['max']); ?>'
|
98 |
max:'<?php echo date('Y', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('m', $this->view['chart']['data'][0]['max']); ?>/<?php echo date('d', $this->view['chart']['data'][0]['max']); ?>'
|
97 |
},
|
99 |
},
|