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

229
Views
La actualización de la serie de velas de gráficos ligeros da como resultado un error de tipo no detectado: no se pueden leer las propiedades de undefined (leyendo 'año')

Cuando ejecuto la update en la serie de velas, recibo Uncaught TypeError: Cannot read properties of undefined (reading 'year') . Los datos se preparan de la misma manera que para setData y se ven así: [{time: 1649068320, open: '0.15721000', high: '0.15776000', low: '0.15710000', close: '0.15760000'}] .

¿Que me estoy perdiendo aqui?

Traté de actualizar con los mismos datos que se usaron con setData y obtuve el mismo error.

También intenté preparar los datos de esta manera: var time = moment(item.openTime); time = { year: time.year(), month: time.month(), day: time.day(), hour: time.hour(), minute: time.minute(), second: time.second(), } y var time = new Date(item.openTime)

Pasos mínimos para reproducir

 import { createChart } from 'lightweight-charts'; var container = document.getElementById('price-chart'); const chart = createChart(container, {height:300}); chart.applyOptions({ timeScale: { visible: true, timeVisible: true, }, }); const candlestick = chart.addCandlestickSeries(); candlestick.setData([{time: 1649102700, open: '3.39110000', high: '3.39130000', low: '3.38610000', close: '3.38670000'}]); candlestick.update([{time: 1649102700, open: '3.39110000', high: '3.39130000', low: '3.38610000', close: '3.38670000'}]);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

update toma un solo objeto. así que en lugar de

 candlestick.update([{time: 1649102700, open: '3.39110000', high: '3.39130000', low: '3.38610000', close: '3.38670000'}]);

debería ser

 candlestick.update({time: 1649102700, open: '3.39110000', high: '3.39130000', low: '3.38610000', close: '3.38670000'});

También:

  • No puede utilizar la update de datos anteriores. Entonces, al desplazarse hacia atrás, debe usar setData
  • al configurar los datos, la matriz debe estar en orden cronológico o obtendrá un Uncaught Error: Value is null .
about 4 years ago · Juan Pablo Isaza Report
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!