🏠 back to Observable

Problem using `import` with `with`


#1

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


#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?


#3

…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!


#4

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


#5

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