<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
p{
  width: 100px;
}
d3.selectAll("p")
  .data([12, 14, 18, 20, 30, 42])
    .style("font-size", function(d) { return d + "px"; });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/d3/6.7.0/d3.min.js