Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Trend line with legend

Public visualization

Trend line with legend

0 stars2🌍 Public
SShane Carey
Last edited Apr 23, 2019
Created on Apr 19, 2019
Forked from Trend line

This example displays two time-series line charts of water level data from wells OW2DWL and OW2DSWL, with an orange and blue color legend. The lower chart supports brush-based selection, which filters the upper chart’s time range and overlays a dashed grey trend line computed via least-squares regression. The visualization uses D3 v5 APIs including `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line`, `nest`, `brushX`, and `axisBottom`, rendering to SVG.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed