Skip to main content
Public

Share visualization

Loading preview…

Creating a 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

Creating a Line Chart

0
GGregS1290
Last edited Oct 31, 2021
Created on Oct 31, 2021

This example shows a line chart of weekly temperature and time data from a CSV file hosted on GitHub. The chart uses a natural curve to connect temperature measurements across timestamps, with a time-scaled x-axis and linear y-axis. Built with React, D3 v5, and SVG, the code uses `scaleTime`, `scaleLinear`, `extent`, and `line().curve(curveNatural)` to render the visualization. Custom React components handle the axes and marks, while the `csv` function loads the dataset with temperature and timestamp parsing.

AI-generated description

A scatter plot of The Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed