Skip to main content
100%

Fork of Fork of Bar with round corners right - universal

✓ Published0🌍 Public
PPiotr Paszek
Last edited Apr 22, 2023
Created on Apr 22, 2023

This example draws a single bar with rounded corners on its right side using a computed SVG path. The code imports `select` from D3 v5 and builds the path string manually with conditional logic for positive and negative bar widths, adjusting corner radii accordingly. It renders the shape as an unfilled, black-stroked path inside an SVG appended to the page’s container. The example also demonstrates local ES6 module imports, though the imported message is not displayed.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes