Published
Edited
Oct 8, 2020
1 fork
2 stars
Insert cell
md`# Add image to SVG`
Insert cell
FileAttachment("learning-d3-js-part-4.svg")
Insert cell
Insert cell
{
const canvas = d3.select(DOM.svg(width, 200))
canvas.append("svg:image")
.attr("xlink:href", d => logo)
.style("stroke", "green" )
.style("stroke-width", 10)
.style("fill", "none")
return canvas.node();
}
Insert cell
d3 = require('d3')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more