I'm trying to load csv data for a highcharts basic column chart.
I'm using the latest data-module method here and not parsing like the old method ( http://www.highcharts.com/docs/working-with-data/data-module )
I have loaded all js libraries & modules needed (highcharts, exporting & data files) and used the following codes :
HTML :
<body>
<h1>
<img src="images/header.png" alt= " This is header! "height = "100px"; width ="1350px">
</h1>
<div id="container">
</div>
</body>
Javascript :
console.log("Enters")
$.get('test.csv', function(csv) {
console.log("Function")
$('#container').highcharts({
chart: {
type: 'column'
},
data: {
csv: csv
},
title: {
text: 'Fruit Consumption'
},
yAxis: {
title: {
text: 'Units'
}
}
});
});
console.log("Function ends");
My screen is empty with only the header display
My console display is as follows :
Enters
Function ends
In the javascript code, $.get function is not working and it's not going inside only. What is going wrong here? Am i missing something very basic on jquery and/or highcharts?
Any feedback is highly appreciated
Update :
So, I found this link wherein data is being loaded from an online CSV file. But, no other link shows data loaded from the local system.
My file is in : D:\Optus\H2 Reporting\H2 Web Dashboard\test.csv The function never enters inside $.get
How do I access this file using $.get function?