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. I realize that x is non-numeric, although upon converting to an int, it still fails to display on a scatterplot. Any suggestions would be helpful
This is my method to display the graph
<ChartSeriesItem type="scatter" data={data} xField="sixth_x"
yField="sixth_y"/>
</ChartSeries>