Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!