Very simple tutorial example of D3.js not working

后端 未结 4 2268
小蘑菇
小蘑菇 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 13:05

    If you're using Chrome, it may prevent you from opening the file properly because of cross domain security restrictions. Try Firefox to see if that's the case (it will probably let you load the file correctly).

    If that is the problem, you will want to install a local web server like WAMP (if you're running Windows) or follow instructions on the wiki page here: https://github.com/mbostock/d3/wiki

    Good luck

提交回复
热议问题