Published
Edited
Sep 23, 2020
Insert cell
Insert cell
Insert cell
chart = d3
.create('svg')
.attr("viewBox", [-46, -25, width + 46, height + 25])
.attr("class", "chart")
.attr("cursor", "ew-resize")

// dark theme when fullscreen
.attr("color", isFullscreen ? "#FFF" : "#000")
.style("background-color", isFullscreen ? "#000" : "#FFF")

// additions
.call(behaviour)
.call(fullscreen, { x: width, y: height })

// static vertical axis
.call(g => g.append("g").call(yAxis))
.call(moveLabel, "Anomaly (°C)", -40, y(0) + 40, 270, 15)

.node()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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