Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Working with time

Public visualization

Viewing a saved revision (read-only)

460b895a38d847bea9f696b86fea854b

Working with time

0 stars1🌍 Public
SSamirAhma
Last edited Nov 26, 2022
Created on Nov 26, 2022

This example visualizes temperature readings over time from a dataset of weekly San Francisco weather. The SVG chart plots each data point as a circle, with a time-scaled x-axis and a linear y-axis for temperature. Built with React and D3 v5, the code uses `scaleTime`, `scaleLinear`, and `extent` to map data to coordinates, while the custom `AxisBottom`, `AxisLeft`, and `Marks` components render the axes and circles. Tooltips display the day of each timestamp using `timeFormat`.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.