mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
"use client";
|
|
|
|
import { ResponsiveTreeMap } from "@nivo/treemap";
|
|
import { heatmapData as data } from "../MockData/MockData";
|
|
|
|
export default function page() {
|
|
return (
|
|
<div className="flex h-96 w-[500px] rounded-md">
|
|
<div className="flex flex-col flex-grow bg-neutral-800 rounded-lg">
|
|
<div className="flex justify-between px-2 py-2 pb-0">
|
|
<div className="flex items-center text-lg px-2">Heatmap</div>
|
|
</div>
|
|
<div className="flex-grow w-full">
|
|
<ResponsiveTreeMap
|
|
data={data}
|
|
identity="name"
|
|
value="loc"
|
|
valueFormat=".02s"
|
|
tile="binary"
|
|
// margin={{ top: 10, right: 10, bottom: 10, left: 10 }}
|
|
labelSkipSize={30}
|
|
labelTextColor="black"
|
|
parentLabelPosition="left"
|
|
parentLabelTextColor={{
|
|
from: "color",
|
|
modifiers: [["darker", 2]],
|
|
}}
|
|
colors={{ scheme: "red_yellow_green" }}
|
|
borderColor={{
|
|
from: "color",
|
|
modifiers: [["brighter", 0.1]],
|
|
}}
|
|
motionConfig="wobbly"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|