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

128
Views
'[objeto objeto]' en mi gráfico de líneas, así como los datos que quiero

así que creé una matriz de objetos con tiempos y tamaños para cada objeto. Tomé esa matriz de objetos llamada 'Fechas' y la inserté en las etiquetas de mi gráfico de líneas y usé el análisis para seleccionar solo la 'Fecha' dentro de cada objeto. Puede que lo haya hecho mal, pero muestra las etiquetas, pero con [objeto objeto] las primeras cinco veces.

Todos los datos se extraen de una API usando Axios y useEffect de NASA Near Earth Objects. Estoy tratando de crear una línea de tiempo que muestre los tamaños a lo largo de hoy.

Las etiquetas del gráfico

 const Dates = [ {DateNum: parseInt(DateOne.substring(12)), Time: DateOne.substring(12), Size: 'Object ' + [0] + ' ' + data[1].name}, {DateNum: parseInt(DateTwo.substring(12)), Time: DateTwo.substring(12), Size: 'Object ' + [0] + ' ' + data[1].name}, {DateNum: parseInt(DateThree.substring(12)), Time: DateThree.substring(12), Size: 'Object ' + [0] + ' ' + data[1].name}, {DateNum: parseInt(DateFour.substring(12)), Time: DateFour.substring(12), Size: 'Object ' + [0] + ' ' + data[1].name}, {DateNum: parseInt(DateFive.substring(12)), Time: DateFive.substring(12), Size: 'Object ' + [0] + ' ' + data[1].name}, ] const sortedDates = Dates.sort((b, a) => b.DateNum - a.DateNum); // let DateTwoName = 'Object ' + [1] + ' ' + data[2].name; // let DateThreeName = 'Object ' + [2] + ' ' + data[3].name; // let DateFourName = 'Object ' + [3] + ' ' + data[4].name; // let DateFiveName = 'Object ' + [4] + ' ' + data[5].name; setTimeLineInfo(sortedDates); const labels = TimeLineInfo; return( //fragment <Line options = {{ responsive: true, plugins: { legend: { }, title: { display: false, }, }, }} data = {{ labels, datasets: [ { label: '5 Objects today by time', data: TimeLineInfo, parsing: { xAxisKey: 'Time' }, borderColor: 'rgba(255, 102, 0, 1)', backgroundColor: 'rgba(255, 102, 0, 0.5)', } ], }} height = {800} width = {1200} /> )

Ignore la entrada Tamaño. Aún no la he completado.

about 4 years ago · Santiago Gelvez
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!