🌍 Public
Viewing a saved revision (read-only)
53b1e2e5b3844aecb5bee7cad0806bb2
Shapes with SVG and CSS
This example demonstrates how to combine SVG and CSS to create basic shapes and style them with a solid background. The code selects an SVG element using `d3.select` and applies a red background color via the `style` method. The HTML sets up an SVG canvas with a fixed width and height, loaded with D3 v5, while the styling is defined in a separate CSS file. The visualization is minimal, focusing on the integration of D3 for DOM manipulation and SVG for graphical output.
AI-generated descriptionAn example showing the capabilities of VizHub.