Bonjour, je suis plus que novice ...

Actuellement j'ai pu créer des graphiques à partir d'une bibliothèque highcharts avec des données inscrites en dur sur mon code PHP.

Par la suite j'aimerais prendre ces valeurs dans un fichier CSV qui sera au préalable généré.

Voici un bout de mon code de mon indicateur en pièce jointe pour monter le graphique (graphique type 'column') :

series: [{
name: 'Espace en To réellement utilisé',
color:'#8A4B08',
data: [0,151.33]
},

Le fichier CSV est :

Espace en To réellement utilisé ,"Capacité sauvegardée par HDPS (HDPS, licence summary report)","151,33"

Donc au final je cherche à remplacer la avleur 151.33 par un script PHP pour récupérer cette donnée (variable) dans mon CSV.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>
		CEI - Cellule Qualité Communication Gestion
	</title>
	<!-- La feuille de styles "base.css" doit être appelée en premier. -->
	<link rel="stylesheet" type="text/css" href="../css/base.css" media="all">
	<link rel="stylesheet" type="text/css" href="../css/modele.css" media="screen">
  <link rel="stylesheet" type="text/css" href="../css/menu.css" media="screen">
 
 
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<style type="text/css">
${demo.css}
		</style> 
  <script type="text/javascript">
 
  $(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Indicateurs de gestion de la baie de stockage VSP au 13/07/2016'
        },
        xAxis: {
            categories: ['Total','VMWare','Storage Pool HNAS A','Storage Pool HNAS B']
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Volumétrie en téraoctet'
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                }
            }
        },
        legend: {
            align: 'right',
            verticalAlign: 'top',
            layout: 'vertical',
            x: 0,
            y: 100
        },
        tooltip: {
            headerFormat: '<b>{point.x}</b><br/>',
            pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                dataLabels: {
                    enabled: true,
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                    style: {
                        textShadow: '0 0 3px black'
                    }
                }
            }
        },
        series: [{
            name: 'Espace disque non configuré',
			color: '#0B6138',
            data: [14.07,0,0,0]
        }, {
            name: 'Espace disponible',
			color:'#01DF74',
            data: [73.5,0,0,0]
        }, {
            name: 'Marge de 20% pour les snapshots VMWare',
			color:'#58D3F7',
            data: [0,96.78,0,0]
        }, {
            name: 'Espace potentiellement provisionnable au VMs et FS',
			color:'#FFFF00',
            data: [0,13.72,1.99,5.01]
        }, {
            name: 'Espace alloué non écrit',
			color:'#FF4000',
            data: [117.5]
        }, {
            name: 'Espace fourni mais non utilisé (trop perçu)',
			color:'#F5D0A9',
            data: [239.48,222.07,6.77,10.64]
        }, {
            name: 'Espace en To réellement utilisé',
			color:'#8A4B08',
            data: [222.916,151.33,39.24,32.35]
        }, {
            type: 'spline',
            name: 'Seuil physique possible',
            data: [484,484,484,484],
			color: '#FF0000',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}, {
            type: 'spline',
			dashStyle: 'dash',
            name: 'Virtualisation à hauteur de 130% réel potentiel',
            data: [630,630,630,630],
			color: '#FF0000',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}]
    });
});
 
		</script>
		<script type="text/javascript">
 
  $(function () {
    $('#container2').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Vision de l\'espace disque d\'une baie VSP alloué à VMWare au 13/07/2016'
        },
        xAxis: {
            categories: ['Au profit de VMWare','Au profit des VMs(vision VMDK)']
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Volumétrie en téraoctet'
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                }
            }
        },
        legend: {
            align: 'right',
            verticalAlign: 'top',
            layout: 'vertical',
            x: 0,
            y: 100
        },
        tooltip: {
            headerFormat: '<b>{point.x}</b><br/>',
            pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                dataLabels: {
                    enabled: true,
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                    style: {
                        textShadow: '0 0 3px black'
                    }
                }
            }
        },
        series: [{
            name: 'Marge de 20% pour les snapshots VMWare',
			color: '#58D3F7',
            data: [96.78]
        }, {
            name: 'Potentiel provisionnable',
			color:'#FFFF00',
            data: [13.72,13.72]
        }, {
            name: 'Allocations au profit de VMWare',
			color:'#61380B',
            data: [373.4]
        },{
            name: 'Alloué aux VMs non exploité',
			color:'#F5D0A9',
            data: [0,222.07]
        }, {
            name: 'Espace en To réellement utilisé',
			color:'#8A4B08',
            data: [0,151.33]
        }, {
            type: 'spline',
            name: 'Allocation fournie à VMWare',
            data: [483.9,483.9],
			color: '#0101DF',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}, {
            type: 'spline',
			dashStyle: 'dash',
            name: 'Warning VMWare',
            data: [387.12,387.12],
			color: '#FF0000',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}]
    });
});
 
		</script>
		<script type="text/javascript">
 
  $(function () {
    $('#container3').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Point de situation des espaces alloués et utilisés par FS sur le SP HNAS A au 13/07/2016 avec prévisionnel sur 6 mois'
        },
        xAxis: {
            categories: ['Répartition espace disque par FS (coffres/gen/rfs) et disponible sur l\'espace alloué au SP HNAS A','Point de situation de l\'utilisation de l\'espace alloué au SP HNAS A au profit des FS et du disponible à T0','Prévisionnel à M+ 3 mois  avec augmentation quasi nulle des FS sauf pour COFFRES (hypothèse*: +0,5To/mois)','Prévisionnel à M+ 6 mois  avec augmentation quasi nulle des FS sauf pour COFFRES (hypothèse*: +0,5To/mois)']
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Volumétrie en téraoctet'
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                }
            }
        },
        legend: {
            align: 'right',
            verticalAlign: 'top',
            layout: 'vertical',
            x: 0,
            y: 100
        },
        tooltip: {
            headerFormat: '<b>{point.x}</b><br/>',
            pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                dataLabels: {
                    enabled: true,
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                    style: {
                        textShadow: '0 0 3px black'
                    }
                }
            }
        },
        series: [{
            name: 'Espace réellement disponible',
			color: '#FFFF00',
            data: [1.99,1.99,1.99,1.99]
        }, {
            name: 'Espace alloué pour FS GEN',
			color:'#2E2EFE',
            data: [3.01]
        }, {
            name: 'Espace alloué pour FS RFS',
			color:'#0101DF',
            data: [10]
        },{
            name: 'Espace alloué pour FS COFFRES',
			color:'#08088A',
            data: [33.01]
        },{
            name: 'Espace provisionnable pour FS COFFRES',
			color:'#F5D0A9',
            data: [0,3.98,2.48,0.98]
        },{
            name: 'Espace utilisé par FS COFFRES',
			color:'#8A4B08',
            data: [0,29.03,30.53,32.03]
        },{
            name: 'Espace provisionnable pour FS RFS',
			color:'#F5D0A9',
            data: [0,2.62,2.62,2.62]
        },{
            name: 'Espace utilisé par FS RFS',
			color:'#8A4B08',
            data: [0,7.38,7.38,7.38]
        },{
            name: 'Espace provisionnable pour FS GEN',
			color:'#F5D0A9',
            data: [0,0.18,0.18,0.18]
        },{
            name: 'Espace utilisé par FS GEN',
			color:'#8A4B08',
            data: [0,2.83,2.83,2.83]
        },{
            type: 'spline',
            name: 'Espace alloué au SP HNAS A',
            data: [48,48,48,48],
			color: '#0101DF',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}]
    });
});
 
		</script>
		<script type="text/javascript">
 
  $(function () {
    $('#container4').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Point de situation des espaces alloués et utilisés par FS sur le SP HNAS B au 13/07/2016 avec prévisionnel sur 9 mois'
        },
        xAxis: {
            categories: ['Répartition espace disque par FS (applishare/psar/espert/depot/commun/echanges) et disponible','Point de situation de l\'utilisation de l\'espace alloué au SP HNAS B au profit des FS et du disponible à T0','Prévisionnel M+ 3 mois avec augmentation quasi nulle des FS sauf pour ECHANGES (hypothèse*: +0,5To/mois)','Prévisionnel M+ 6 mois avec augmentation quasi nulle des FS sauf pour ECHANGES (hypothèse*: +0,5To/mois)','Prévisionnel M+ 9 mois avec augmentation quasi nulle des FS sauf pour ECHANGES (hypothèse*: +0,5To/mois)']
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Volumétrie en téraoctet'
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                }
            }
        },
        legend: {
          align: 'right',
            verticalAlign: 'top',
            layout: 'vertical',
            x: 0,
            y: 100
 
        },
        tooltip: {
            headerFormat: '<b>{point.x}</b><br/>',
            pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                dataLabels: {
                    enabled: true,
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                    style: {
                        textShadow: '0 0 3px black'
                    }
                }
            }
        },
        series: [{
            name: 'Espace réellement disponible',
			color: '#A9BCF5',
            data: [5.01,4.98,4.98,4.98,4.98]
        }, {
            name: 'Espace alloué pour FS COMMUN',
			color:'#A9BCF5',
            data: [0.11]
        }, {
            name: 'Espace alloué pour FS SFU',
			color:'#8181F7',
            data: [1]
        },{
            name: 'Espace alloué pour FS DEPOT',
			color:'#08088A',
            data: [0.4]
        },{
            name: 'Espace alloué pour FS PSAR',
			color:'#08088A',
            data: [2.01]
        },{
            name: 'Espace alloué pour FS ESPERT',
			color:'#5858FA',
            data: [3.99]
        },{
            name: 'Espace alloué pour FS APPLISHARE',
			color:'#0101DF',
            data: [7.5]
        },{
            name: 'Espace alloué pour FS ECHANGES',
			color:'#08088A',
            data: [28.01]
        },{
            name: 'Espace provisionnable pour FS COMMUN',
			color:'#F5D0A9',
            data: [0,0.084,0.084,0.084,0.084]
        },{
            name: 'Espace utilisé par FS COMMUN',
			color:'#8A4B08',
            data: [0,0.026,0.026,0.026,0.026]
        },{
            name: 'Espace provisionnable pour FS SFU',
			color:'#F5D0A9',
            data: [0,0.91,0.91,0.91,0.91]
        },{
            name: 'Espace utilisé par FS SFU',
			color:'#8A4B08',
            data: [0,0.09,0.09,0.09,0.09]
        },{
            name: 'Espace provisionnable pour FS DEPOT',
			color:'#F5D0A9',
            data: [0,0.05,0.05,0.05,0.05]
        },{
            name: 'Espace utilisé par FS DEPOT',
			color:'#8A4B08',
            data: [0,0.35,0.35,0.35,0.35]
        },{
            name: 'Espace provisionnable pour FS PSAR',
			color:'#F5D0A9',
            data: [0,0.82,0.82,0.82,0.82]
        },{
            name: 'Espace utilisé par FS PSAR',
			color:'#8A4B08',
            data: [0,1.34,1.34,1.34,1.34]
        },{
            name: 'Espace provisionnable pour FS ESPERT',
			color:'#F5D0A9',
            data: [0,1.13,1.13,1.13,1.13]
        },{
            name: 'Espace utilisé par FS ESPERT',
			color:'#8A4B08',
            data: [0,2.86,2.86,2.86,2.86]
        },{
            name: 'Espace provisionnable pour FS APPLISHARE',
			color:'#F5D0A9',
            data: [0,0.98,0.98,0.98,0.98]
        },{
            name: 'Espace utilisé par FS APPLISHARE',
			color:'#8A4B08',
            data: [0,6.52,6.52,6.52,6.52]
        },{
            name: 'Espace provisionnable pour FS ECHANGES',
			color:'#F5D0A9',
            data: [0,6.85,5.35,3.85,2.35]
        },{
            name: 'Espace utilisé par FS ECHANGES',
			color:'#8A4B08',
            data: [0,21.16,22.66,24.16,25.66]
        },{
            type: 'spline',
            name: 'Espace alloué au SP HNAS A',
            data: [48,48,48,48,48],
			color: '#0101DF',
            marker: {
                lineWidth: 2,
                lineColor: Highcharts.getOptions().colors[3],
                fillColor: 'white'
            }
		}]
    });
});
 
		</script>
 
