From 6cd4a3aae58c7bd3e9acd2c0fd52357110b3a1eb Mon Sep 17 00:00:00 2001 From: James Xu Date: Fri, 7 Aug 2026 19:36:18 -0700 Subject: [PATCH] Export bar-geometry constants from the Chart barrel Consumers skinning other renderers to match Origin (Lighthouse's ECharts bridge) currently mirror BAR_GROUP_GAP/BAR_ITEM_GAP as literals that drift silently if the geometry is retuned. The package exports map blocks deep imports, so the barrel is the only consumable path. Co-Authored-By: Claude Fable 5 --- src/components/Chart/index.ts | 2 ++ src/components/Chart/types.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/Chart/index.ts b/src/components/Chart/index.ts index c22517f..8e63028 100644 --- a/src/components/Chart/index.ts +++ b/src/components/Chart/index.ts @@ -48,3 +48,5 @@ export type { FunnelChartProps, FunnelStage } from './FunnelChart'; export { Waterfall } from './WaterfallChart'; export type { WaterfallChartProps, WaterfallSegment } from './WaterfallChart'; + +export { BAR_GROUP_GAP, BAR_ITEM_GAP } from './types'; diff --git a/src/components/Chart/types.ts b/src/components/Chart/types.ts index 5e7a5f1..68be75e 100644 --- a/src/components/Chart/types.ts +++ b/src/components/Chart/types.ts @@ -102,7 +102,9 @@ export function resolveSeries( return []; } +/** Fraction of each category slot left as gap; bars fill the remainder. */ export const BAR_GROUP_GAP = 0.12; +/** Horizontal px between side-by-side series bars within one category group. */ export const BAR_ITEM_GAP = 1; /** Minimum vertical spacing (px) between tick labels at 11px font. */