Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/08/2012, 08:28
tmgguru01
 
Fecha de Ingreso: junio-2010
Mensajes: 59
Antigüedad: 13 años, 10 meses
Puntos: 1
Empujoncito con Highchart Framework

Saludos a todos, les cuento que estoy utilizando la libreira Highcharts para el manejo de graficas desde javascript. El caso es que practicamente no hay documentacion en español y en el caso especifico de los demos hay codigo que no esta comentado y me resultan algo enigmaticas ciertas lineas. Por ejemplo estoy usando las graficas de area y no entiendo como trabajar con la propiedad pointInterval de las series. quiero hacer una grafica dinamica en un rango de dias que el usuario seleccione (eso lo puedo hacer perfectamente) pero no encuentro la descripcion de varios script que debo utilizar aqui les dejo la funcion en cuestion del framework:

<script type="text/javascript">
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
zoomType: 'x',
spacingRight: 20
},
title: {
text: 'USD to EUR exchange rate from 2006 through 2008'
},
subtitle: {
text: document.ontouchstart === undefined ?
'Click and drag in the plot area to zoom in' :
'Drag your finger over the plot to zoom in'
},
xAxis: {
type: 'datetime',
maxZoom: 7 * 24 * 3600000, //siete dias
title: {
text: null
}
},
yAxis: {
title: {
text: 'Exchange rate'
},
min: 0.6,
startOnTick: false,
showFirstLabel: false
},
tooltip: {
shared: true
},
legend: {
enabled: false
},
plotOptions: {
area: {
fillColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, 'rgba(2,0,0,0)']
]
},
lineWidth: 1,
marker: {
enabled: false,
states: {
hover: {
enabled: true,
radius: 5
}
}
},
shadow: false,
states: {
hover: {
lineWidth: 1
}
}
}
},

series: [{
type: 'area',
name: 'USD to EUR',
pointInterval: 60 * 60 * 1000,
pointStart: Date.UTC(2006, 0, 01),
data: [
0.8446, 0.8445, 0.8444, 0.8451, 0.8418, 0.8264, 0.8258, 0.8232, 0.8233, 0.8258, ... etc
]
}]
});
});

});


Cualquier ayuda se la agradeceré.
Saludos,
Tony.