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

183
Views
cómo cambiar la forma de mostrar la fecha en el gráfico js

Tengo un gráfico usando chartjs. Allí se muestran 31 días, pero debido a la longitud del gráfico, las fechas se deforman así este Quiero que las fechas se muestren de manera adecuada, no así. Cómo manipular la fecha, de manera que Oct se muestre en la parte superior y la 6ta fecha se muestre debajo. ¿Tienes algunas ideas? El código se ve así.

 const ctx = document.getElementById('myChart').getContext('2d'); const myChart = new Chart(ctx, { type: 'bar', data: { labels: data.map(x => moment(x.date).format("MMM Do")), datasets: [{ data: data.map(x => x.premium), backgroundColor: '#ffec87', borderColor: "#ffec87", borderWidth: 2, borderStyle: 'dotted' }] }, options: { scales: { xAxis: { grid: { display: false } }, yAxis: { grid: { borderDash: [3, 5] } } } } });
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!