I'm trying to setup ZingChart so it will plot data from a local CSV file.
I have a working example using the csv and data-string attributes that renders the graph without issues:
<!DOCTYPE html>
<html>
<head>
<script src="zingchart/zingchart.min.js"></script>
<script>
zingchart.MODULESDIR = "zingchart/modules/";
</script>
<style></style>
</head>
<body>
<div id='myChart'></div>
<script>
var myConfig = {
"type": "line",
"csv":{
"data-string":"Model|Highway|City_Ford 150|19|16_Mazda S3|30|21_Prius|42|35",
"row-separator":"_",
"separator":"|"
}
};
zingchart.render({
id: 'myChart',
data: myConfig,
height: 400,
width: "100%"
});
</script>
</body>
</html>
However changing the csv so it links to a file instead raises an error:
"csv": {
"url": "zingchart/data01.csv"
}
ZingChart error loading CSV file
In the ZingChart tutorials there are links to JSFiddle so you can freely edit the javascript and see the results. On them I am also getting the same error screen if they are using the csv/url configuration option.
Am I missing something?