SPB Git forge
15commits 1branches 0releases
29.7 MBsize
maindefault branch
10 days agolast push
TypeScript 36.3% Python 31.8% Go 18% JavaScript 9.8% Shell 1.9% SQL 1.4% CSS 0.5%
1011 B · 16 lines tsx
Raw Blame History
1'use client';23import { SeriesChart } from '@/components/charts/SeriesChart';4import type { SimpleSeries } from '@/lib/types';56/** 24 h pressure line for a scope with its 7-day baseline median / p90 as dashed references. */7export function ScopePressureChart({ series, baseline, height = 220 }: { series: SimpleSeries; baseline?: { median: number; p90: number }; height?: number }) {8  const pts = series.points.map((p) => ({ ts: p.ts, value: p.pressure }));9  const lines = [{ name: 'Pressure', color: '#E6EDF3', points: pts, area: true, width: 1.5 }];10  if (baseline && pts.length) {11    lines.push({ name: '7d median', color: '#5B6875', points: pts.map((p) => ({ ts: p.ts, value: baseline.median })), area: false, width: 1, dashed: true } as (typeof lines)[number]);12    lines.push({ name: '7d p90', color: '#8B98A5', points: pts.map((p) => ({ ts: p.ts, value: baseline.p90 })), area: false, width: 1, dashed: true } as (typeof lines)[number]);13  }14  return <SeriesChart lines={lines} height={height} />;15}16