Skip to main content
Public

Share visualization

Loading preview…

ICE 7 - line graph

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

ICE 7 - line graph

1
IIsabella Jaya Rani C
Last edited Mar 13, 2023
Created on Mar 13, 2023
Forked from HTML Starter

This line chart visualizes the weekly sales of Walmart over a 52-week period. The y-axis represents sales figures, ranging from 0 to 4,000,000, while the x-axis tracks the week number. Using D3.js (v5), the code loads CSV data from a GitHub gist and renders an SVG line graph with a slateblue stroke. It employs d3.scaleLinear for both axes, d3.axisLeft and d3.axisBottom for ticks, and d3.line to generate the path. The chart includes labeled axes, gridlines, and a title, with margins positioning the plot centrally.

AI-generated description

Creating a line Chart with d3.js.

Comments

Sign in to join the discussion.

MIT Licensed