Skip to main content
Public

Share visualization

Loading preview…

simple Line Chart_drb

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

simple Line Chart_drb

1
DDonald Bagwell
Last edited Apr 14, 2024
Created on Apr 13, 2024

This example renders a simple line chart of the Keeling Curve, plotting atmospheric CO2 concentration over time. The visualization uses a gray inner rectangle as the plotting area and displays axes with labeled year and CO2 values. The code leverages D3’s `scaleTime`, `scaleLinear`, and `line` generators to map data points and draw the path, while custom `xAxis`, `yAxis`, and label utilities from `@drbagwell/axis-labels` handle the chart furniture. The line is drawn in black with no fill, using the CO2 and date fields from the imported dataset.

AI-generated description

Creating circles with D3.

Challenge

  • Fork this example
  • Modify it
  • Maybe make it Halloween themed
  • Maybe make it Christmas themed
  • Be creative

Comments

Sign in to join the discussion.

MIT Licensed