Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

148
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda