Page 1 sur 1

tooltip: Undefined (résolu)

Posté : 18 févr. 2014, 20:11
par Javier
Salut

Dans certains graphiques je vois (dans l'info-bulle): "undefined"

Comment peut-il être corrigé?

http://kocher.es/graficos-highcharts/3meses_viento.php

Re: tooltip: Undefined

Posté : 18 févr. 2014, 20:20
par Météo Villarzel
Salut Javier

Dans le tooltip, tu as

Code : Tout sélectionner

formatter: function() {
                var s = '<b>'+ Highcharts.dateFormat('%e %B a las %H:%M', this.x) +'</b>';
                
                $.each(this.points, function(i, point) {
				var unit = {
                        'Velocidad': 'km/h',
                        'Racha': 'km/h',
			'Direction' : '°'
                    }[this.point.series.name];
Direction, c'est le nom de la série de données

Code : Tout sélectionner

{           //------------------------Direction
                name: 'Dirección',
                type: 'spline',
				lineWidth: 0,
				color: 'rgba(199, 21, 133, .9)',
				yAxis: 1,
                data: comArr(dwdir),
				tooltip : {
				valueDecimals : 1
				},

                marker: {
                  symbol: 'circle',
				  radius : 4,
                  enabled: true,
                	lineWidth: 0,
                	lineColor: 'rgba(199, 21, 133, .0)',
                	fillColor: 'rgba(199, 21, 133, .3)'
                }

tu dois mettre le même nom,
soit Dirección
ou Direction
Mais le même nom dans les deux champs.

A+

Re: tooltip: Undefined

Posté : 18 févr. 2014, 20:29
par Javier
:oops:

Parfait !

Merci beaucoup Pierre_André