Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
Is it possible to use the Google charts api to create charts without using html elements for rendering?

I used this code to render some charts in my html page.

function drawChart(id, arrayPrice) {

    let dataChart = [
        ['', 'Price']
    ];
    for (let index = 0; index < arrayPrice.length; index++) {

        dataChart.push(['', arrayPrice[index]])
    }

    const firstPrice = dataChart[1][1];
    const lastPrice = dataChart[dataChart.length - 1][1];

    var data = google.visualization.arrayToDataTable(dataChart);

    var options = {
        width: 130,
        height: 50,
        colors: (firstPrice < lastPrice) ? ['#50afb2'] : ['#ab5780'],
        legend: 'none',
        tooltip: {
            trigger: 'none'
        },
        enableInteractivity: false,
        vAxis: {
            textPosition: 'none',
            gridlines: {
                color: 'transparent'
            },
            baselineColor: 'transparent'
        },
        hAxis: {
            textPosition: 'none',
            gridlines: {
                color: 'transparent'
            },
            baselineColor: 'transparent'
        },
        backgroundColor: { fill: 'transparent' }
    };

    var chart = new google.visualization.LineChart(document.getElementById(id));

    chart.draw(data, options);
}

I was wondering if it was possible to do this server-side with NodeJS without using html elements in which to do the rendering.

My goal is to generate chart images to download locally to the server.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda