Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/07/2011, 09:14
Avatar de eliza_ralves
eliza_ralves
 
Fecha de Ingreso: junio-2009
Ubicación: Caracas
Mensajes: 126
Antigüedad: 14 años, 10 meses
Puntos: 2
Respuesta: Problema en Exportar Gráfica de Highcharts IE

Hola que tal? Les dejo aquí la solución al problema. Resulta que no me admitía un formato para la gráfica:

Código:
			

Highcharts.visualize = function(table, options) {
// the categories
    options.xAxis.categories = [];
    $('tbody th', table).each( function(i) {
	options.xAxis.categories.push(this.innerHTML);
     });
				
// the data series
	options.series = [];
	$('tr', table).each( function(i) {
		var tr = this;
		$('th, td', tr).each( function(j) {
		if (j > 0) { // skip first column
			if (i == 0) { // get the name and init the series
				options.series[j - 1] = { 
					name: this.innerHTML,
					data: [],
                                        type: 'area',
                                        dataLabels: {
                                               enabled: true,
                                               style: {
                                                  font: 'normal 13px Verdana, sans-serif'
                                                },
                                                color: '#000000',
                                               formatter: function() {
                                                  return this.y;
                                               }
                                          }
				};
			} else { // add values
					options.series[j - 1].data.push(parseFloat(this.innerHTML));
				}
		}
	});
});
				
var chart = new Highcharts.Chart(options);
}
				
// On document ready, call visualize on the datatable.
$(document).ready(function() {			
	var table = document.getElementById('datatable'),
		options = {
			chart: {
				 renderTo: 'container',
				defaultSeriesType: 'area'
			},
			title: {
				 text: 'Graficos Estadisticos - SPO2'
				},
			 xAxis: {
                            title: {
				 text: 'Meses'
			}
			},
			yAxis: {
				 title: {
					 text: 'Horas - Hombre'
				}
			},
			 tooltip: {
				 formatter: function() {
					 return '<b>'+ this.series.name +'</b><br/>'+
					 this.y +'H/H';
				}
			}
};			
			      					
Highcharts.visualize(table, options);
});
__________________
“El mayor enemigo del conocimiento no es la ignorancia, sino la ilusión del conocimiento”— Stephen Hawking