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

210
Views
Chartjs Financial Candlestick no muestra el gráfico Javascript

Buenos días a todos,

Estoy tratando de implementar el gráfico de "candelabro" de la biblioteca Chartjs;

Tomé el ejemplo que se muestra en la documentación como guía y todo funciona correctamente: los ejes 'x' e 'y' muestran los valores correctos; El problema es que el gráfico real no se muestra, incluso si los ejes cartesianos están presentes.

este es el código utilizado para implementar el gráfico y la imagen del resultado

 var barCount = 5; var initialDateStr = '01 Apr 2017 00:00 Z'; var barData = getRandomData(initialDateStr, barCount); //console.log(barData) //function lineData() { return barData.map(d => { return { x: dx, y: dc} }) }; var chart = new Chart(ctx, { type: 'candlestick', data: { datasets: [{ label: 'CHRT - Chart.js Corporation', data: barData }] } }); var getRandomInt = function(max) { return Math.floor(Math.random() * Math.floor(max)); }; function randomNumber(min, max) { return Math.random() * (max - min) + min; } function randomBar(date, lastClose) { var open = +randomNumber(lastClose * 0.95, lastClose * 1.05).toFixed(2); var close = +randomNumber(open * 0.95, open * 1.05).toFixed(2); var high = +randomNumber(Math.max(open, close), Math.max(open, close) * 1.1).toFixed(2); var low = +randomNumber(Math.min(open, close) * 0.9, Math.min(open, close)).toFixed(2); return { x: date.valueOf(), o: open, h: high, l: low, c: close }; }

ingrese la descripción de la imagen aquí

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!