Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Q2_AreaChart

Public visualization

Viewing a saved revision (read-only)

04cf490968f74c6db2f32a822e0d2411

Q2_AreaChart

0 stars1🌍 Public
Sshaiksajidali
Last edited Apr 19, 2024
Created on Apr 17, 2024

This example shows an interactive area chart comparing the annual revenue of Company A and Company B from 2000 to 2023. Two semi-transparent filled areas, mint green for Company A and light red for Company B, are rendered using D3.js v6 with SVG paths generated by the `d3.area()` API. The chart uses linear scales (`d3.scaleLinear`) for both the time-based x-axis and revenue-based y-axis, with axes added via `d3.axisBottom` and `d3.axisLeft`. The data is hardcoded from the `company.csv` file.

AI-generated description