IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques & Frameworks Discussion :

Utilisation de AxisPointer [ECharts]


Sujet :

Bibliothèques & Frameworks

  1. #1
    Membre actif Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 319
    Points : 286
    Points
    286
    Par défaut Utilisation de AxisPointer
    Bonjour à tous,

    je cherche à utiliser AxisPointer en mode cross dans mes graphes, mais la valeur de l'axe des ordonnées ne s'affichent pas, alors que celle des abscisses fonctionne très bien.
    Je ne vois pas où je fais mal.

    Voici le code de mon graphe :
    Code javascript : 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
     
    /*----------------------------------------------------------------------------------------------*/		
    /* Graph HEURES GLISSANTES - GRAND                                                              */		
    /*----------------------------------------------------------------------------------------------*/		
    function createGraph_HG(P_Plateforme, jsonData, P_dayInit){
     
    	var i = 0,
    		WTot_Gen = 0,
    		WTot_Dep = 0,
    		WTot_Arr = 0,
    		TranchesHoraires_X = [],
    		SommeTH_Y = [],
    		TotalARR_Y = [],
    		TotalDEP_Y = [],
    		Interv = [];
     
    	if (P_Plateforme == "LFPO")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][18]);
    				var WTotARR = parseInt(jsonData[i][10]);
    				var WTotDEP = parseInt(jsonData[i][17]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				SommeTH_Y.push(WTotal);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    				}
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    			val = ($("#lfpo_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPO - " + P_dayInit;
    			var P_CoulFondGrpah = "#E1FFE9";
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][22]);
    				var WTotARR = parseInt(jsonData[i][12]);
    				var WTotDEP = parseInt(jsonData[i][21]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    				}
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    			val = ($("#lfpg_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPG - " + P_dayInit;
    			var P_CoulFondGrpah = "#FFFFD8"; //"#FFF7FC"; //"#FFFFC8";
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][16]);
    				var WTotARR = parseInt(jsonData[i][9]);
    				var WTotDEP = parseInt(jsonData[i][15]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    				}
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    			val = ($("#lfpb_hg_left").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPB - " + P_dayInit;
    			var P_CoulFondGrpah = "#DDF6FF";
    		}
     
    	if (P_Plateforme == "LFOB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][6]);
    				var WTotARR = parseInt(jsonData[i][4]);
    				var WTotDEP = parseInt(jsonData[i][5]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    				}
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    			val = ($("#lfob_hg_right").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFOB - " + P_dayInit;
    			var P_CoulFondGrpah = "#FEEDED";
    		}
     
    //console.log("TranchesHoraires_X="+JSON.stringify( TranchesHoraires_X));
    //console.log("SommeTH_Y="+JSON.stringify( SommeTH_Y));
     
    	var HG_ChartOpt = {
    		backgroundColor: P_CoulFond,
    		color: P_TAB_Colors,
     
    		P_Debut, // Début du paramètrage des graphique (police, animation, etc...)
    		legend: P_Legend,
     
    		title: {
    			padding: [15, 0, 0, 0],					// Title space around content // [haut, droit, bas, gauche]
    			left: 'center',							// Distance between grid component and the left side of the container
    			text: P_Titre,
    			textStyle: P_Title_textStyle
    		},
    		grid: {
    			show: true,							// Whether to show the grid in rectangular coordinate
    			backgroundColor: P_CoulFondGrpah, // fond du graphe
    			top: 50,								// Distance between grid component and the top side of the container
    			bottom: 120,								// Distance between grid component and the bottom side of the container
    			left: 150,								// Distance between grid component and the left side of the container
    			right: 30								// Distance between grid component and the right side of the container
    		},
    		xAxis: {									// The X axis in Cartesian (rect.) coordinate
    			axisLine: P_XAxisLine,
    			axisTick: P_XAxisTick,
    			splitLine: P_XSplitLine,		// True => quadrillage sur le graphe
    			splitArea: P_XSplitArea, 	// Permet de mettre un fond de couleurs différentes
    			type: 'category',
    			name: 'Tranches Horaires (TU)' + '\n\n' + WTexteInfo,
    			nameLocation: 'center',
    			nameTextStyle: {
    				padding: WPaddingTexte_xAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			max: 'dataMax',
    			position: 'bottom',
    			boundaryGap: true,
    			axisLabel: {
    				interval: 59, 						// Définit le nombre d'intervals sur xAxis => 59 car 60 val. par heure
    				rotate:0,
    				margin: 10,
    				showMinLabel: true,
    				align : 'left',
    				padding: padding_array, 			// [haut, droit, bas, gauche]
    				color: 'rgb(050,050,050)'
    			},
    			data: TranchesHoraires_X
    		},
    		yAxis: {
    			axisLine: P_YAxisLine,
    			axisTick: P_YAxisTick,
    			type: 'value',
    			name: 'Mouvements',
    			nameLocation: 'center',
    			nameRotate: 90,
    			nameTextStyle: {
    				padding: WPaddingTexte_yAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			axisLabel: { 							// Settings related to axis label
    				color: 'rgb(070,070,070)'
    			}
    		},
    		toolbox: {									// Cartouche en haut à droite
    			show: true,
    			padding: [5, 10, 0, 0],	// [haut, droit, bas, gauche]
    			itemSize: 15,
    			itemGap: 7,
    			showTitle: true,		
    			feature: {
    				restore: {
    					show: true,
    					title: 'Rechargement'
    				},
    				magicType: {
    					type: ['line', 'bar'],
    					title: {
    						line: 'Ligne',
    						bar: 'Histo.'
    					}
    				},
    				saveAsImage: {
    					title:'Sauvegarde PNG'
    				},
    //            myTool1: {
    //                show: true,
    //                title: 'Infos masquées',
    //                icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891',
    //                onclick: function () {
    //						if (P_Plateforme == "LFPO")
    //							{
    //								$('#Info_lfpo_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //						if (P_Plateforme == "LFPG")
    //							{
    //								$('#Info_lfpg_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //						if (P_Plateforme == "LFPB")
    //							{
    //								$('#Info_lfpb_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //                }
    //            },
    				dataView: {
    					show: true, // Affiche ou non l'icône pour afficher les données utilisées.
    					readOnly: false,
    					backgroundColor: '#88ABD9',
    					title: 'Données',
    					lang: ['Données utilisées pour le graphique...', 'Retour', 'Export CSV'], 
    					optionToContent: function(opt) {
    						var axisData = opt.xAxis[0].data;
    						var series = opt.series;
    						var WTable01 = '<div id="ID_Table_Data">';
    						WTable01 = WTable01 + '<table class="table-fill">';
    						WTable01 = WTable01 + '<thead><tr>';
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Tranches Horaires</th>'
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Intervales</th>'
    						WTable01 = WTable01 + '<th class="text-center">' + series[1].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[2].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[0].name + '</th>';
    						WTable01 = WTable01 + '</tr></thead>';
    						WTable01 = WTable01 + '<tbody class="table-hover">';
    						for (var i = 0, l = axisData.length; i < l; i++) {
    							WLigneCSV = WLigneCSV + TranchesHoraires_X[i] + ";" + Interv[parseInt(i)] + ";";
    							WLigneCSV = WLigneCSV + series[1].data[i] + ";" + series[2].data[i] + ";" + series[0].data[i];
    							WLigneCSV = WLigneCSV + "\n";
    							WTable01 += '<tr>'
    									 + '<td class="text-center">' + TranchesHoraires_X[i] + '</td>'
    									 + '<td class="text-center">' + Interv[parseInt(i)] + '</td>'
    									 + '<td class="text-center">' + series[1].data[i] + '</td>'
    									 + '<td class="text-center">' + series[2].data[i] + '</td>'
    									 + '<td class="text-center">' + series[0].data[i] + '</td>'
    									 + '</tr>';
    						}
    						WTable01 += '</div></tbody></table>';
    						return WTable01;
    					},
    					contentToOption: function(){ // Va permetrtre de gérer l'exportation en CSV
    						var NomCSV = "HeuresGlissantes_" + P_dayInit;
    						var Ext = ".CSV";
    						var FicCSV = NomCSV + Ext;
    // Ecrire le contenu de la variable WLigneCSV dans un fichier
    						download(FicCSV, WLigneCSV);
    					}
    				}
    			}
    		},
     
    axisPointer: {
    show:true,
    		link: {xAxisIndex: 'all'},
    		label: {
    			backgroundColor: '#777'
    		}
    	},			
     
    		tooltip: {
    			show: true,
    			trigger: 'axis', 						// Triggered by axes.
    			axisPointer: {
    				type: 'cross',
    				label : {
    					formatter: function (params) {
    					return Interv[parseInt(params.value) * 60]; // * 60 => on se déplace de 60 dans le tableau de 1440 items
    					}
    				},
    				lineStyle: {
    					width: 1 						// Epaisseur de la ligne verticale
    				}
    			}
    		},
    		series : [
    			{
    				type: 'line',
    				name: 'Nb Total',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: SommeTH_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Arrivée',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalARR_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Départ',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalDEP_Y
    			}
    		]
    	};
     
    	if (P_Plateforme == "LFPO")
    		{
    			HG_Chart_C1.setOption(HG_ChartOpt);
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			HG_Chart_C2.setOption(HG_ChartOpt);
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			HG_Chart_C3.setOption(HG_ChartOpt);
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    		}
    	if (P_Plateforme == "LFOB")
    		{
    			HG_Chart_C4.setOption(HG_ChartOpt);
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    		}
    }

    Merci d'avance pour votre aide.
    Zeb'...

  2. #2
    Membre actif Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 319
    Points : 286
    Points
    286
    Par défaut
    Je viens de trouver que si je supprime le label, j'ai bien les valeurs qui s'affichent, mais à ce moment là, je perds l'affichage dans la bulle.
    Nom : echarts12.png
Affichages : 175
Taille : 56,6 Ko
    A gauche : SANS label - A droite : AVEC label


    Comment est-ce que je pourrais avoir avec les 2 en même temps ?
    Zeb'...

  3. #3
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    16 959
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 16 959
    Points : 44 122
    Points
    44 122
    Par défaut
    Bonjour,
    lorsque tu initialises le axisPointer dans l'option tooltip la formule de formatage que tu appliques pour le label s'applique à tous les labels axe X&Y et tooltip.

    Si tu veux faire quelque chose de séparé il te faut faire les initialisations dans chacun des axes.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    xAxis: {
      axisPointer: {
        label: {
          formatter: function (params) {
            return "Axe X "+ params.value;
          }
        }
      },

  4. #4
    Membre actif Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 319
    Points : 286
    Points
    286
    Par défaut
    Merci, j'ai avancé, mais j'ai un beau truc auquel je ne m'attendais pas.
    Nom : eCharts13.png
Affichages : 156
Taille : 73,8 Ko

    J'aimerai que les "ronds" ne s'affichent QUE pour l'axe des X et que les valeurs "Nb Départ..." n'apparaissent pas dans la bulle.
    Et aussi que la valeur de l'axe des X s'affiche sous l'axe (comme pour Y) et en plus dans la bulle. (c'est la valeur intervalle qu'il faut afficher : 19:00 - 19:59, par exemple)

    C'est possible ?

    Code javascript : 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
     
    /*----------------------------------------------------------------------------------------------*/		
    /* VARIABLES GLOBALES CONSTANTES POUR LES GRAPHES                                               */		
    /*----------------------------------------------------------------------------------------------*/		
     
    var WLigneCSV = "TRANCHES HORAIRES;INTERVALES;NB DEPART;NB ARRIVEE;TOTAL" + "\n";
     
    var WPaddingTexte_xAxis = 30;
    var WPaddingTexte_yAxis = 35;
    var P_AxeTextSize = 15;
    var P_CoulFond = "#ffffff"; // blanc
    var P_TextColor = "#5d6d7e";
    var P_Colors = ["#FE0000"];
    var P_TAB_Colors = ['#008000', '#ff0000', '#0000FF']; // Couleur des courbes.
     
    var P_Debut = {
    	textStyle: {
    		fontFamily: 'sans-serif'
    	},
    	animation: true,
    };
    var P_Title_textStyle =	{
    	color: '#000',
    	fontStyle: 'normal',
    	fontWeight: 'bold',
    	fontFamily: 'sans-serif',
    	fontSize: 20,
    };
    var P_Legend = {
    	show: true,
    	type : 'plain',
    	orient: 'vertical',
    	borderColor: '#95a5a6',
    	borderWidth: 2,
    	borderRadius: 7,
    	shadowColor: 'rgba(0, 0, 0, 0.5)',
    	shadowBlur: 10,
    	itemWidth: 25,
    	itemHeight: 14,
    	left: 3,
    	top: 15
    };
    var P_Toolbox = {									// Cartouche en haut à droite
    	show: true,
    	padding: [5, 25, 0, 0],	// [haut, droit, bas, gauche]
    	itemSize: 17,
    	itemGap: 10,
    	showTitle: true,		
    	feature: {
    		restore: {
    			show: true,
    			title: 'Rechargement'
    		},
    		magicType: {
    			type: ['line', 'bar'],
    			title: {
    				line: 'Ligne',
    				bar: 'Histo.'
    			}
    		},
    		saveAsImage: {title:'Sauvegarde PNG'}
    	}
    };
    var P_XSplitLine = {
    	show: true, // True => quadrillage VERTICAL sur le graphe
    	lineStyle: {
    		color: "#CCC",
    		type: "dotted",
    		width: 1
    	},
    };				
    var P_XSplitArea = { 							// Permet de mettre un fond de couleurs différentes
    	show: false,
    	areaStyle:{
    		color:['rgba(144,238,144,0.3)','rgba(135,200,250,0.3)']
    	},
    };
    var P_XAxisLine = {
    	lineStyle: {
    		color: 'rgb(105,105,105)',
    		width: 2,
    		onZero: true,
    	}
    };
    var P_XAxisTick = {
    	show: true,					 		// Whether to show the axis tick
    	inside: false,
    	length: 3
    };
    var P_YAxisLine = {
    	lineStyle: {
    		color: 'rgb(165,165,165)',
    		width: 2
    	}
    };
    var P_YAxisTick = {
    	length: 3,
    };
     
     
    /*----------------------------------------------------------------------------------------------*/		
    /* Graph HEURES GLISSANTES - GRAND                                                              */		
    /*----------------------------------------------------------------------------------------------*/		
    function createGraph_HG(P_Plateforme, jsonData, P_dayInit){
     
    	var i = 0,
    		WTot_Gen = 0,
    		WTot_Dep = 0,
    		WTot_Arr = 0,
    		TranchesHoraires_X = [],
    		SommeTH_Y = [],
    		TotalARR_Y = [],
    		TotalDEP_Y = [],
    		Interv = [];
     
    	if (P_Plateforme == "LFPO")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][18]);
    				var WTotARR = parseInt(jsonData[i][10]);
    				var WTotDEP = parseInt(jsonData[i][17]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				SommeTH_Y.push(WTotal);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    			val = ($("#lfpo_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPO - " + P_dayInit;
    			var P_CoulFondGrpah = "#E1FFE9";
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][22]);
    				var WTotARR = parseInt(jsonData[i][12]);
    				var WTotDEP = parseInt(jsonData[i][21]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    			val = ($("#lfpg_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPG - " + P_dayInit;
    			var P_CoulFondGrpah = "#FFFFD8"; //"#FFF7FC"; //"#FFFFC8";
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][16]);
    				var WTotARR = parseInt(jsonData[i][9]);
    				var WTotDEP = parseInt(jsonData[i][15]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    			val = ($("#lfpb_hg_left").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPB - " + P_dayInit;
    			var P_CoulFondGrpah = "#DDF6FF";
    		}
     
    	if (P_Plateforme == "LFOB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][6]);
    				var WTotARR = parseInt(jsonData[i][4]);
    				var WTotDEP = parseInt(jsonData[i][5]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    			val = ($("#lfob_hg_right").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFOB - " + P_dayInit;
    			var P_CoulFondGrpah = "#FEEDED";
    		}
     
    //console.log("TranchesHoraires_X="+JSON.stringify( TranchesHoraires_X));
    //console.log("SommeTH_Y="+JSON.stringify( SommeTH_Y));
     
    	var HG_ChartOpt = {
    		backgroundColor: P_CoulFond,
    		color: P_TAB_Colors,
     
    		P_Debut, // Début du paramètrage des graphique (police, animation, etc...)
    //			grid: P_Grid,		// Distance between grid component and the right side of the container
    //			toolbox: P_Toolbox,
    		legend: P_Legend,
     
    		title: {
    			padding: [15, 0, 0, 0],					// Title space around content // [haut, droit, bas, gauche]
    			left: 'center',							// Distance between grid component and the left side of the container
    			text: P_Titre,
    			textStyle: P_Title_textStyle
    		},
    		grid: {
    			show: true,							// Whether to show the grid in rectangular coordinate
    			backgroundColor: P_CoulFondGrpah, // fond du graphe
    			top: 50,								// Distance between grid component and the top side of the container
    			bottom: 120,								// Distance between grid component and the bottom side of the container
    			left: 150,								// Distance between grid component and the left side of the container
    			right: 30								// Distance between grid component and the right side of the container
    		},
    		axisPointer: {
    			show: true,
    			lineStyle: {
    				type: 'dashed',
    				width: 1 						// Epaisseur de la ligne verticale
    			},
    			label: {
    				backgroundColor: '#777'
    			}
    		},			
    		xAxis: {									// The X axis in Cartesian (rect.) coordinate
    			axisLine: P_XAxisLine,
    			axisTick: P_XAxisTick,
    			splitLine: P_XSplitLine,		// True => quadrillage sur le graphe
    			splitArea: P_XSplitArea, 	// Permet de mettre un fond de couleurs différentes
    			type: 'category',
    			name: 'Tranches Horaires (TU)' + '\n\n' + WTexteInfo,
    			nameLocation: 'center',
    			nameTextStyle: {
    				padding: WPaddingTexte_xAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			max: 'dataMax',
    			position: 'bottom',
    			boundaryGap: true,
    			axisLabel: {
    				interval: 59, 						// Définit le nombre d'intervals sur xAxis => 59 car 60 val. par heure
    				rotate:0,
    				margin: 10,
    				showMinLabel: true,
    				align : 'left',
    				padding: padding_array, 			// [haut, droit, bas, gauche]
    				color: 'rgb(050,050,050)'
    			},
    			axisPointer: {
    				label : {
    					formatter: function (params) {
    					return Interv[parseInt(params.value) * 60]; // * 60 => on se déplace de 60 dans le tableau de 1440 items
    					}
    				},
    			},
    			data: TranchesHoraires_X
    		},
    		yAxis: {
    			axisLine: P_YAxisLine,
    			axisTick: P_YAxisTick,
    			type: 'value',
    			name: 'Mouvements',
    			nameLocation: 'center',
    			nameRotate: 90,
    			nameTextStyle: {
    				padding: WPaddingTexte_yAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			axisLabel: { 							// Settings related to axis label
    				color: 'rgb(070,070,070)'
    			},
    			axisPointer: {
    				label: {
    					formatter: function (params) {
    						return parseInt(params.value) + " -";
    					}
    				}
    			}
    		},
    		toolbox: {									// Cartouche en haut à droite
    			show: true,
    			padding: [5, 10, 0, 0],	// [haut, droit, bas, gauche]
    			itemSize: 15,
    			itemGap: 7,
    			showTitle: true,		
    			feature: {
    				restore: {
    					show: true,
    					title: 'Rechargement'
    				},
    				magicType: {
    					type: ['line', 'bar'],
    					title: {
    						line: 'Ligne',
    						bar: 'Histo.'
    					}
    				},
    				saveAsImage: {
    					title:'Sauvegarde PNG'
    				},
    				dataView: {
    					show: true, // Affiche ou non l'icône pour afficher les données utilisées.
    					readOnly: false,
    					backgroundColor: '#88ABD9',
    					title: 'Données',
    					lang: ['Données utilisées pour le graphique...', 'Retour', 'Export CSV'], 
    					optionToContent: function(opt) {
    						var axisData = opt.xAxis[0].data;
    						var series = opt.series;
    						var WTable01 = '<div id="ID_Table_Data">';
    						WTable01 = WTable01 + '<table class="table-fill">';
    						WTable01 = WTable01 + '<thead><tr>';
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Tranches Horaires</th>'
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Intervales</th>'
    						WTable01 = WTable01 + '<th class="text-center">' + series[1].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[2].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[0].name + '</th>';
    						WTable01 = WTable01 + '</tr></thead>';
    						WTable01 = WTable01 + '<tbody class="table-hover">';
    						for (var i = 0, l = axisData.length; i < l; i++) {
    							WLigneCSV = WLigneCSV + TranchesHoraires_X[i] + ";" + Interv[parseInt(i)] + ";";
    							WLigneCSV = WLigneCSV + series[1].data[i] + ";" + series[2].data[i] + ";" + series[0].data[i];
    							WLigneCSV = WLigneCSV + "\n";
    							WTable01 += '<tr>'
    									 + '<td class="text-center">' + TranchesHoraires_X[i] + '</td>'
    									 + '<td class="text-center">' + Interv[parseInt(i)] + '</td>'
    									 + '<td class="text-center">' + series[1].data[i] + '</td>'
    									 + '<td class="text-center">' + series[2].data[i] + '</td>'
    									 + '<td class="text-center">' + series[0].data[i] + '</td>'
    									 + '</tr>';
    						}
    						WTable01 += '</div></tbody></table>';
    						return WTable01;
    					},
    					contentToOption: function(){ // Va permetrtre de gérer l'exportation en CSV
    						var NomCSV = "HeuresGlissantes_" + P_dayInit;
    						var Ext = ".CSV";
    						var FicCSV = NomCSV + Ext;
    // Ecrire le contenu de la variable WLigneCSV dans un fichier
    						download(FicCSV, WLigneCSV);
    					}
    				}
    			}
    		},
    		tooltip: {
    			show: true,
    			trigger: 'axis', 						// Triggered by axes.
    //				axisPointer: {
    //					show: true,
    //					type: 'line',
    //					label : {
    //						formatter: function (params) {
    //						return Interv[parseInt(params.value) * 60]; // * 60 => on se déplace de 60 dans le tableau de 1440 items
    //						}
    //					},
    //					lineStyle: {
    //						width: 1 						// Epaisseur de la ligne verticale
    //					}
    //				}
    		},
    		series : [
    			{
    				type: 'line',
    				name: 'Nb Total',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: SommeTH_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Arrivée',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalARR_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Départ',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalDEP_Y
    			}
    		]
    	};
     
    	if (P_Plateforme == "LFPO")
    		{
    			HG_Chart_C1.setOption(HG_ChartOpt);
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			HG_Chart_C2.setOption(HG_ChartOpt);
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			HG_Chart_C3.setOption(HG_ChartOpt);
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    		}
    	if (P_Plateforme == "LFOB")
    		{
    			HG_Chart_C4.setOption(HG_ChartOpt);
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    		}
    }

    (En tous cas, tu es vraiment d'une aide précieuse, merci beaucoup)
    Zeb'...

  5. #5
    Membre actif Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 319
    Points : 286
    Points
    286
    Par défaut
    Et re- YES !
    J'ai réussi.
    J'ai carrément effacé ce que j'avais fait (ça cafouillait trop) et reparti de rien pour le AxisPointer et ça fonctionne comme je le veux.
    Nom : eCharts14.png
Affichages : 158
Taille : 29,4 Ko

    Pour ceux qui auraient le même genre de problème, voici ce que ça donne (en bleu) :
    Code javascript : 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
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    /*----------------------------------------------------------------------------------------------*/		
    /* VARIABLES GLOBALES CONSTANTES POUR LES GRAPHES                                               */		
    /*----------------------------------------------------------------------------------------------*/		
    
    var WLigneCSV = "TRANCHES HORAIRES;INTERVALES;NB DEPART;NB ARRIVEE;TOTAL" + "\n";
    
    var WPaddingTexte_xAxis = 30;
    var WPaddingTexte_yAxis = 35;
    var P_AxeTextSize = 15;
    var P_CoulFond = "#ffffff"; // blanc
    var P_TextColor = "#5d6d7e";
    var P_Colors = ["#FE0000"];
    var P_TAB_Colors = ['#008000', '#ff0000', '#0000FF']; // Couleur des courbes.
    
    var P_Debut = {
    	textStyle: {
    		fontFamily: 'sans-serif'
    	},
    	animation: true,
    };
    var P_Title_textStyle =	{
    	color: '#000',
    	fontStyle: 'normal',
    	fontWeight: 'bold',
    	fontFamily: 'sans-serif',
    	fontSize: 20,
    };
    var P_Legend = {
    	show: true,
    	type : 'plain',
    	orient: 'vertical',
    	borderColor: '#95a5a6',
    	borderWidth: 2,
    	borderRadius: 7,
    	shadowColor: 'rgba(0, 0, 0, 0.5)',
    	shadowBlur: 10,
    	itemWidth: 25,
    	itemHeight: 14,
    	left: 3,
    	top: 15
    };
    var P_Toolbox = {									// Cartouche en haut à droite
    	show: true,
    	padding: [5, 25, 0, 0],	// [haut, droit, bas, gauche]
    	itemSize: 17,
    	itemGap: 10,
    	showTitle: true,		
    	feature: {
    		restore: {
    			show: true,
    			title: 'Rechargement'
    		},
    		magicType: {
    			type: ['line', 'bar'],
    			title: {
    				line: 'Ligne',
    				bar: 'Histo.'
    			}
    		},
    		saveAsImage: {title:'Sauvegarde PNG'}
    	}
    };
    var P_XSplitLine = {
    	show: true, // True => quadrillage VERTICAL sur le graphe
    	lineStyle: {
    		color: "#CCC",
    		type: "dotted",
    		width: 1
    	},
    };				
    var P_XSplitArea = { 							// Permet de mettre un fond de couleurs différentes
    	show: false,
    	areaStyle:{
    		color:['rgba(144,238,144,0.3)','rgba(135,200,250,0.3)']
    	},
    };
    var P_XAxisLine = {
    	lineStyle: {
    		color: 'rgb(105,105,105)',
    		width: 2,
    		onZero: true,
    	}
    };
    var P_XAxisTick = {
    	show: true,					 		// Whether to show the axis tick
    	inside: false,
    	length: 3
    };
    var P_YAxisLine = {
    	lineStyle: {
    		color: 'rgb(165,165,165)',
    		width: 2
    	}
    };
    var P_YAxisTick = {
    	length: 3,
    };
    
    
    /*----------------------------------------------------------------------------------------------*/		
    /* Graph HEURES GLISSANTES - GRAND                                                              */		
    /*----------------------------------------------------------------------------------------------*/		
    function createGraph_HG(P_Plateforme, jsonData, P_dayInit){
    
    	var i = 0,
    		WTot_Gen = 0,
    		WTot_Dep = 0,
    		WTot_Arr = 0,
    		TranchesHoraires_X = [],
    		SommeTH_Y = [],
    		TotalARR_Y = [],
    		TotalDEP_Y = [],
    		Interv = [];
    	
    	if (P_Plateforme == "LFPO")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][18]);
    				var WTotARR = parseInt(jsonData[i][10]);
    				var WTotDEP = parseInt(jsonData[i][17]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				SommeTH_Y.push(WTotal);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    			val = ($("#lfpo_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPO - " + P_dayInit;
    			var P_CoulFondGrpah = "#E1FFE9";
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][22]);
    				var WTotARR = parseInt(jsonData[i][12]);
    				var WTotDEP = parseInt(jsonData[i][21]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    			val = ($("#lfpg_hg").width() / 70);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPG - " + P_dayInit;
    			var P_CoulFondGrpah = "#FFFFD8"; //"#FFF7FC"; //"#FFFFC8";
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][16]);
    				var WTotARR = parseInt(jsonData[i][9]);
    				var WTotDEP = parseInt(jsonData[i][15]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    			val = ($("#lfpb_hg_left").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFPB - " + P_dayInit;
    			var P_CoulFondGrpah = "#DDF6FF";
    		}
    
    	if (P_Plateforme == "LFOB")
    		{
    			// Remplissage des tableaux SANS somme par heure
    			while (i < jsonData.length){
    				var hdeb = jsonData[i][2].slice(0,2);
    				var WTotal = parseInt(jsonData[i][6]);
    				var WTotARR = parseInt(jsonData[i][4]);
    				var WTotDEP = parseInt(jsonData[i][5]);
    				var WDebInt = jsonData[i][2].slice(0,5); // Pour ne pas prendre les secondes
    				var WFinInt = jsonData[i][3].slice(0,5); // Pour ne pas prendre les secondes
    				var WInterval = WDebInt + " - " + WFinInt;
    				TranchesHoraires_X.push(hdeb);
    				Interv.push(WInterval);
    				SommeTH_Y.push(WTotal);
    				TotalARR_Y.push(WTotARR);
    				TotalDEP_Y.push(WTotDEP);
    				if (jsonData[i][2].slice(3,5) == "00")
    					{
    						WTot_Arr = WTot_Arr + WTotARR;
    						WTot_Dep = WTot_Dep + WTotDEP;
    						WTot_Gen = WTot_Gen + WTotal;
    					}
    				i += 1;
    			}
    			if (jsonData.length <= 0)
    				{
    					var WTexteInfo = "PAS DE DONNEES";
    				}
    			else
    				{
    					var WTexteInfo = "Total Mvts = " + WTot_Gen + " - Total Arr = " + WTot_Arr + " - Total Dep = " + WTot_Dep;
    	//				$("#Info_lfpo_hg").html('<strong>' + WTexteInfo + '</strong>');
    				}
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    			val = ($("#lfob_hg_right").width() / 120);
    			padding_array = [0, 0, 0, val];					// [haut, droit, bas, gauche]
    			P_Titre = "Heures Glissantes LFOB - " + P_dayInit;
    			var P_CoulFondGrpah = "#FEEDED";
    		}
    		
    //console.log("TranchesHoraires_X="+JSON.stringify( TranchesHoraires_X));
    //console.log("SommeTH_Y="+JSON.stringify( SommeTH_Y));
    	
    	var HG_ChartOpt = {
    		backgroundColor: P_CoulFond,
    		color: P_TAB_Colors,
    
    		P_Debut, // Début du paramètrage des graphique (police, animation, etc...)
    //			grid: P_Grid,		// Distance between grid component and the right side of the container
    //			toolbox: P_Toolbox,
    		legend: P_Legend,
    		
    		title: {
    			padding: [15, 0, 0, 0],					// Title space around content // [haut, droit, bas, gauche]
    			left: 'center',							// Distance between grid component and the left side of the container
    			text: P_Titre,
    			textStyle: P_Title_textStyle
    		},
    		grid: {
    			show: true,							// Whether to show the grid in rectangular coordinate
    			backgroundColor: P_CoulFondGrpah, // fond du graphe
    			top: 50,								// Distance between grid component and the top side of the container
    			bottom: 120,								// Distance between grid component and the bottom side of the container
    			left: 150,								// Distance between grid component and the left side of the container
    			right: 30								// Distance between grid component and the right side of the container
    		},
    		axisPointer: {
    			show: true,
    			lineStyle: {
    				type: 'dashed',
    				width: 1 						// Epaisseur de la ligne verticale
    			},
    			label: {
    				backgroundColor: '#777'
    			}
    		},			
    		xAxis: {									// The X axis in Cartesian (rect.) coordinate
    			axisLine: P_XAxisLine,
    			axisTick: P_XAxisTick,
    			splitLine: P_XSplitLine,		// True => quadrillage sur le graphe
    			splitArea: P_XSplitArea, 	// Permet de mettre un fond de couleurs différentes
    			type: 'category',
    			name: 'Tranches Horaires (TU)' + '\n\n' + WTexteInfo,
    			nameLocation: 'center',
    			nameTextStyle: {
    				padding: WPaddingTexte_xAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			max: 'dataMax',
    			position: 'bottom',
    			boundaryGap: true,
    			axisLabel: {
    				interval: 59, 						// Définit le nombre d'intervals sur xAxis => 59 car 60 val. par heure
    				rotate:0,
    				margin: 10,
    				showMinLabel: true,
    				align : 'left',
    				padding: padding_array, 			// [haut, droit, bas, gauche]
    				color: 'rgb(050,050,050)'
    			},
    			axisPointer: {
    				show:true,
    				label : {
    					formatter: function (params) {
    					return Interv[parseInt(params.value) * 60]; // * 60 => on se déplace de 60 dans le tableau de 1440 items
    					}
    				},
    			},
    			data: TranchesHoraires_X
    		},
    		yAxis: {
    			axisLine: P_YAxisLine,
    			axisTick: P_YAxisTick,
    			type: 'value',
    			name: 'Mouvements',
    			nameLocation: 'center',
    			nameRotate: 90,
    			nameTextStyle: {
    				padding: WPaddingTexte_yAxis,
    				fontWeight: 'bold',
    				color: P_TextColor,
    				fontSize : P_AxeTextSize
    			},
    			axisLabel: { 							// Settings related to axis label
    				color: 'rgb(070,070,070)'
    			},
    			axisPointer: {
    				show:true,
    				label: {
    					formatter: function (params) {
    						return parseInt(params.value) + " -";
    					}
    				}
    			}
    		},
    		toolbox: {									// Cartouche en haut à droite
    			show: true,
    			padding: [5, 10, 0, 0],	// [haut, droit, bas, gauche]
    			itemSize: 15,
    			itemGap: 7,
    			showTitle: true,		
    			feature: {
    				restore: {
    					show: true,
    					title: 'Rechargement'
    				},
    				magicType: {
    					type: ['line', 'bar'],
    					title: {
    						line: 'Ligne',
    						bar: 'Histo.'
    					}
    				},
    				saveAsImage: {
    					title:'Sauvegarde PNG'
    				},
    //            myTool1: {
    //                show: true,
    //                title: 'Infos masquées',
    //                icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891',
    //                onclick: function () {
    //						if (P_Plateforme == "LFPO")
    //							{
    //								$('#Info_lfpo_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //						if (P_Plateforme == "LFPG")
    //							{
    //								$('#Info_lfpg_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //						if (P_Plateforme == "LFPB")
    //							{
    //								$('#Info_lfpb_hg').css('display','grid'); // Effacement de la DIV Info_lfpo_hg
    //							}
    //                }
    //            },
    				dataView: {
    					show: true, // Affiche ou non l'icône pour afficher les données utilisées.
    					readOnly: false,
    					backgroundColor: '#88ABD9',
    					title: 'Données',
    					lang: ['Données utilisées pour le graphique...', 'Retour', 'Export CSV'], 
    					optionToContent: function(opt) {
    //							if (P_Plateforme == "LFPO")
    //								{
    //									$('#Info_lfpo_hg').css('display','none'); // Effacement de la DIV Info_lfpo_hg
    //								}
    //							if (P_Plateforme == "LFPG")
    //								{
    //									$('#Info_lfpg_hg').css('display','none'); // Effacement de la DIV Info_lfpo_hg
    //								}
    //							if (P_Plateforme == "LFPB")
    //								{
    //									$('#Info_lfpb_hg').css('display','none'); // Effacement de la DIV Info_lfpo_hg
    //								}
    //							if (P_Plateforme == "LFOB")
    //								{
    //									$('#Info_lfob_hg').css('display','none'); // Effacement de la DIV Info_lfpo_hg
    //								}
    						var axisData = opt.xAxis[0].data;
    						var series = opt.series;
    						var WTable01 = '<div id="ID_Table_Data">';
    						WTable01 = WTable01 + '<table class="table-fill">';
    						WTable01 = WTable01 + '<thead><tr>';
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Tranches Horaires</th>'
    						WTable01 = WTable01 + '<th class="text-center" style="width:120px">Intervales</th>'
    						WTable01 = WTable01 + '<th class="text-center">' + series[1].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[2].name + '</th>';
    						WTable01 = WTable01 + '<th class="text-center">' + series[0].name + '</th>';
    						WTable01 = WTable01 + '</tr></thead>';
    						WTable01 = WTable01 + '<tbody class="table-hover">';
    						for (var i = 0, l = axisData.length; i < l; i++) {
    							WLigneCSV = WLigneCSV + TranchesHoraires_X[i] + ";" + Interv[parseInt(i)] + ";";
    							WLigneCSV = WLigneCSV + series[1].data[i] + ";" + series[2].data[i] + ";" + series[0].data[i];
    							WLigneCSV = WLigneCSV + "\n";
    							WTable01 += '<tr>'
    									 + '<td class="text-center">' + TranchesHoraires_X[i] + '</td>'
    									 + '<td class="text-center">' + Interv[parseInt(i)] + '</td>'
    									 + '<td class="text-center">' + series[1].data[i] + '</td>'
    									 + '<td class="text-center">' + series[2].data[i] + '</td>'
    									 + '<td class="text-center">' + series[0].data[i] + '</td>'
    									 + '</tr>';
    						}
    						WTable01 += '</div></tbody></table>';
    						return WTable01;
    					},
    					contentToOption: function(){ // Va permetrtre de gérer l'exportation en CSV
    						var NomCSV = "HeuresGlissantes_" + P_dayInit;
    						var Ext = ".CSV";
    						var FicCSV = NomCSV + Ext;
    // Ecrire le contenu de la variable WLigneCSV dans un fichier
    						download(FicCSV, WLigneCSV);
    					}
    				}
    			}
    		},
    		tooltip: {
    			show: true,
    			trigger: 'axis', 						// Triggered by axes.
    			axisPointer: {
    				show: true,
    				type: 'cross',
    				label : {
    					formatter: function (params) {
    					return Interv[parseInt(params.value) * 60]; // * 60 => on se déplace de 60 dans le tableau de 1440 items
    					}
    				},
    				lineStyle: {
    					width: 1 						// Epaisseur de la ligne verticale
    				}
    			}
    		},
    		series : [
    			{
    				type: 'line',
    				name: 'Nb Total',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: SommeTH_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Arrivée',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalARR_Y
    			},
    			{
    				type: 'line',
    				name: 'Nb Départ',					// Series name used for displaying in tooltip and filtering with legend
    				symbolSize: 7,
    				showSymbol: false,					// Whether to show symbol. It would be shown during tooltip hover
    				lineStyle: {
    					width: 1,
    					type: 'solid' //'dotted' / 'dashed'
    				},
    				smooth: false,						// Permet de lisser ou non les courbes
    				data: TotalDEP_Y
    			}
    		]
    	};
    
    	if (P_Plateforme == "LFPO")
    		{
    			HG_Chart_C1.setOption(HG_ChartOpt);
    			var HG_Chart_C1 = echarts.init(document.getElementById("lfpo_hg"));  //
    		}
    	if (P_Plateforme == "LFPG")
    		{
    			HG_Chart_C2.setOption(HG_ChartOpt);
    			var HG_Chart_C2 = echarts.init(document.getElementById("lfpg_hg"));  //
    		}
    	if (P_Plateforme == "LFPB")
    		{
    			HG_Chart_C3.setOption(HG_ChartOpt);
    			var HG_Chart_C3 = echarts.init(document.getElementById("lfpb_hg_left"));  //
    		}
    	if (P_Plateforme == "LFOB")
    		{
    			HG_Chart_C4.setOption(HG_ChartOpt);
    			var HG_Chart_C4 = echarts.init(document.getElementById("lfob_hg_right"));  //
    		}
    }

    Merci Mr. Nosmoking : tu m'as encore bien aidé.
    Zeb'...

  6. #6
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    16 959
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 16 959
    Points : 44 122
    Points
    44 122
    Par défaut
    C'est bien tu as remis en cause ton code
    Est ce que tu as trouvé pourquoi tu avais cette répétition de données dans ton label de la tooltip ?

  7. #7
    Membre actif Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 319
    Points : 286
    Points
    286
    Par défaut
    Non seulement je n'ai pas trouvé, mais en plus, j'ai essayé de le reproduire, sans résultat !

    Qui a dit que l'informatique était une science exacte ?
    Zeb'...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. utiliser les tag [MFC] [Win32] [.NET] [C++/CLI]
    Par hiko-seijuro dans le forum Visual C++
    Réponses: 8
    Dernier message: 08/06/2005, 15h57
  2. Réponses: 4
    Dernier message: 05/06/2002, 14h35
  3. utilisation du meta type ANY
    Par Anonymous dans le forum CORBA
    Réponses: 1
    Dernier message: 15/04/2002, 12h36
  4. [BCB5] Utilisation des Ressources (.res)
    Par Vince78 dans le forum C++Builder
    Réponses: 2
    Dernier message: 04/04/2002, 16h01
  5. Réponses: 2
    Dernier message: 20/03/2002, 23h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo