Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Angular 2+ 项目中使用 d3 图表
以下链接
使用以下行时出现错误
DOM.svg(width, height)
在角度项目中导入“observablehq/stdlib”并使用相同的步骤是什么。
如果我直接通过选择器,它就可以工作。但是,如果我得到导入库的步骤,那就太好了
d3.select("#id") //works d3.select(DOM.svg(width, height)) // gives error
lib的git repo
提前致谢
<script src="https://unpkg.com/@observablehq/stdlib@3"></script> <script> const {DOM} = new observablehq.Library; console.log(DOM.uid); </script>