Download the code?

Hi,

I might be having sight problems but I couldn’t figure out how to download the (presented) code. This is the article: Candlestick Chart / D3 / Observable

There’s an option to “Download code” in the “…” menu but it appears to download the entire webpage, including the explanations and everything, and not simply the chart’s code.

Hope I’m missing something?

Thanks!

Download code doesn’t really download a webpage. Rather, it downloads your notebook together with the Observable runtime and other files required to run the code locally. You can also use the downloaded version to embed any components of the notebook that you want into a webpage, with depending on observablehq.com.

Hmm if I may submit feedback here, it should be possible to download only the chart too. I think that Observable’s features are awesome but if I’m just trying to get a chart working in my local environment this (as only option) is very inconvenient.

Depending on how you want the embed, you could call in the chart as an iFrame or you can select and export one cell only.

This may be different than what you’re asking, but in case it helps:

2 Likes