🏠 back to Observable

Problem using `import` with `with`


Hello! I’m trying to reuse an existing visualization (one of @mbostock’s examples) but running into some trouble using the with clause of the import statement. Can anyone see what I’m doing wrong?

Here’s a minimal reproduction: a notebook that attempts to import chart from the notebook, as suggested here, substituting data with ourdata: https://beta.observablehq.com/@yurivish/test/2


Hi - mind giving a bit more detail about what’s going wrong? Loading that notebook works, and it looks like the data is properly replaced.

Are you seeing an error message? Wrong behavior? Something else?


…Huh, it works now. It didn’t work before — earlier it was saying the binding to “chart” could not be properly resolved. It does seem to work now – thanks!


We just fixed a bug where import-with wouldn’t work in some cases on a freshly-created notebook.


Thanks! I ran into that one a few times but never reported it.