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

151
Vistas
Inserting data into an array for a scatterplot with KendoReact

I am trying to display a scatterplot from a variable called data. data should contain the x and y values for the scatterplot. The method below is what I am attempting to do to insert the x and y values, however the graph is showing up blank.

let data = []
for(var i = 0; i < sixth_x.length; ++i){

  data.push({xField: sixth_x[i], yField: sixth_y[i]})

}

x is a string, and y is a number.

This is my method to display the graph

  <ChartSeriesItem type="scatter" data={data} xField="sixth_x"
    yField="sixth_y"/>
</ChartSeries>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

ChartSeriesItem xField and yField expect property name of source array object. In your case source array object is {xField: <some string>, yField: <some number>}. So you should pass these property names (xField, yField) to your props. <ChartSeriesItem type="scatter" data={data} xField="xField" yField="yField"/></ChartSeries> which looks strange.

I recommend rename properties to identify what exactly your chart about, ex. price growing per year chart, so you will do something like this data.push({price: sixth_x[i], year: sixth_y[i]}) and <ChartSeriesItem type="scatter" data={data} xField="price" yField="year"/></ChartSeries> I think you get the idea.

about 4 years ago · Juan Pablo Isaza Denunciar
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