Published
Edited
Jun 8, 2021
Insert cell
# Trailing zeros
Insert cell
d3=require('d3')
Insert cell
d3.format("~%")(0.010) // "1%"
Insert cell
d3.format("~%")(0.011) // "1%"
Insert cell
d3.format(".0%")(0.015) // "1%"
Insert cell
d3.format(".2%")(0.015) // "1%"
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