About
Many time series folded into horizon bands, so each lane needs a fraction of a line chart's height; bands and mirror variants. From Wingtics, theme tokens only.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Horizon Chart to your project and fits it to your theme.
Code
How Horizon Chart is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import Component from "@/components/ui/horizon-chart";
const SERIES = ["Landing", "Docs", "Pricing", "Blog", "Changelog"];
// Deterministic, seasonal traffic so the cover is the same on every render.
const DATA = Array.from({ length: 42 }, (_, day) => {
const row: Record<string, string | number> = {
date: `Day ${day + 1}`,
};
SERIES.forEach((key, index) => {
const wave = Math.sin((day + index * 5) / 4.2) * 0.55;
const weekly = day % 7 >= 5 ? -0.35 : 0.15;
const trend = (day / 42) * (index % 2 === 0 ? 0.8 : -0.4);
row[key] = Math.round(1200 * (1.4 + wave + weekly + trend));
});
return row;
});
export default function DemoOne() {
return (
<div className="flex min-h-[560px] w-full items-center justify-center bg-background p-6">
<div className="w-full max-w-4xl rounded-3xl border bg-card p-8 text-card-foreground shadow-sm">
<div className="mb-6 flex items-baseline justify-between">
<div>
<h2 className="font-semibold text-xl tracking-tight">
Visitors by section
</h2>
<p className="text-muted-foreground text-sm">
Last 6 weeks, five lanes folded into three bands
</p>
</div>
<span className="text-muted-foreground text-xs tabular-nums">
42 days
</span>
</div>
<Component
bands={3}
data={DATA}
dataKeys={SERIES}
labelKey="date"
laneHeight={48}
/>
</div>
</div>
);
}






