2👍
The JSON in that txt file is not a valid JSON object. You need to use regular quotes like so:
[{"date": "1/02/16", "price":15.25},
{"date":"29/01/16", "price":15.35},
{"date":"28/01/16", "price":15.1}];
Also you can use jQuery’s $.getJSON
function here:
var myJSON = $.getJSON( "example.json", function() {
console.log( "success" );
})
see here: http://api.jquery.com/jquery.getjson/
- [Chartjs]-How to append more data in tooltip of graph in chart.js
- [Chartjs]-How to set max and min value for Y axis
Source:stackexchange.com