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

104
Views
Creating charts

I need to make a chart at the level with a row in the table, are there any tips on how to implement this enter image description here

I need the chart lines to match the row level in the table and this code draws a separate chart const diag = () => {

  document.getElementById("canvasic").innerHTML = ' ';
  document.getElementById("canvasic").innerHTML = '<canvas id="densityChart" className="canav"></canvas>';

  densityCanvas = document.getElementById("densityChart");

   //remove canvas from container

  Chart.defaults.global.defaultFontFamily = "Arial";
  Chart.defaults.global.defaultFontSize = 16;
  
  var densityData = {
    label: 'CallVol',
    data:calloiList1,
    backgroundColor: 'rgba(0,128,0, 0.6)',
    borderColor: 'rgba(0,128,0, 1)',
    borderWidth: 2,
    hoverBorderWidth: 0
  };
  var densityData1 = {
    label: 'PutVol',
    data:calloiList3 ,
    backgroundColor: 'rgba(255,0,0, 0.6)',
    borderColor: 'rgba(255,0,0, 1)',
    borderWidth: 2,
    hoverBorderWidth: 0
  };
  
  var chartOptions = {
    scales: {
      yAxes: [{
        barPercentage: 0.5
      }]
    },
    elements: {
      rectangle: {
        borderSkipped: 'left',
      }
    }
  };

  var barChart = new Chart(densityCanvas, {  
 
    type: 'horizontalBar',
    data: {
      labels: calloiList4,
      datasets: [densityData,densityData1],
     
    },
    options: chartOptions 
    
  }
  );

}

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!