About
Variable-width stacked bars where width is volume and height is share, so a segment's area is its real number; mosaic, labels, outline and heat variants. From Wingtics.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Marimekko Chart to your project and fits it to your theme.
Code
How Marimekko 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/marimekko-chart";
// Column width is each channel's total visits; segment height is the device share.
const DATA = [
{ label: "Search", Desktop: 18400, Mobile: 22100, Tablet: 2900 },
{ label: "Direct", Desktop: 12800, Mobile: 6300, Tablet: 1100 },
{ label: "Social", Desktop: 2600, Mobile: 11900, Tablet: 700 },
{ label: "Referral", Desktop: 5200, Mobile: 2400, Tablet: 500 },
{ label: "Email", Desktop: 3100, Mobile: 1800, Tablet: 200 },
];
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">
<h2 className="font-semibold text-xl tracking-tight">
Traffic by channel and device
</h2>
<p className="text-muted-foreground text-sm">
Width is volume, height is share, so area is the real number
</p>
</div>
<Component
data={DATA}
dataKeys={["Desktop", "Mobile", "Tablet"]}
height={340}
labelKey="label"
variant="labels"
/>
</div>
</div>
);
}






