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
|
$this->view->headScript ('file', $this->_request->getBaseUrl().'/scripts/swfobject.js');
$this->view->jQuery()->addJavascriptFile ($this->_request->getBaseUrl() . '/scripts/jquery/plugins/jquery.json-1.3.js');
[...]
$this->view->graph = <<<EOT
{
"title": {
"text": "Graphique",
"style": "{font-size: 20px; font-family: Times New Roman; font-weight: bold; color: #A2ACBA; text-align: center;}"
},
"elements":[
{
"type": "line",
"animate": true,
"alpha": 0.5,
"colour": "#00FF00",
"outline-colour": "#577261",
"text": "Pourcentage de satisfaction",
"font-size": 10,
"values" : [$graph1],
"dot-style":{"type":"solid-dot","dot-size":5,"halo-size":0,"colour":"#DFC329","tip":"#x_label# : #val# %"}
},
{
"type": "line",
"animate":false,
"size": 1,
"text": "Moyenne sur la période",
"values": [$percentage],
"dot-style": {
"tip": null,
"type": "dot",
"dot-size": 1,
"halo-size": 0
}
}
],
"tooltip": {
"mouse": 2,
"stroke": 1,
"colour": "#000000",
"background": "#ffffff"
},
"x_axis":{
"stroke":1,
"tick_height":10,
"colour":"#000000",
"grid-colour": "#DBE5E6",
"steps": 1,
"labels": {
"visible": false,
"rotate": "vertical",
"labels": [$x_axis],
"steps": 5
}
},
"x_legend": {
"text": "Satisfaction dans le temps",
"style": "{font-size: 20px; color: #778877}"
},
"y_axis":{
"stroke": 1,
"tick_length": 3,
"colour": "#000000",
"grid-colour": "#DBE5E6",
"offset": 1,
"max": 100,
"steps": 10
},
"bg_colour": "#F0F1EE"
}
EOT; |
Partager