line_chart
• Draft2🔗 Unlisted
This example shows yearly patient counts for multiple hospitals as interactive line charts. Users select hospitals via checkboxes, and the chart updates to display a colored line for each selected hospital, with year on the x-axis and number of patients on the y-axis. The visualization uses D3.js v7 with SVG rendering, employing `d3.scaleLinear`, `d3.axisBottom`, `d3.axisLeft`, and `d3.line` to build the chart. Data is loaded from a CSV file, and checkboxes are generated dynamically from the dataset's hospital names.
AI-generated descriptionMIT Licensed