-
|
In the process of porting Saneef Ansari's Radar Chart to Observable Framework, I encountered an unexpected behavior where I get
The bit that perplexes me is that d3 works as expected elsewhere in the notebook, for example both of these return a function:
Also, the function used to generate the Radar Chart itself throws no errors. While adding an explicit import isn't enough to eliminate the error, it does work when I add D3 to the global properties like this: import * as d3 from "npm:d3";
globalThis.d3 = d3;... but I am curious why I am encountering this error and I imagine there's a better approach. Any insights? Here's a minimal https://github.com/aaronkyle/categorise/blob/master/src/d3-error-example.md And here's a (temporary) deployment showing the error: https://categorise.observablehq.cloud/categorise/d3-error-example Thanks in advance for your help and insights! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This occurred because I missed an explicit import of d3 in a downstream module. |
Beta Was this translation helpful? Give feedback.


This occurred because I missed an explicit import of d3 in a downstream module.