Public
Edited
Mar 19, 2024
1 fork
Insert cell
Insert cell
Insert cell
<svg width="300" height=300 style="background-color:red">
</svg>
Insert cell
<svg width=300 height=300 style="background-color:aqua;border-radius:20px;">
<circle transform="translate(150,150)" fill="red" opacity="0.5" stroke="blue" r="100"></circle>
</svg>
Insert cell
<svg width=300 height=300 style="overflow:visible;background-color:aqua;border-radius:20px;">

<line transform="rotate(56)" x1=0 y1=0 x2=200 y2=0 stroke="red" stroke-width="5">
</line>


</svg>
Insert cell
<svg width=300 height=300 style="background-color:aqua;border-radius:20px;">
<text transform="translate(150,150)" stroke="red">Test Test Tes</text>
</svg>
Insert cell
<svg width=300 height=300 style="background-color:aqua;border-radius:20px;overflow:visible">
<path
stroke="black"
fill="yellow"
d="M 0,0 L 150,150 L 150,300 L0,300 Z"
></path>
</svg>
Insert cell
<svg width=300 height=300 style="background-color:aqua;border-radius:20px;">
<g transform="translate(0,-100)">
<circle r=40 transform="translate(160,150)" fill='orange' stroke='blue' > </circle>
<circle r=20 transform="translate(260,150)" fill='orange' stroke='blue' > </circle>
</g>
</svg>
Insert cell
Insert cell
Insert cell
min = d3.min(dataTemp, function (d) {
return d.temp;
})
Insert cell
max = d3.max(dataTemp, (d) => d.temp)
Insert cell
Insert cell
Insert cell
valueScale = d3.scaleLinear().domain([min, max]).range([0, 200])
Insert cell
valueScale.ticks(7)
Insert cell
Insert cell
colorScale = d3.scaleLinear().domain([0, max]).range(["orange", "darkred"])
Insert cell
colorScale(0)
Insert cell
Insert cell
d3
.arc()
.innerRadius(0)
.outerRadius(100)
.startAngle(0)
.endAngle(Math.PI / 2)()
Insert cell
arc = d3
.arc()
.innerRadius((d) => d.innerRadius)
.outerRadius((d) => d.outerRadius)
.startAngle((d) => d.startAngle)
.endAngle((d) => d.endAngle)
Insert cell
myObj = ({
innerRadius: 100,
outerRadius: 100,
startAngle: Math.PI / 2,
endAngle: Math.PI
})
Insert cell
arcResult = arc(myObj)
Insert cell
<svg height=300>
<path stroke='black'
fill='none'
transform='translate(150,150)'
d='${arcResult}'>
</path>
</svg>
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