Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
Error while loadind data to react-native-pure-chart

Actually i'm would load data dynamically to react-native-pure-chart.

I have an API that give the data for each time where there was some measures and the response look's like the following:

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: Exception in HostFunction: Malformed calls from JS: field sizes are different.

[[3,3,3,3,3],[2,2,2,2,2],[[357,"RCTView",21,{"position":"absolute","height":"100%","width":"100%"}],[367,"RCTView",21,{"borderTopColor":-2039584,"borderTopWidth":1,"width":"100%"}]],2038]

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda