import type { AxisIdToScales } from '../../context/XYChartScales.context.js'; import type { RectSeriesWithDatapoints } from '../../types/xy-chart-internals.js'; interface RectLabelOverlayProps { axisIdToScales: AxisIdToScales; series: RectSeriesWithDatapoints; opacity?: number; } /** * Renders the HTML labels for a single rect series. Each datapoint's label is * placed inside the rect and clipped to the rect's bounds — the portion that * would overflow is hidden. This is the key difference from `BarLabelOverlay`, * whose labels are allowed to spill outside the bar toward the chart edge. * * The canvas paints rects in data order, so any rect later in the data appears * on top of earlier ones where they overlap. This overlay mirrors that by * iterating in reverse and, for each rect, clipping the label to the leftmost * horizontal segment that is not covered by an already-drawn (top-most) rect. * If a rect's leading edge is itself covered, or the remaining usable segment * cannot fit at least a couple of real characters, the label is dropped — * this keeps flame graphs readable when siblings share depth and time range. * * Rendered as a sibling of the `` element (not inside `RectDisplay`) * because HTML children of `` are fallback content, not visible DOM. * See `RectLabelLayout.tsx` for the chart-level wrapper that iterates over * labeled rect series and mounts this component. */ export declare function RectLabelOverlay({ axisIdToScales, series, opacity, }: Readonly): import("react").JSX.Element | null; export declare namespace RectLabelOverlay { var displayName: string; } export {}; //# sourceMappingURL=RectLabelOverlay.d.ts.map