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
tom
July 23, 2018, 6:24pm
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?
1 Like
…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.
2 Likes
jrus
August 3, 2018, 12:08am
5
Thanks! I ran into that one a few times but never reported it.
Utopiah
September 18, 2018, 12:16pm
6
I’m not sure that’s fully resolved. Namely I
made a new notebook with some markdown
made a new notebook with a chart
import the newly made chart in the first notebook, without any error
tried to use chart imported from the second notebook to display it in the first resulting in an unresolved symbol
After modifying a bit of everything reverting to the initial import {chart} from “@utopiah /my-visualisation” ended up working as expected.