Categorized Timeline Using Dates
This example uses the d3.layout.timeline plugin to render a categorized timeline of wars involving the United States during its first 100 years, based on data from Wikipedia. Each war is represented as a colored bar positioned along a date axis, with events grouped into five distinct swimlanes: Colonial, European, Internal, Latin America, and Native. The visualization encodes category membership through both lane placement and an ordinal color scale. War data is loaded from a CSV file, and the timeline layout automatically assigns each event to a lane, avoiding overlaps while respecting the fixed date extent from July 4, 1776, to December 31, 1876.