Loading local JSON file

前端 未结 23 1605
悲哀的现实
悲哀的现实 2020-11-22 01:28

I\'m trying to load a local JSON file but it won\'t work. Here is my JavaScript code (using jQuery):

var json = $.getJSON("test.json");
var data = e         


        
23条回答
  •  天涯浪人
    2020-11-22 01:49

    Recently D3js is able to handle local json file.

    This is the issue https://github.com/mbostock/d3/issues/673

    This is the patch inorder for D3 to work with local json files. https://github.com/mbostock/d3/pull/632

提交回复
热议问题