Skip to main content
100%

Fork of Trend line with legend

✓ Published0🌍 Public
Nnicolekevans
Last edited Nov 18, 2022
Created on Nov 18, 2022

This example shows two synchronized line charts of water level measurements over time, with a brushable overview chart below that filters the main chart’s visible date range. The main chart displays orange and blue series for two wells, alongside a dashed gray regression trendline computed via least squares and a text label with its equation. A color legend identifies the series. The charts use D3 v5’s `scaleTime`, `scaleLinear`, `line`, `brushX`, and `nest` to render SVG paths, while brushing calls `setBrushCoords` to update the trendline and domain.

AI-generated description
MIT Licensed

Similar vizzes