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

153
Views
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 answers
Answer question

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 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!