Reusable Line Chart v2
This responsive multiline chart visualizes up to four time series, with a legend that toggles the visibility of each series on click. It is built as a reusable, modular chart function, following Mike Bostock's "Towards Reusable Charts" pattern, and supports customization of chart size, margins, colors, and axis labels through a bind method. The chart renders with SVG and animation, and includes an interactive tooltip and a legend. The responsive design ensures the chart resizes with the screen, and the tooltip displays values on hover. The example uses D3 v3 and is licensed under MIT.
AI-generated descriptionAn implementation of a reusable responsive multiline chart. Based on the concept outlined in Mike Bostocks blog post Towards Reusable Charts.
Features:
- Reusable modular design
- Responsive design, chart size adjusts with screen size
- Customizable options
- Chart Size
- Margins
- Div Selector
- Chart Colors
- Axis labels
- Toggleable series (click on the legend to toggle series)
Previous version: Reusable Responsive Multiline Chart
forked from <a href='http://bl.ocks.org/asielen/'>asielen</a>'s block: <a href='http://bl.ocks.org/asielen/50a527004cb79facf219'>Reusable Line Chart v2</a>
forked from <a href='http://bl.ocks.org/DonRiddler/'>DonRiddler</a>'s block: <a href='http://bl.ocks.org/DonRiddler/f3bf131f7267566a8e79cb6f3ea9b484'>Reusable Line Chart v2</a>
forked from <a href='http://bl.ocks.org/DonRiddler/'>DonRiddler</a>'s block: <a href='http://bl.ocks.org/DonRiddler/75dc404c7ca7e9f4b63ab654cb3fbe3d'>Reusable Line Chart v2</a>