Public
Edited
Feb 11
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
chart = makeChart(data)
Insert cell
Insert cell
viewof zoomQuant = Inputs.range([1,32], {label: "Zoom", step: 0.1})
Insert cell
chart.zoomTo(coord.x, coord.y, 5)
Insert cell
Insert cell
Inputs.table(data)
Insert cell
x = d3.scaleLinear()
.domain([-100, 100])
.range([0, width])
Insert cell
xAxis = (g, x) => g
.attr("transform", `translate(0,${height})`)
.call(d3.axisTop(x).ticks(12))
.call(g => g.select(".domain").attr("display", "none"))
Insert cell
y = d3.scaleLinear()
.domain([-70, 70])
.range([height, 0])
Insert cell
yAxis = (g, y) => g
.call(d3.axisRight(y).ticks(12))
.call(g => g.select(".domain").attr("display", "none"))
Insert cell
z = d3.scaleOrdinal()
.domain(d3.range(d3.extent(data, d => d.cluster))) // posible color de acuerdo con el cluster
.range(d3.schemeCategory10)
Insert cell
height = 600
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