I Have the following code which generates a basic area chart from JSON data, This work fine on my local host machine http://127.0.0.1, but when i try to view in the web url i get an error
Failed to load resource: the server responded with a status of 404 (Not Found) https://devb.........../bm2/data1.json Failed to load resource: the server responded with a status of 404 (Not Found)
Can anyone help why i am getting this error?
My working code can be seen here in fiddle
$(document).ready(function() {
Highcharts.setOptions({
lang: {
thousandsSep: ','
}
});
var options = {
chart: {
renderTo: 'container',
type: 'area',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Deposit Institution',
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Amount'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': $'+ this.y;
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: []
}
$.getJSON("data1.json", function(json) {
options.xAxis.categories = json[0]['data'];
options.series[0] = json[1];
options.series[1] = json[2];
chart = new Highcharts.Chart(options);
});
});