为什么d3-3d.js函数未识别?

发布于 2025-02-10 09:10:02 字数 1061 浏览 0 评论 0原文

我尝试使用D3-3D表示3D图。

我首先尝试使用一些示例来了解它的工作原理,但是当一个尝试复制粘贴时 httttps:// a> 或这个 我收到错误:uck typeError:d3._3d()。刻度(...)。origin(...)。rotatex(...)。rotatey(...)。pripitiveType不是一个函数,

我更改了D3和3D的方式被进口,并尝试使用Chrome和Firefox,并且一直在这里。

我设法启动的唯一示例是这个

https://bl.ocks.org/niekes/niekes/niekes/1c15016aee5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5fib5b5b5b5b5b5b5b5fib5b5b5b5b5b5b5b5fipair大约D3和JavaScript,所以我被阻止了。

代码与示例中的代码相同,这就是一个尝试导入D3和D3-3DJ的方式。


<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://unpkg.com/d3-3d/build/d3-3d.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>

i try to use D3-3d to represent 3d graph.

i first tried to use some example to understand how it works but when a try to copy paste this one
https://bl.ocks.org/niekes/ff4d3c8497d8436d4d8fdb9f0121d12d
or this one
https://bl.ocks.org/niekes/5e1254ae778e2854f0079350a0376528
i get the error : Uncaught TypeError: d3._3d().scale(...).origin(...).rotateX(...).rotateY(...).primitiveType is not a function

i changed the way D3 and 3d are imported and try on chrome and Firefox and it keep being here.

the only example I manage to launch is this one
https://bl.ocks.org/niekes/1c15016ae5b5f11508f92852057136b5

i don't know a lot about D3 and JavaScript so I am blocked.

The code is the same than in the examples and this is how a tried to import D3 and d3-3djs.


<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://unpkg.com/d3-3d/build/d3-3d.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文