<svg width="500" height="300"></svg>
const svg = d3.select("svg");

const data = [25, 30, 45, 60, 20, 65, 75];

svg
  .selectAll("text")
  .data(data)
  .enter()
  .append("text")
  .text((d) => d)
  .attr("x", (d, i) => i * 70)
  .attr("y", 30)
  .attr("font-size", "20px")
  .attr("text-anchor", "middle");

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

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