Skip to main content
100%

"Percent complete" bar

✓ Published0🌍 Public
KKacieW
Last edited May 14, 2018
Created on May 14, 2018

This example visualizes progress as two rounded horizontal bars: the first shows the total value in white, and the second overlays the current value in blue, with numeric labels on each bar. It uses D3.js v2 with a linear scale to map the data values [900, 350] to pixel widths within a fixed 200-pixel SVG. The code selects SVG rect elements via `chart.selectAll("rect")` and appends text labels using `chart.selectAll("text")`, with styling defined in an external CSS file.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes