Add label to high Charts using html table

Asked

Viewed 85 times

1

I am unable to add a label to my type : pie chart from my HTML table. It would be possible to do this?

grafico.grafico007 = {
getData: function() {
    url = ajaxurl + "Relatorios/rel007";

    data = grafico.getDataPadrao();



    $.get(url, data, function(response) {

        var html = $(response);
        $("#container-dados-grafico-07").html(html);
        grafico.grafico007.gerar();

    });
},
gerar: function() {

    $('#grafico-07').highcharts({
        data: {
            table: document.getElementById('tabela-grafico-07'),
        },
        chart: {
            type: 'pie'
        },
        title: {
            text: 'Tempo de Resposta Concessionário'
        },
        subtitle: {
            text: 'Relatorio 007 - Periodo de ' + $('#data_inicio').val() + ' a ' + $('#data_fim').val()
        },
        yAxis: {
            allowDecimals: false,
            title: {
                text: 'Chamados'
            }
        },
        tooltip: {
            formatter: function() {
                return '<b>' + this.series.name + '</b><br/>' +
                        this.point.y + ' ' + this.point.name.toLowerCase();
            }
        }
    });

}

};
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.