Skip to main content
Public

Share visualization

Loading preview…

Assignment #7 Multiple Line Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Assignment #7 Multiple Line Chart

2
Mmhzahdeh@dons.usfca.edu
Last edited Mar 10, 2025
Created on Mar 10, 2025

This example visualizes five automobile performance attributes—economy in miles per gallon, cylinder count, horsepower, weight, and 0-to-60 mph time—as a set of colored polylines plotted against car models from a CSV file. The chart reveals each model’s relative values across these disparate scales on a single axis. The code uses D3 v7 to load the CSV, define point and linear scales, draw the SVG paths with `d3.line`, and render axes with `d3.axisBottom` and `d3.axisLeft`. Each attribute uses a fixed stroke color, and a legend is constructed via `d3.scaleOrdinal`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed