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

350
Views
Error al cargar datos en react-native-pure-chart

En realidad, cargaría datos dinámicamente para reaccionar-native-pure-chart.

Tengo una API que proporciona los datos para cada momento en el que hubo algunas medidas y la respuesta es similar a la siguiente:

 Array [ 230, 230, 230, 50, 250, ] Array [ "14", "13", "09", "09", "09", ] const [itemsY, setItemsY] = useState([]); const [itemsX, setItemsX] = useState([]); useEffect(() => { fetchData1(); }, [1]) const fetchData1 = () => { DataService.getEnergyDataList() .then(response => { setItemsY([...itemsY,...response.data.map(res => res.Voltage)]); setItemsX([...itemsX, ...response.data.map(res => res.Time.substr(11, 2))]); }) .catch(e => { console.log(e); }); }; let sampleData = [ {x: itemsX, y: itemsY}, ] <PureChart data={sampleData} type='line' width={'100%'} height={300} customValueRenderer={(index, point) => { if (index % 2 === 0) return null return ( <Text style={{textAlign: 'center'}}>{point.y}</Text> ) }}/>

Error: excepción en HostFunction: llamadas mal formadas desde JS: los tamaños de campo son diferentes.

[[3,3,3,3,3],[2,2,2,2,2],[[357,"RCTView",21,{"posición":"absoluta","altura":"100 %","ancho":"100%"}],[367,"RCTView",21,{"borderTopColor":-2039584,"borderTopWidth":1,"ancho":"100%"}]],2038 ]

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!