Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity8_Task3

Public visualization

Activity8_Task3

0 stars0🌍 Public
HHarshithaAmbilpur
Last edited Jul 11, 2023
Created on Jul 10, 2023
Forked from Hello VizHub

This example visualizes the cost of sales from 2000 to 2013 using a line chart, with the x-axis representing each year and the y-axis showing cost values. The line is rendered as a single SVG path with a lightgreen stroke, and both axis labels are styled in red with a large font. The code loads data from a local CSV file using `d3.csv`, maps the cost values to numbers, and builds the scales with `d3.scaleBand` and `d3.scaleLinear`. The SVG chart is created via `d3.select` and positioned with margins, while axes are added using `d3.axisBottom` and `d3.axisLeft`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed