Detail on demand A small panel becomes a big one for a moment. The expanded view must keep the same time range and the same series, or the reader compares two different things and does not notice. npx shadcn@latest add button toggle-group npm i lucide-react Tokens this needs: --background, --card, --card-foreground, --muted-foreground, --border, --chart-1 ──────────────────────────────────────────────────────────────────────── // DetailOnDemand.tsx ──────────────────────────────────────────────────────────────────────── import { useEffect, useRef } from "react"; import { Maximize2, X } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; export type Form = "full-page" | "side-panel" | "inline"; export type Panel = { id: string; title: string; unit: string; values: number[] }; /** The one query every panel shares. Both sizes render from it, so * expanding cannot change the interval or the range. */ export type Range = { label: string; interval: string }; const FORM_LABEL: Record