Domnik,
The dataPoints must be parsed in a format accepted by CanvasJS. You can parse the dataPoints from an array and render the chart as shown in the code-snippet below,
function parseDataPoints () {
for (var i = 0; i <= dataArray.length; i++)
dps.push({y: dataArray[i]});
}
parseDataPoints();
chart.options.data[0].dataPoints = dps;
chart.render();
Kindly take a look at this JSFiddle for an example on parsing dataPoints from array and rendering the chart.
—
Adithya Menon
Team CanvasJS