MK Area Chart
✓ Published0🌍 Public
This example demonstrates a reusable area chart built with D3 v7, visualizing monthly sales data from a local CSV file across 2023 and 2024. The chart uses a blue gradient fill and a monotone curve, with axes, labels, and a title configured through a fluent API. Interactive tooltips appear on hover, displaying the month and sales value for each data point. The implementation leverages `d3.scaleTime`, `d3.scaleLinear`, `d3.area`, `d3.line`, and `d3.axisBottom`/`d3.axisLeft`, while the `main.js` script parses and sorts the CSV data before invoking the chart. The reusable component supports an optional update method for animated transitions.
AI-generated descriptionMIT Licensed