Activity-8.3
✓ Published0🌍 Public
This example visualizes the cost of sales from 2000 to 2013 as a line chart, with the x-axis representing years and the y-axis showing cost values. The chart uses a band scale for the years and a linear scale for costs, rendered in an SVG. Data is loaded from a local CSV file via `d3.csv`. The code builds the visualization using D3 v7, including `d3.scaleBand`, `d3.scaleLinear`, `d3.line`, and `d3.axisBottom`/`d3.axisLeft` for axes. The line is stroked in light green, and red axis labels are styled with large font sizes.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed