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

202
Views
ChartJS generated random number at <canvas>

can someone help me with randomly generated 0 at the top of the ChartJS canvas. Here is the js:

const chartConst= document.getElementById('canvasUnique').getContext('2d');
    const chartInit= new Chart(chartInit, {
        type: 'bar',
        data: {
            labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
            datasets: [{
                data: [10, 20, 30, 40, 50, 60],
                backgroundColor: [
                    '#CDF8FC',
                    '#FFEAD1',
                    '#CDF8FC',
                    '#FFEAD1',
                    '#CDF8FC',

                ],
                borderColor: [
                    '#CDF8FC',
                    '#FFEAD1',
                    '#CDF8FC',
                    '#FFEAD1',
                    '#CDF8FC',

                ],
                borderWidth: 1,
                datalabels: {
                    anchor: 'end',
                    align: 'left'
                }
            }],
        },
        plugins: [ChartDataLabels],
        options: {
            plugins: {
                legend: {
                    display: false
                }
            },
            responsive:true,
            maintainAspectRatio: true,
            indexAxis: 'y',
            scales: {
                y: {
                    beginAtZero: true,
                    grid: {
                        display: false,
                        drawBorder: false,
                    }
                },
                x: {
                    beginAtZero: true,
                    min: 0,
                    max: 100,
                    grid: {
                        display: false,
                    }
                }
            },
        },
    });

It seems like there is some kind of random number at the top and I can not change it with HTML/CSS and I have checked if there is some kind of unclosed string at the js part.

enter image description here

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!