Home forums Using CanvasJS Y data points do not graph Reply To: Y data points do not graph

#4545

Sunil Urs
Keymaster

james,

I just looked into your json data and it seems like the json API is returning all numeric values as string. Just make sure you convert string values to number before assigning them to “y”

This should work

`dataPoints.push({ x: i, y: Number(parsed_json.history.observations[i].tempi)});`

http://www.w3schools.com/jsref/jsref_number.asp