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

156
Visualizações
Line chart all data points at same point

All timestamps at same place on x-axis

''' getMyChart_OneHourdata(data) { data.forEach(el => { for (let key in el) { if (key == "dataset") this.lastOneHourDataValues = el[key]

        }})
  console.log("lastonehr",this.lastOneHourDataValues)
   
    for (const value of this.lastOneHourDataValues) {
        console.log(value)
       for(const val of value)
       {
           this.lastonehrtimestamp.push(val.x)
           this.lastonehrdatavalues.push(val.y)
       }

    };
    console.log(" this.lastonehrdatavalues", this.lastonehrdatavalues)
    console.log("this.lastonehrtimestamp", this.lastonehrtimestamp)
    const ctx = document.getElementById('SDSPOneChart');
        console.log("ctx", ctx)
    console.log("last1hrdata", data)
   
    const sdsPOneChart = new Chart(ctx, {
            type: 'line',
            data: {
                
                labels: [this.lastonehrtimestamp],
                datasets: [{
                    label: 'SDS_P1',
                    data: [this.lastonehrdatavalues],
                    backgroundColor: ['Orange'],
                    borderColor: 'rgb(75, 192, 192)',
                    tension: 0
                }],

            },

            options: {
                responsive: true,
                maintainAspectRatio: true,

                scales: {
                    x: {
                        beginAtZero: true
                     }
                }
            }
        });
    console.log("CurrentSDSP1_P2", sdsPOneChart)
    }

'''

Am i doing something wrong here. Do i need to configure x-axis?

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