I am trying to draw a chart in a HTML page using Highcharts with data from a CSV file, more specifically i'm trying to replicate the official example (https://www.highcharts.com/docs/working-with-data/data-module), to no avail. When i load the page, the chart is not present and i get a "Highchart Error 13" error in the console (https://assets.highcharts.com/errors/13/). I tried with and without the "renderto:" line and in both cases it didn't work.
Here is my HTML code :
<html>
<head>
<title>Highcharts Test</title>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<div id="container" style="width:100%; height:400px;"></div>
</body>
</html>
Here is my JS code :
Highcharts.chart('container', {
chart: {
type: 'column'
},
data: {
enablePolling: true,
csvURL: 'graph.csv'
},
renderto: "container",
title: {
text: 'Fruit Consumption'
},
yAxis: {
title: {
text: 'Units'
}
}
});
Here is my CSV data imported as a CSS code snippet :
Categories,Apples,Pears,Oranges,Bananas
John,8,4,6,5
Jane,3,4,2,3
Joe,86,76,79,77
Janet,3,16,13,15
I double-checked every file name and found no errors. I am using Mozilla Firefox 96.0.3 64 bits and Windows 10 1607 14393.1944 .