Bump to 0.9.4
- SessionTimelineChart: adds explicit gap between the tooltip's device label and its value via a custom formatter, instead of relying on justify-between's leftover-space spacing, which collapsed to zero in the narrow single-item tooltip Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BuWtppPBizG2NQRa31FCRa
This commit is contained in:
@@ -64,7 +64,29 @@ export function SessionTimelineChart({ timeline }: { timeline: TimelineRow[] })
|
||||
className="bp-readout text-xs"
|
||||
/>
|
||||
<YAxis domain={[0, 100]} tickLine={false} axisLine={false} width={32} className="bp-readout text-xs" />
|
||||
<ChartTooltip content={<ChartTooltipContent />} />
|
||||
<ChartTooltip
|
||||
content={
|
||||
<ChartTooltipContent
|
||||
formatter={(value, name) => {
|
||||
const itemConfig = config[name as string];
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="h-2.5 w-2.5 shrink-0 rounded-[2px]"
|
||||
style={{ backgroundColor: itemConfig?.color }}
|
||||
/>
|
||||
<div className="flex flex-1 items-center justify-between gap-4 leading-none">
|
||||
<span className="text-muted-foreground">{itemConfig?.label ?? name}</span>
|
||||
<span className="bp-readout font-medium text-foreground">
|
||||
{typeof value === "number" ? value.toLocaleString() : String(value)}
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{series.map(([sessionDeviceId]) => (
|
||||
<Area
|
||||
key={sessionDeviceId}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sexy",
|
||||
"version": "0.9.3",
|
||||
"version": "0.9.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user