javascript - D3.js 加载资源失败:服务器响应状态为 404(未找到)
问题描述
我正在尝试教程,但未加载域请求。链接工作正常,但我仍然收到错误消息。我正在使用 D3.js 处理仪表板。我感谢您的帮助!
d3.json("https://oec.world/attr/country/", function(country_error, countries) {
if (country_error) return console.arn(country_error);
countries.data.forEach(function(d) {
country_attrs[d.id] = d;
});
});
d3.json("https://oec.world/hs/export/2011/show/all/all/", function(error_2011, json_2011) {
if (error_2011) return console.warn(error_2011);
json_2011.data.forEach(function(d) {
data[d.origin_id] = {
"export_val_2011": d.export_val,
"id": d.origin_id
}
});
d3.json("https://oec.world/hs/export/2010/show/all/all/", function(error_2010, json_2010) {
if (error_2010) return console.warn(error_2010);
json_2010.data.forEach(function(d) {
if(data[d.origin_id]) {
data[d.origin_id]["export_val_2010"] = d.export_val
}
});
解决方案
推荐阅读
- angular8 - 如何使用 Angular 中的 Ag Grid 根据列值组为行添加颜色?
- assembly - 检查输入字符的最简洁方法是在汇编中介于 0~9 之间
- laravel - Laravel 邮件无法发送
- r - mutate(across()) 中的 str_replace 匹配 cur_column 中的第 n 个字符
- php - 异常:“Symfony\Component\HttpKernel\Exception\HttpException”“CSRF 令牌不匹配。” 419未知状态
- java - 在 Java Webclient 中,如何在 Mono 序列化中值为 null 时完全省略字段
- entity-framework - 使用 Load/LoadAsync 时,如何确定将多少行加载到 EF6 DbContext 中?
- database-design - 具有一致哈希 P2P 设计的高可用性数据库
- oracle - 带有 64 位版本的 Office 365 上的 MS Access 数据库因链接 Oracle 表而间歇性挂起
- javascript - 如果任何子对象(递归)匹配值,我如何在父对象上设置属性