Ver Mensaje Individual
  #8 (permalink)  
Antiguo 27/03/2016, 05:18
lagardel
 
Fecha de Ingreso: febrero-2008
Ubicación: Caravana
Mensajes: 455
Antigüedad: 16 años, 2 meses
Puntos: 30
Respuesta: Gráfico con Highchart con los datos devueltos de una vista

Accedes igual, por ejemplo:

Código:
$(function () {
    $('#container').highcharts({
        title: {
            text: 'Monthly Average Temperature',
            x: -20 //center
        },
        subtitle: {
            text: 'Source: WorldClimate.com',
            x: -20
        },
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            title: {
                text: 'Temperature (°C)'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: '°C'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: 'Tokyo',
            data: {{datosdetokio}}
        }, {
            name: 'New York',
            data: {{datosdenewyork}}
        }, {
            name: 'Berlin',
            data: {{datosdeberlin}}
        }, {
            name: 'London',
            data:{{datosdelondres}}
        }]
    });