D3 Course 1: Bar Chart
✓ Published0🌍 Public
This example uses D3 v5 to visualize insertions and samples over time as a bar chart, a cursor ticker, and a blocking count curve. The main bar chart displays red and steel-blue rectangles representing sample and insert events, with linear scales mapping event start times and durations to x-positions and widths, while a band scale positions rows by assigned slot. Below, a stepped line generated with `d3.line` and `curveStep` shows cursor movement, and another line tracks blocking counts, both using `scaleLinear` and `axisLeft` with grid lines. Random data is generated programmatically in `data.js` and rendered to SVG.
AI-generated descriptionData Visualization with D3 course; Bar Chart
<h3>Creating a Bar Chart</h3> <table> <th align="left">Topics</th> <tr> <td> <ul> <li><b>Representing a data table</b></li> <li><b>Creating rectangles for each row</b></li> <li><b>Using linear and band scales</b></li> <li><b>The margin convention</b></li> <li><b>Adding Axes</b> <ul> <li><b>Formatting numbers</b></li> <li><b>Removing unnecessary lines</b></li> <li><b>Adding a Title</b></li> <li><b>Adding Axes labels</b></li> <li><b>Making tick grid lines</b></li> </ul> </li> </ul> </td> </tr> </table>MIT Licensed