我有这个 github 存储库: https://github.com/silvestrep/SocialMediaGraphsVis
但是,当我打开html时,我看不到数据:https://silvestrep.github.io/SocialMediaGraphsVis/index.html
有人可以帮我解决这个问题吗?非常感谢!
最佳答案
您的问题在于以下行:
Index.html
...
d3.csv("../data/PadreHimalayaFollowersDatacsvpackage.csv"...
这不是包含数据的 csv 文件的路径,因此浏览器认为您正在尝试访问远程资源并进行投诉。
将其更改为:
Index.html
...
d3.csv("Data/PadreHimalayaFollowersDatacsvpackage.csv"...
这是 csv 文件的正确路径。
关于javascript - HTML 不从我的 github 存储库读取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52353639/