Very simple tutorial example of D3.js not working

后端 未结 4 2270
小蘑菇
小蘑菇 2020-12-19 12:26

I\'m kind of new to D3.js. I\'m reading Getting Started with D3 by Mike Dewar. I tried the very first example in the book, and it doesn\'t work. I\'ve been tearing

4条回答
  •  醉酒成梦
    2020-12-19 12:53

    Have you checked your browser console to see if your XHR request was successful?

    When I attempt to run the code on my machine, with a local version of d3 (v3) in VS 2012 Express, the XHR request comes back with an error message:

    HTTP Error 404.3 - Not Found

    However, when I change the extension of the "flare" file from .json to .txt or .js, as alluded to here: https://serverfault.com/questions/39989/iis-cant-serve-certain-file-extension, then the XHR request succeeds.

提交回复
热议问题