Skip to main content
100%

D3 tutorials

✓ Published0🌍 Public
SSachin-jpg-lang
Last edited Mar 17, 2021
Created on Mar 17, 2021
Forked from HTML Starter

This example demonstrates a basic bar chart visualization. It shows a dataset of seven numeric values, each rendered as a fixed-width blue bar whose height corresponds to the value. The chart is built using D3.js methods to select the HTML body, append a `div` for each data point, and apply the CSS class `bar`. The bar heights are set inline using a JavaScript arrow function, and the initial styling is defined within a CSS style block. The code relies on `d3.select`, `d3.selectAll`, `.data`, `.enter`, `.append`, `.attr`, and `.style` to construct the visualization. The data is hardcoded as an array.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes