Smiley Face Part II
✓ Published0🌍 Public
This example shows a red line segment positioned at the center of the viewport, with an additional red line appended to an SVG via D3’s selection and `attr` methods. The React component renders an SVG with a `line` element, while a separate D3 `select` chain creates a second line with fixed coordinates. The code uses React 16.9, D3 v5’s `select`, and inline SVG attributes, with window dimensions determining the centering transform.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
<line stroke="red" x0=10 y0=10, x1=500 y1=100></line>
MIT Licensed