Public
Edited
Apr 30
5 forks
Insert cell
Insert cell
data = [10,50,42];
Insert cell
margin = 10;
Insert cell
Insert cell
<div>
<svg width="500" height="500">
<line x1="${margin}" y1="${margin}" x2="${margin}" y2= "${500 - margin}" stroke="blue" />
<line x1="${margin}" y1="${500 - margin}" x2="${500 - margin}" y2= "${500 - margin}" stroke="blue" />
<!-- This are just two lines to denote the boundary of the bar chart.
You should add rectangles below to draw the bars.
Calcuate the hight and length of the rectangles yourself. -->
</svg>
</div>
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