Published
Edited
Nov 21, 2021
Insert cell
Insert cell
data = [
{
name: '극한직업',
value: 16264984
},
{
name: '어벤져스:엔드게임',
value: 13977602
},
{
name: '겨울왕국2',
value: 13747792
},
{
name: '알라딘',
value: 12551371
},
{
name: '기생충',
value: 10083172
},
{
name: '엑시트',
value: 9414388
},
{
name: '스파이더맨:파 프롬 홈',
value: 8021290
},
];

Insert cell
width = 450;
Insert cell
height = 470;
Insert cell
x = d3.scaleLinear()
.domain([0, d3.max(data, (d) => { return d.value; })])
.range([0, width])
Insert cell
d3.max(data, (d) => { return d.value });
Insert cell
y = d3.scaleBand()
.domain([1,2,3,4,5])
.range([0, 100])
Insert cell
y.bandwidth()
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