</head>
 
<body>
 
<div id="global">
 
	<div id="entete">
		<h1>CEI - Cellule Qualité Communication Gestion</h1>
		<p class="sous-titre">
			Système gestion Qualité</p>
	</div><!-- #entete -->
 
	<div id="navigation">
<?php include ('../include/menu.html') ;   ?>
	</div><!-- #navigation -->
 
	<div id="contenu">
	<script src="https://code.highcharts.com/highcharts.js"></script>
	<script src="https://code.highcharts.com/modules/exporting.js"></script>
 
	<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
 
	<script src="https://code.highcharts.com/highcharts.js"></script>
	<script src="https://code.highcharts.com/modules/exporting.js"></script>
 
	<div id="container2" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
 
	<script src="https://code.highcharts.com/highcharts.js"></script>
	<script src="https://code.highcharts.com/modules/exporting.js"></script>
 
	<div id="container3" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
 
	<script src="https://code.highcharts.com/highcharts.js"></script>
	<script src="https://code.highcharts.com/modules/exporting.js"></script>
 
	<div id="container4" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
 
 
 
 
	</div><!-- #contenu -->
 
	<div id="pied">
		<p id="copyright">CEI</p>	
		<p>	<strong>Contact (pour exemple, à mettre @mail BalF CQCG): </strong><a href="mailto:wilfrid.sastre@insee.fr">Email wilfrid sastre poste 03 55 94 36 29</a></p>
	</div><!-- #pied -->
 
</div><!-- #global -->
 
 
</body></html>
Merci pour votre aide.

++