@acronis-platform/ui-react 0.58.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/components/ui/app-shell/app-shell.js.map +1 -1
- package/dist/components/ui/area-chart/area-chart.js +210 -119
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +26 -23
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +595 -149
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js +17 -15
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/carousel-dialog/carousel-dialog.js +87 -0
- package/dist/components/ui/carousel-dialog/carousel-dialog.js.map +1 -0
- package/dist/components/ui/category-bar/category-bar.js +147 -0
- package/dist/components/ui/category-bar/category-bar.js.map +1 -0
- package/dist/components/ui/chart/chart-format.js +170 -0
- package/dist/components/ui/chart/chart-format.js.map +1 -0
- package/dist/components/ui/chart/chart.js +204 -150
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/composed-chart/composed-chart.js +423 -98
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
- package/dist/components/ui/confidence-cone/confidence-cone.js +306 -172
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +29 -29
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js +57 -0
- package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js.map +1 -0
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js +1 -1
- package/dist/components/ui/dialog-footer-default/dialog-footer-default.js.map +1 -1
- package/dist/components/ui/dialog-welcome/dialog-welcome.js +272 -0
- package/dist/components/ui/dialog-welcome/dialog-welcome.js.map +1 -0
- package/dist/components/ui/funnel-chart/funnel-chart.js +245 -51
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/ui/histogram/histogram.js +96 -64
- package/dist/components/ui/histogram/histogram.js.map +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +230 -159
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/metric/metric.js +88 -70
- package/dist/components/ui/metric/metric.js.map +1 -1
- package/dist/components/ui/pie-chart/pie-chart.js +234 -80
- package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +210 -57
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +358 -50
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
- package/dist/components/ui/sankey-chart/sankey-chart.js +199 -0
- package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -0
- package/dist/components/ui/scatter-chart/scatter-chart.js +86 -50
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/components/ui/timeline/timeline.js +206 -142
- package/dist/components/ui/timeline/timeline.js.map +1 -1
- package/dist/components/ui/toolbar/toolbar.js +82 -92
- package/dist/components/ui/toolbar/toolbar.js.map +1 -1
- package/dist/components/ui/treemap/treemap.js +183 -59
- package/dist/components/ui/treemap/treemap.js.map +1 -1
- package/dist/index.js +481 -439
- package/dist/index.js.map +1 -1
- package/dist/lib/breakpoints.js +9 -6
- package/dist/lib/breakpoints.js.map +1 -1
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +25 -0
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +36 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1205 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
- package/dist/react.js +481 -439
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/area-chart/area-chart.d.ts +52 -17
- package/dist/src/components/ui/area-chart/index.d.ts +1 -1
- package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +152 -29
- package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
- package/dist/src/components/ui/carousel-dialog/carousel-dialog.d.ts +28 -0
- package/dist/src/components/ui/carousel-dialog/index.d.ts +1 -0
- package/dist/src/components/ui/category-bar/category-bar.d.ts +51 -0
- package/dist/src/components/ui/category-bar/index.d.ts +1 -0
- package/dist/src/components/ui/chart/__tests__/chart-format.test.d.ts +1 -0
- package/dist/src/components/ui/chart/__tests__/chart-layout.d.ts +63 -0
- package/dist/src/components/ui/chart/__tests__/chart-layout.test.d.ts +1 -0
- package/dist/src/components/ui/chart/chart-format.d.ts +526 -0
- package/dist/src/components/ui/chart/chart.d.ts +11 -3
- package/dist/src/components/ui/chart/index.d.ts +3 -1
- package/dist/src/components/ui/composed-chart/composed-chart.d.ts +154 -20
- package/dist/src/components/ui/composed-chart/index.d.ts +1 -1
- package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +138 -37
- package/dist/src/components/ui/confidence-cone/index.d.ts +1 -1
- package/dist/src/components/ui/dialog-footer-carousel/dialog-footer-carousel.d.ts +9 -0
- package/dist/src/components/ui/dialog-footer-carousel/index.d.ts +1 -0
- package/dist/src/components/ui/dialog-welcome/dialog-welcome.d.ts +54 -0
- package/dist/src/components/ui/dialog-welcome/dialog-welcome.docs.d.ts +55 -0
- package/dist/src/components/ui/dialog-welcome/index.d.ts +1 -0
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +201 -3
- package/dist/src/components/ui/funnel-chart/index.d.ts +1 -1
- package/dist/src/components/ui/histogram/histogram.d.ts +2 -17
- package/dist/src/components/ui/line-chart/index.d.ts +1 -1
- package/dist/src/components/ui/line-chart/line-chart.d.ts +50 -17
- package/dist/src/components/ui/pie-chart/index.d.ts +1 -1
- package/dist/src/components/ui/pie-chart/pie-chart.d.ts +145 -4
- package/dist/src/components/ui/radar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +219 -6
- package/dist/src/components/ui/radial-bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +215 -9
- package/dist/src/components/ui/sankey-chart/index.d.ts +2 -0
- package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +69 -0
- package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +2 -17
- package/dist/src/components/ui/timeline/index.d.ts +1 -1
- package/dist/src/components/ui/timeline/timeline.d.ts +79 -20
- package/dist/src/components/ui/treemap/index.d.ts +1 -1
- package/dist/src/components/ui/treemap/treemap.d.ts +68 -8
- package/dist/src/index.d.ts +5 -1
- package/dist/ui-react.css +1 -1
- package/package.json +5 -4
- package/dist/components/ui/search-global/search-global.js +0 -60
- package/dist/components/ui/search-global/search-global.js.map +0 -1
- package/dist/src/components/ui/search-global/index.d.ts +0 -1
- package/dist/src/components/ui/search-global/search-global.d.ts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composed-chart.js","sources":["../../../../src/components/ui/composed-chart/composed-chart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n Area,\n Bar,\n CartesianGrid,\n ComposedChart as RechartsComposedChart,\n Line,\n XAxis,\n YAxis,\n} from 'recharts';\n\nimport { cn } from '@/lib/utils';\nimport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from '../chart';\n\n// A typed recharts composition over the shared `Chart` primitives. A composed\n// chart's defining trait is that each series picks its own render type\n// (bar / line / area) over one shared category axis — so, like ScatterChart,\n// there's no single visual \"mode\" to model as a CVA variant (the skill's\n// \"per-series type\"). The variation lives in the `series[].type` list instead.\nexport type ComposedSeriesType = 'bar' | 'line' | 'area';\n\nexport interface ComposedSeries {\n /** Column key to plot — must match a `config` entry; drives its `--color-<key>` paint. */\n key: string;\n /** How this series renders. */\n type: ComposedSeriesType;\n}\n\nexport interface ComposedChartProps\n extends Omit<React.ComponentProps<'div'>, 'children'> {\n /** Row-per-category data. Each object holds `xKey` + one numeric field per series. */\n data: ReadonlyArray<Record<string, string | number>>;\n /**\n * Per-series map of `label` / `color`, keyed by `series[].key` (imported from\n * the shared `Chart` primitives). Turned into `--color-<key>` custom\n * properties. Colors are caller-supplied — reference an existing semantic\n * `--ui-*` token; there is no chart palette tier yet.\n */\n config: ChartConfig;\n /** Series to plot, each `{ key, type }` — one bar/line/area per entry. Each key must exist in `config` and every data row. */\n series: ComposedSeries[];\n /** Category axis key (the shared dimension across rows, e.g. `\"month\"`). */\n xKey: string;\n /** Title rendered beneath the horizontal (X) axis. */\n xAxisLabel?: string;\n /** Title rendered beside the vertical (Y) axis (rotated). */\n yAxisLabel?: string;\n /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */\n yUnit?: string;\n /** Interpolation for the line and area series. */\n curve?: 'linear' | 'monotone' | 'step';\n /** Corner radius on the growing end of bar series. */\n barRadius?: number;\n /** Flat-fill opacity for area series. */\n fillOpacity?: number;\n showGrid?: boolean;\n showTooltip?: boolean;\n showLegend?: boolean;\n /**\n * Replace the default tooltip. Pass a configured `ChartTooltipContent`\n * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /\n * `indicator` — to customize formatting, per-series rows, or extra fields\n * without composing recharts yourself. Ignored when `showTooltip` is false.\n */\n tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];\n}\n\nconst ComposedChart = React.forwardRef<HTMLDivElement, ComposedChartProps>(\n (\n {\n className,\n config,\n data,\n series,\n xKey,\n xAxisLabel,\n yAxisLabel,\n yUnit,\n curve = 'monotone',\n barRadius = 4,\n fillOpacity = 0.3,\n showGrid = true,\n showTooltip = true,\n showLegend = true,\n tooltipContent,\n ...props\n },\n ref\n ) => {\n // Axis titles: the X title sits below the ticks; the Y title is rotated in\n // the left gutter. Passed to recharts' native `label` (themed via the\n // `.recharts-label` fill selector on the container).\n const xAxisTitle = xAxisLabel\n ? { value: xAxisLabel, position: 'insideBottom' as const, offset: 0 }\n : undefined;\n const yAxisTitle = yAxisLabel\n ? {\n value: yAxisLabel,\n angle: -90,\n position: 'insideLeft' as const,\n style: { textAnchor: 'middle' as const },\n }\n : undefined;\n\n return (\n <div ref={ref} className={cn(className)} {...props}>\n <ChartContainer\n config={config}\n className=\"size-full [&_.recharts-label]:fill-foreground\"\n >\n <RechartsComposedChart data={data as readonly unknown[]}>\n {showGrid && <CartesianGrid vertical={false} />}\n <XAxis\n dataKey={xKey}\n type=\"category\"\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n height={xAxisLabel ? 48 : undefined}\n label={xAxisTitle}\n />\n <YAxis\n type=\"number\"\n tickLine={false}\n axisLine={false}\n unit={yUnit}\n width={yAxisLabel ? 72 : undefined}\n label={yAxisTitle}\n />\n {showTooltip && (\n <ChartTooltip content={tooltipContent ?? <ChartTooltipContent />} />\n )}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n {/* Rendered in the caller's `series` order — recharts paints children\n back-to-front, so later entries sit on top. Order them so thin\n marks (a line) come after the areas/bars they should overlay. */}\n {series.map((s) => {\n const color = `var(--color-${s.key})`;\n if (s.type === 'bar') {\n return (\n <Bar\n key={s.key}\n dataKey={s.key}\n fill={color}\n radius={\n barRadius > 0\n ? [barRadius, barRadius, 0, 0]\n : undefined\n }\n isAnimationActive={false}\n />\n );\n }\n if (s.type === 'area') {\n return (\n <Area\n key={s.key}\n type={curve}\n dataKey={s.key}\n stroke={color}\n fill={color}\n fillOpacity={fillOpacity}\n isAnimationActive={false}\n />\n );\n }\n return (\n <Line\n key={s.key}\n type={curve}\n dataKey={s.key}\n stroke={color}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n );\n })}\n </RechartsComposedChart>\n </ChartContainer>\n </div>\n );\n }\n);\nComposedChart.displayName = 'ComposedChart';\n\nexport { ComposedChart };\n"],"names":["ComposedChart","React","className","config","data","series","xKey","xAxisLabel","yAxisLabel","yUnit","curve","barRadius","fillOpacity","showGrid","showTooltip","showLegend","tooltipContent","props","ref","xAxisTitle","yAxisTitle","jsx","cn","ChartContainer","jsxs","RechartsComposedChart","CartesianGrid","XAxis","YAxis","ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","s","color","Bar","Area","Line"],"mappings":";;;;;AA4EA,MAAMA,IAAgBC,EAAM;AAAA,EAC1B,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,WAAAC,IAAY;AAAA,IACZ,aAAAC,IAAc;AAAA,IACd,UAAAC,IAAW;AAAA,IACX,aAAAC,IAAc;AAAA,IACd,YAAAC,IAAa;AAAA,IACb,gBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AAIH,UAAMC,IAAaZ,IACf,EAAE,OAAOA,GAAY,UAAU,gBAAyB,QAAQ,EAAA,IAChE,QACEa,IAAaZ,IACf;AAAA,MACE,OAAOA;AAAA,MACP,OAA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AE;AAAA,YAAA,IAYTA,EAAE,SAAS,SAEX,gBAAAZ;AAAA,cAACe;AAAA,cAAA;AAAA,gBAEC,MAAM1B;AAAA,gBACN,SAASuB,EAAE;AAAA,gBACX,QAAQC;AAAA,gBACR,MAAMA;AAAA,gBACN,aAAAtB;AAAA,gBACA,mBAAmB;AAAA,cAAA;AAAA,cANdqB,EAAE;AAAA,YAAA,IAWX,gBAAAZ;AAAA,cAACgB;AAAA,cAAA;AAAA,gBAEC,MAAM3B;AAAA,gBACN,SAASuB,EAAE;AAAA,gBACX,QAAQC;AAAA,gBACR,aAAa;AAAA,gBACb,KAAK;AAAA,gBACL,mBAAmB;AAAA,cAAA;AAAA,cANdD,EAAE;AAAA,YAAA;AAAA,UASb,CAAC;AAAA,QAAA,EAAA,CACH;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AACAjC,EAAc,cAAc;"}
|
|
1
|
+
{"version":3,"file":"composed-chart.js","sources":["../../../../src/components/ui/composed-chart/composed-chart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n Area,\n Bar,\n Brush,\n CartesianGrid,\n ComposedChart as RechartsComposedChart,\n LabelList,\n Line,\n ReferenceArea,\n ReferenceLine,\n XAxis,\n YAxis,\n} from 'recharts';\n\nimport { cn } from '@/lib/utils';\nimport {\n CHART_LABEL_FONT_SIZE,\n CHART_LABEL_MARGIN,\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n resolveAnimation,\n resolveAxisDomain,\n resolveBrushProps,\n resolveCartesianLabelPosition,\n resolveCategoryRange,\n resolveChartReferenceValue,\n resolveLabelFillClass,\n resolveReferenceLineProps,\n resolveRotatedTickAnchor,\n resolveXAxisHeight,\n resolveXAxisTitle,\n resolveYAxisTitle,\n toLabelFormatter,\n type ChartConfig,\n type ChartLegendContentProps,\n type CartesianChartProps,\n type ChartAnimationProps,\n type ChartBrushProps,\n type ChartCategoryRange,\n type ChartDataLabelProps,\n type ChartReferenceLine,\n type CartesianLabelPosition,\n type ChartYAxisTarget,\n type SecondaryYAxisProps,\n} from '../chart';\n\n// A typed recharts composition over the shared `Chart` primitives. A composed\n// chart's defining trait is that each series picks its own render type\n// (bar / line / area) over one shared category axis, so the mark mix is not a\n// variant — it lives in the `series[].type` list. `orientation` is: it is the\n// same one-axis choice `BarChart` models (which way the marks grow), and it\n// re-roles both axes. The class stays empty because the recharts SVG — not CSS —\n// draws the series; CVA is kept so the variant set is a first-class,\n// spec-conformant part of the API (matched against ui-spec's api.yaml enums) and\n// exposed via `VariantProps`. The resolved value is mirrored onto\n// `data-orientation` for styling hooks and tests.\nconst composedChartVariants = cva('', {\n variants: {\n orientation: {\n vertical: '',\n horizontal: '',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nexport type ComposedSeriesType = 'bar' | 'line' | 'area';\n\n/** Interpolation for a line or area series. */\nexport type ComposedCurveType = 'linear' | 'monotone' | 'step';\n\n/**\n * How a series is marked in the legend. Deliberately narrower than recharts'\n * icon set: `ChartLegendContent` draws its own marker and reads only whether the\n * entry is a `line` (a rule, dashed when the series is) or anything else (a\n * swatch), so the wider union would advertise icons that never render. `none`\n * keeps the series off the legend entirely.\n */\nexport type ComposedSeriesLegendType = 'line' | 'rect' | 'none';\n\n/** Plot-area inset, in px. Any side left out keeps the chart's own default. */\nexport interface ComposedChartMargin {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n}\n\n// recharts 3 paints graphical items into z-index layers keyed by their *type*\n// (Area 100, Bar 300, Line 400), so JSX order alone decides nothing across\n// types — an area would always sit under the bars however the caller ordered\n// `series`. Giving each entry an explicit z-index from its index restores\n// \"later entry paints on top\". The band stays under the axis layer (500).\nconst SERIES_Z_INDEX_BASE = 100;\n\n// A reference band is a backdrop, so it has to sit under the marks. That is\n// recharts' own arrangement (its band defaults to 100, below Bar's 300), but\n// pulling the series down into the 100s to order them by array index lands them\n// on the band's layer — where the band, rendered later, would paint over them.\n// Below the series and above the grid (-100) restores the intent. A reference\n// *line* keeps its own default (400): a rule reads as an annotation on top.\nconst REFERENCE_AREA_Z_INDEX = 50;\n\n// recharts keys every axis by id, defaulting to `0` on both the axis and each\n// graphical item. The primary value axis keeps that implicit id rather than\n// taking an explicit one, so a chart with no secondary series renders\n// byte-identically — and `CartesianGrid` (whose own ids default to `0`) keeps\n// drawing its lines against the primary scale, which is the only readable\n// choice: gridlines from two different scales would cross at meaningless\n// heights.\nconst SECONDARY_VALUE_AXIS_ID = 'secondary';\n\n// recharts' own plot inset, spelled out so a caller-supplied `margin` can\n// override one side without erasing the other three.\nconst DEFAULT_CHART_MARGIN = { top: 5, right: 5, bottom: 5, left: 5 } as const;\n\n/** Fill opacity of a hovered bar when `showActiveBar` is on. */\nconst ACTIVE_BAR_FILL_OPACITY = 0.85;\n\n// Headroom for the caption a vertical reference rule hangs above the plot. Sized\n// to the 12px caption plus its descender, matching CHART_LABEL_MARGIN's top.\nconst REFERENCE_LABEL_MARGIN = { top: 16 } as const;\n\nexport interface ComposedSeries {\n /** Column key to plot — must match a `config` entry; drives its `--color-<key>` paint. */\n key: string;\n /** How this series renders. */\n type: ComposedSeriesType;\n /**\n * Which value axis this series is measured against. Defaults to `primary`.\n * The secondary axis is rendered only when at least one series selects it — use\n * it when a series carries a different unit or magnitude (a rate next to a\n * count) that a shared scale would flatten.\n */\n yAxis?: ChartYAxisTarget;\n /**\n * Paint for this series, overriding its `config` color. Reference an existing\n * semantic `--ui-*` token; there is no chart palette tier yet.\n */\n color?: string;\n /**\n * Stack this series with every other series of the *same mark type* carrying\n * the same id. Bars stack with bars and areas with areas — the ids are\n * namespaced per type, so one id can't merge a bar into an area stack. Ignored\n * on a line series, which recharts does not stack.\n */\n stackId?: string;\n /** Interpolation, overriding the chart's `curve`. Line and area series only. */\n curve?: ComposedCurveType;\n /**\n * Stroke width, overriding the chart's `strokeWidth` on a line or area series.\n * On a bar it sizes the dashed outline `strokeDasharray` draws — a bar has no\n * other stroke, so the chart-level default never reaches one and this is the\n * only way to set it.\n */\n strokeWidth?: number;\n /**\n * Dash pattern for the stroke (an SVG `stroke-dasharray`, e.g. `'5 5'`) — the\n * conventional way to mark a series as a projection. On a bar series it draws a\n * dashed outline in the series colour.\n */\n strokeDasharray?: string;\n /** Render a dot at each point, overriding the chart's `showDots`. Line and area series only. */\n showDots?: boolean;\n /** Render the hover dot, overriding the chart's `showActiveDots`. Line and area series only. */\n showActiveDots?: boolean;\n /** Bridge `null` gaps instead of breaking the series, overriding `connectNulls`. */\n connectNulls?: boolean;\n /** Corner radius on the growing end, overriding the chart's `barRadius`. Bar series only. */\n barRadius?: number;\n /** Fixed bar thickness in px, overriding the chart's `barSize`. Bar series only. */\n barSize?: number;\n /** Highlight this bar on hover, overriding the chart's `showActiveBar`. Bar series only. */\n showActiveBar?: boolean;\n /** Draw a full-height track behind this series' bars, overriding `showBackground`. Bar series only. */\n showBackground?: boolean;\n /** Fill opacity, overriding the chart's `fillOpacity` (which applies to area series). */\n fillOpacity?: number;\n /** How this series is marked in the legend — `none` keeps it off the legend. */\n legendType?: ComposedSeriesLegendType;\n}\n\n/**\n * A dashed rule on the chart. Either a position on the *value* axis (a fixed\n * `value`, or the mean of one/every series via `average`) or, with `category`, a\n * rule across the *category* axis at one category — the \"today\" divider between\n * actuals and forecast. A value position wins if both are given.\n */\nexport interface ComposedChartReferenceLine extends ChartReferenceLine {\n /**\n * Category to draw the rule at — the category's own value (an `xKey` cell) or\n * its 0-based row index.\n */\n category?: string | number;\n /**\n * Which value axis the rule is measured against, on a chart carrying two.\n * Defaults to the axis of the series named by `average`, and to `primary`\n * otherwise — so a target read off the secondary scale lands on it rather\n * than being plotted against the primary one. `average: true` then pools only\n * the series on this axis, never two scales at once. Inert while no series\n * selects the secondary axis.\n */\n yAxis?: ChartYAxisTarget;\n}\n\n/** A shaded band behind a range of categories. */\nexport interface ComposedChartReferenceArea extends ChartCategoryRange {\n /** Caption above the band. */\n label?: string;\n}\n\nexport interface ComposedChartProps\n extends Omit<React.ComponentProps<'div'>, 'children'>,\n VariantProps<typeof composedChartVariants>,\n CartesianChartProps,\n SecondaryYAxisProps,\n ChartAnimationProps,\n ChartBrushProps,\n ChartDataLabelProps {\n /** Row-per-category data. Each object holds `xKey` + one numeric field per series (`null` breaks a line/area unless `connectNulls`). */\n data: ReadonlyArray<Record<string, string | number | null>>;\n /**\n * Per-series map of `label` / `color`, keyed by `series[].key` (imported from\n * the shared `Chart` primitives). Turned into `--color-<key>` custom\n * properties. Colors are caller-supplied — reference an existing semantic\n * `--ui-*` token; there is no chart palette tier yet.\n */\n config: ChartConfig;\n /**\n * Series to plot, each `{ key, type }` plus any per-series style override —\n * one bar/line/area per entry. Each key must exist in `config` and every data\n * row. Every styling prop on the chart is the default a series overrides here.\n */\n series: ComposedSeries[];\n /** Category axis key (the shared dimension across rows, e.g. `\"month\"`). */\n xKey: string;\n /**\n * One or more dashed reference lines — on a value axis (`value` / `average`,\n * placed by the entry's `yAxis`) or across the category axis (`category`).\n * Pass a single object or an array.\n */\n referenceLine?: ComposedChartReferenceLine | ComposedChartReferenceLine[];\n /**\n * One or more shaded bands behind a range of categories — e.g. a forecast\n * period. Pass a single object or an array to draw several.\n */\n referenceArea?: ComposedChartReferenceArea | ComposedChartReferenceArea[];\n /** Unit suffix on the value-axis tick values when it is X (`orientation=\"horizontal\"`). */\n xUnit?: string;\n /** Interpolation for the line and area series. */\n curve?: ComposedCurveType;\n /** Corner radius on the growing end of bar series. */\n barRadius?: number;\n /** Fixed bar thickness, in px. Unset, recharts sizes bars from the available width. */\n barSize?: number;\n /** Gap between bars of the same category, in px or a percentage string. */\n barGap?: number | string;\n /** Gap between category groups, in px or a percentage string. */\n barCategoryGap?: number | string;\n /** Draw a full-height track behind every bar. */\n showBackground?: boolean;\n /** Fill for the track background. Defaults to the secondary surface. */\n backgroundFill?: string;\n /** Highlight the hovered bar. */\n showActiveBar?: boolean;\n /** Flat-fill opacity for area series. */\n fillOpacity?: number;\n /** Stroke width for the line series. Areas keep recharts' thinner outline unless set. */\n strokeWidth?: number;\n /** Render a dot at each point of the line and area series. */\n showDots?: boolean;\n /** Render the hover dot on the line and area series. Unset, recharts' own default applies. */\n showActiveDots?: boolean;\n /** Bridge `null` gaps in the data instead of breaking the line/area. */\n connectNulls?: boolean;\n /** Plot-area inset. Any side left out keeps the chart's own default. */\n margin?: ComposedChartMargin;\n /** Draw the hover cursor (the band/rule under the tooltip). Defaults to `true`. */\n tooltipCursor?: boolean;\n showLegend?: boolean;\n /** Which edge the legend sits on. Defaults to `bottom`. */\n legendPosition?: 'top' | 'bottom';\n /**\n * Position of the value labels when `showLabels` is on. Defaults to each\n * series' growing end — `top` (or `right` when horizontal), and the centre of\n * a stacked segment, which has no free space at its end.\n */\n labelPosition?: CartesianLabelPosition;\n}\n\n// recharts types a legend's `content` as an element *or* a render function.\n// Naming that union is what lets the content be built above the returned tree\n// (see `legendContent`) without hand-typing the props the render form is given.\ntype LegendContentType = NonNullable<\n React.ComponentProps<typeof ChartLegend>['content']\n>;\n\nconst ComposedChart = React.forwardRef<HTMLDivElement, ComposedChartProps>(\n (\n {\n className,\n config,\n data,\n series,\n xKey,\n referenceLine,\n referenceArea,\n orientation = 'vertical',\n xAxisLabel,\n yAxisLabel,\n xUnit,\n yUnit,\n curve = 'monotone',\n barRadius = 4,\n barSize,\n barGap,\n barCategoryGap,\n showBackground = false,\n backgroundFill = 'var(--ui-background-surface-secondary)',\n showActiveBar = false,\n fillOpacity = 0.3,\n strokeWidth,\n showDots = false,\n showActiveDots,\n connectNulls = false,\n margin,\n showGrid = true,\n showTooltip = true,\n tooltipCursor = true,\n showLegend = true,\n legendPosition = 'bottom',\n showXAxis = true,\n showYAxis = true,\n xTickFormatter,\n yTickFormatter,\n xAxisAngle,\n xAxisInterval,\n yAxisTickCount,\n yAxisDomain,\n yAxisOrientation,\n showSecondaryYAxis = true,\n secondaryYAxisLabel,\n secondaryYUnit,\n secondaryYTickFormatter,\n secondaryYAxisTickCount,\n secondaryYAxisDomain,\n gridDashed,\n gridHorizontal,\n gridVertical,\n tooltipContent,\n animate,\n animationDuration,\n animationBegin,\n animationEasing,\n showLabels = false,\n labelPosition,\n labelFormatter,\n showBrush = false,\n brushHeight,\n brushAriaLabel,\n ...props\n },\n ref\n ) => {\n const animation = resolveAnimation({\n animate,\n animationDuration,\n animationBegin,\n animationEasing,\n });\n // Our `orientation` is the direction the marks grow; recharts' `layout` is\n // the opposite axis. Horizontal puts the categories on Y and the values on X,\n // which re-roles every axis prop below.\n const isHorizontal = orientation === 'horizontal';\n // Axis titles: the X title sits below the ticks; the Y title is rotated in\n // the side gutter. Passed to recharts' native `label` (themed via the\n // `.recharts-label` fill selector on the container).\n const xAxisTitle = resolveXAxisTitle(xAxisLabel);\n // The secondary axis is derived from the series, not from a flag of its own:\n // that keeps a series from pointing at an id no axis declares, where recharts\n // falls back to an implicit axis — the series still scales off its own data, but\n // silently loses the domain/tickCount/formatter/unit that axis was configured\n // with, and renders no chrome for it.\n const hasSecondaryValueAxis = series.some((s) => s.yAxis === 'secondary');\n // The mirror case the `series` opt-in can't rule out on its own: every series\n // asks for the secondary axis, leaving the primary one with nothing measured\n // against it. recharts gives an axis with no graphical items no ticks at all, so\n // it paints a blank gutter and `CartesianGrid` — which follows it — collapses to\n // the two plot boundaries. Hand the gutter and the grid to the axis that does\n // have the series. Both conditionals are inert on every other chart shape, so\n // single-axis output is untouched.\n const hasPrimarySeries = series.some((s) => s.yAxis !== 'secondary');\n const primaryValueAxisIsOrphaned = hasSecondaryValueAxis && !hasPrimarySeries;\n const primaryOrientation = yAxisOrientation ?? 'left';\n const secondaryOrientation = primaryOrientation === 'left' ? 'right' : 'left';\n\n // The category axis is pinned to the left when the marks grow horizontally,\n // so its title is angled for that side whatever `yAxisOrientation` says.\n const yAxisTitle = resolveYAxisTitle(\n yAxisLabel,\n isHorizontal ? 'left' : primaryOrientation\n );\n const secondaryYAxisTitle = resolveYAxisTitle(\n secondaryYAxisLabel,\n secondaryOrientation\n );\n // Horizontal puts the second scale on a top X axis, where a rotated title\n // would read sideways over the plot.\n const secondaryXAxisTitle = resolveXAxisTitle(\n secondaryYAxisLabel,\n 'insideTop'\n );\n\n const yDomain = resolveAxisDomain(yAxisDomain);\n const secondaryYDomain = resolveAxisDomain(secondaryYAxisDomain);\n\n // Which axis a series (or the grid, or a reference element) binds to. The\n // value axis is Y by default and X when horizontal; the primary one keeps\n // recharts' implicit id `0` — `resolveDefaultProps` fills the `undefined` in —\n // so a series that opts out of the secondary axis passes exactly what it\n // passed before that axis existed.\n const valueAxisBinding = (target: ChartYAxisTarget | undefined) => {\n const id = target === 'secondary' ? SECONDARY_VALUE_AXIS_ID : undefined;\n return isHorizontal ? { xAxisId: id } : { yAxisId: id };\n };\n // Spread (rather than passed as an `undefined` prop) so the primary case\n // reorders nothing: see the `orientation` note on the primary axis below.\n const orphanedAxisBinding = primaryValueAxisIsOrphaned\n ? valueAxisBinding('secondary')\n : {};\n\n const xAxisHeight = resolveXAxisHeight(xAxisLabel, xAxisAngle);\n\n const referenceLines = referenceLine\n ? Array.isArray(referenceLine)\n ? referenceLine\n : [referenceLine]\n : [];\n const referenceAreas = (\n referenceArea\n ? Array.isArray(referenceArea)\n ? referenceArea\n : [referenceArea]\n : []\n )\n .map((area) => ({ area, range: resolveCategoryRange(area, data, xKey) }))\n .filter(\n (\n entry\n ): entry is { area: ComposedChartReferenceArea; range: [number, number] } =>\n entry.range !== undefined\n );\n // A reference rule belongs to one scale, so both halves of it — which keys\n // an `average` pools, and which axis the result is plotted against — have to\n // agree. When the primary axis is orphaned every series is on the secondary\n // one, so that becomes the default rather than leaving `average: true` with\n // an empty key set.\n const defaultReferenceAxis: ChartYAxisTarget = primaryValueAxisIsOrphaned\n ? 'secondary'\n : 'primary';\n const seriesAxisOf = (s: ComposedSeries) => s.yAxis ?? 'primary';\n const seriesAxisByKey = new Map(series.map((s) => [s.key, seriesAxisOf(s)]));\n const seriesKeysOn = (target: ChartYAxisTarget) =>\n series.filter((s) => seriesAxisOf(s) === target).map((s) => s.key);\n const hiddenLegendKeys = new Set(\n series.filter((s) => s.legendType === 'none').map((s) => s.key)\n );\n // The axis position a band/rule is placed at. `?? undefined` because a row\n // whose category cell is null has no position on the axis — recharts types\n // its reference coordinates as `string | number`.\n const categoryAt = (row: number) => data[row]?.[xKey] ?? undefined;\n\n // Resolved up here, not inside the map, because the plot margin below has to\n // know whether any rule will hang a caption above the plot.\n const resolvedReferenceLines = referenceLines\n .map((line) => {\n // A category rule is placed by the category's own value, so an index\n // bound is resolved back to it first.\n const categoryRange =\n line.category !== undefined\n ? resolveCategoryRange(\n { from: line.category, to: line.category },\n data,\n xKey\n )\n : undefined;\n // An `average` naming one series is read off that series' own scale\n // unless the caller says otherwise; anything else falls back to the\n // chart's default axis.\n const lineAxis =\n line.yAxis ??\n (typeof line.average === 'string'\n ? (seriesAxisByKey.get(line.average) ?? defaultReferenceAxis)\n : defaultReferenceAxis);\n const value = resolveChartReferenceValue(line, data, seriesKeysOn(lineAxis));\n const category = categoryRange\n ? categoryAt(categoryRange[0])\n : undefined;\n // The value position wins when both are given; a category that resolves\n // to nothing (an unknown bound) draws no rule.\n const position =\n value !== undefined\n ? isHorizontal\n ? { x: value }\n : { y: value }\n : category !== undefined\n ? isHorizontal\n ? { y: category }\n : { x: category }\n : undefined;\n // A value rule runs across the value axis, so it is drawn vertical\n // exactly when the values are on X — and a category rule the other way\n // round.\n const isVerticalRule = (value !== undefined) === isHorizontal;\n return { line, lineAxis, position, isVerticalRule };\n })\n .filter(\n (\n entry\n ): entry is typeof entry & { position: Record<string, string | number> } =>\n entry.position !== undefined\n );\n\n // Line/area series don't clamp their labels to the plot (see\n // CHART_LABEL_MARGIN); a composed chart can hold either. A caller-supplied\n // margin overrides that per side rather than replacing it, so asking for one\n // wider gutter can't silently drop the label headroom.\n const labelMargin = showLabels ? CHART_LABEL_MARGIN : undefined;\n // A vertical rule hangs its caption off the top end, outside the plot, where\n // recharts' 5px inset clips it — the same headroom problem CHART_LABEL_MARGIN\n // solves for data labels, so it is reserved the same way rather than left for\n // the caller to discover and pass a `margin` for.\n const referenceLabelMargin = resolvedReferenceLines.some(\n (entry) => entry.line.label && entry.isVerticalRule\n )\n ? REFERENCE_LABEL_MARGIN\n : undefined;\n const resolvedMargin =\n margin || labelMargin || referenceLabelMargin\n ? {\n ...(margin ? DEFAULT_CHART_MARGIN : {}),\n ...referenceLabelMargin,\n ...labelMargin,\n ...margin,\n }\n : undefined;\n\n // Only the segment at the growing end of a stack rounds its corners — the\n // ones below it butt against the next segment.\n const lastIndexInStack = new Map<string, number>();\n series.forEach((s, index) => {\n if (s.stackId && s.type !== 'line') {\n lastIndexInStack.set(`${s.type}-${s.stackId}`, index);\n }\n });\n\n // Everything from here to the `return` is lifted out of the returned tree\n // only to keep it readable as a flat list of chart children. Nothing in\n // recharts forces the `render*` helpers to be plain functions: axes and\n // series register themselves with the chart's store, and `<Cell>` is the\n // only child still looked up by element type — a component wrapper renders\n // fine (see AreaChart's `AreaFillGradients`). They stay functions because\n // they are declared inside the render body, where a component would get a\n // fresh element type on every render and remount its subtree.\n\n // The two orientations stay two whole blocks rather than one parameterised\n // axis pair: they swap which axis is `type=\"number\"` and which carries the\n // categories, and they differ in props recharts treats as present-but-\n // undefined vs absent (see the `orientation` note below), which a shared\n // element would have to reintroduce prop by prop anyway.\n\n // Horizontal marks put the values on X, so the value-axis props\n // (unit/tickCount/domain) belong on the X axis here — recharts ignores them\n // on the category axis.\n const renderHorizontalAxes = () => (\n <>\n <XAxis\n type=\"number\"\n hide={!showXAxis || primaryValueAxisIsOrphaned}\n tickLine={false}\n axisLine={false}\n unit={xUnit}\n tickFormatter={xTickFormatter}\n angle={xAxisAngle}\n interval={xAxisInterval}\n textAnchor={resolveRotatedTickAnchor(xAxisAngle)}\n tickCount={yAxisTickCount}\n domain={yDomain}\n height={xAxisHeight}\n label={xAxisTitle}\n />\n <YAxis\n dataKey={xKey}\n type=\"category\"\n hide={!showYAxis}\n // `yAxisOrientation` picks the side of the *value* axis, which\n // is X here — a left/right choice it has no room for, and one\n // the secondary axis already spends on the top edge. Moving the\n // category axis with it instead would satisfy the prop name and\n // break its contract, so it stays inert in this orientation.\n tickLine={false}\n axisLine={false}\n tickFormatter={yTickFormatter}\n width={yAxisLabel ? 96 : 80}\n label={yAxisTitle}\n />\n {hasSecondaryValueAxis && (\n <XAxis\n xAxisId={SECONDARY_VALUE_AXIS_ID}\n type=\"number\"\n hide={!showSecondaryYAxis}\n orientation=\"top\"\n tickLine={false}\n axisLine={false}\n unit={secondaryYUnit}\n tickFormatter={secondaryYTickFormatter}\n tickCount={secondaryYAxisTickCount}\n domain={secondaryYDomain}\n label={secondaryXAxisTitle}\n />\n )}\n </>\n );\n\n const renderVerticalAxes = () => (\n <>\n <XAxis\n dataKey={xKey}\n type=\"category\"\n hide={!showXAxis}\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n tickFormatter={xTickFormatter}\n angle={xAxisAngle}\n interval={xAxisInterval}\n textAnchor={resolveRotatedTickAnchor(xAxisAngle)}\n height={xAxisHeight}\n label={xAxisTitle}\n />\n <YAxis\n type=\"number\"\n hide={!showYAxis || primaryValueAxisIsOrphaned}\n // Spread only when set. `orientation={undefined}` would resolve to the\n // same `left`, but the key's presence moves it ahead of `width` in the\n // props object recharts spreads onto its tick labels — reordering the\n // SVG attributes of every existing chart for no functional gain.\n {...(yAxisOrientation ? { orientation: yAxisOrientation } : {})}\n tickLine={false}\n axisLine={false}\n unit={yUnit}\n tickFormatter={yTickFormatter}\n tickCount={yAxisTickCount}\n domain={yDomain}\n width={yAxisLabel ? 72 : undefined}\n label={yAxisTitle}\n />\n {hasSecondaryValueAxis && (\n <YAxis\n yAxisId={SECONDARY_VALUE_AXIS_ID}\n type=\"number\"\n hide={!showSecondaryYAxis}\n orientation={secondaryOrientation}\n tickLine={false}\n axisLine={false}\n unit={secondaryYUnit}\n tickFormatter={secondaryYTickFormatter}\n tickCount={secondaryYAxisTickCount}\n domain={secondaryYDomain}\n width={secondaryYAxisLabel ? 72 : undefined}\n label={secondaryYAxisTitle}\n />\n )}\n </>\n );\n\n // recharts keeps a `legendType=\"none\"` series in the legend payload (it only\n // drops its icon), so hiding an entry is this filter's job — the same guard\n // `BarChart` applies to its synthetic series. Only wired up when a series\n // asks for it, so every other chart keeps the plain content element.\n const legendContent: LegendContentType =\n hiddenLegendKeys.size > 0\n ? (legendProps) => (\n <ChartLegendContent\n verticalAlign={legendPosition}\n payload={\n legendProps.payload?.filter(\n (item) => !hiddenLegendKeys.has(String(item.dataKey))\n ) as ChartLegendContentProps['payload']\n }\n />\n )\n : <ChartLegendContent verticalAlign={legendPosition} />;\n\n const renderSeries = (s: ComposedSeries, index: number) => {\n const color = s.color ?? `var(--color-${s.key})`;\n const zIndex = SERIES_Z_INDEX_BASE + index;\n const axisBinding = valueAxisBinding(s.yAxis);\n const stackId =\n s.stackId && s.type !== 'line' ? `${s.type}-${s.stackId}` : undefined;\n const seriesFillOpacity = s.fillOpacity ?? fillOpacity;\n const seriesConnectNulls = s.connectNulls ?? connectNulls;\n const seriesShowDots = s.showDots ?? showDots;\n const seriesShowActiveDots = s.showActiveDots ?? showActiveDots;\n const seriesLegendType = s.legendType ? { legendType: s.legendType } : {};\n // A stacked segment has no free space at its growing end (the next\n // segment is drawn there), so its labels centre in their own\n // segment instead.\n const seriesLabelPosition = resolveCartesianLabelPosition({\n labelPosition,\n isStacked: stackId !== undefined,\n growingEnd: isHorizontal ? 'right' : 'top',\n });\n const label = showLabels ? (\n <LabelList\n dataKey={s.key}\n position={seriesLabelPosition}\n formatter={toLabelFormatter(labelFormatter)}\n className={resolveLabelFillClass(seriesLabelPosition, {\n translucentSeries: s.type === 'area',\n })}\n fontSize={CHART_LABEL_FONT_SIZE}\n />\n ) : null;\n\n if (s.type === 'bar') {\n const radius = s.barRadius ?? barRadius;\n const rounded =\n stackId === undefined || lastIndexInStack.get(stackId) === index;\n const barBackground = s.showBackground ?? showBackground;\n // recharts spreads the active option over the bar's own props, so\n // an explicit `undefined` fill would wipe the series color (an\n // unfilled path paints black) — only dim it.\n const barActive = s.showActiveBar ?? showActiveBar;\n return (\n <Bar\n key={s.key}\n dataKey={s.key}\n {...axisBinding}\n fill={color}\n radius={\n radius > 0 && rounded\n ? isHorizontal\n ? [0, radius, radius, 0]\n : [radius, radius, 0, 0]\n : undefined\n }\n zIndex={zIndex}\n {...(stackId ? { stackId } : {})}\n {...(s.barSize !== undefined ? { barSize: s.barSize } : {})}\n {...(s.fillOpacity !== undefined\n ? { fillOpacity: s.fillOpacity }\n : {})}\n // A bar has no outline of its own, so a dash pattern brings\n // one with it — in the series colour, at the series' stroke\n // width if it set one.\n {...(s.strokeDasharray !== undefined\n ? {\n stroke: color,\n strokeDasharray: s.strokeDasharray,\n ...(s.strokeWidth !== undefined\n ? { strokeWidth: s.strokeWidth }\n : {}),\n }\n : {})}\n {...(barBackground ? { background: { fill: backgroundFill } } : {})}\n {...(barActive\n ? { activeBar: { fillOpacity: ACTIVE_BAR_FILL_OPACITY } }\n : {})}\n {...seriesLegendType}\n {...animation}\n >\n {label}\n </Bar>\n );\n }\n if (s.type === 'area') {\n const width = s.strokeWidth ?? strokeWidth;\n const areaStrokeWidth =\n width !== undefined ? { strokeWidth: width } : {};\n return (\n <Area\n key={s.key}\n type={s.curve ?? curve}\n dataKey={s.key}\n {...axisBinding}\n stroke={color}\n fill={color}\n fillOpacity={seriesFillOpacity}\n zIndex={zIndex}\n {...(stackId ? { stackId } : {})}\n // Areas keep recharts' own thinner outline unless a width is\n // asked for: the chart-level default exists for the lines,\n // where 2px is this suite's stroke.\n {...areaStrokeWidth}\n {...(s.strokeDasharray !== undefined\n ? { strokeDasharray: s.strokeDasharray }\n : {})}\n dot={seriesShowDots ? { r: 3 } : false}\n {...(seriesShowActiveDots !== undefined\n ? { activeDot: seriesShowActiveDots ? { r: 5 } : false }\n : {})}\n connectNulls={seriesConnectNulls}\n {...seriesLegendType}\n {...animation}\n >\n {label}\n </Area>\n );\n }\n return (\n <Line\n key={s.key}\n type={s.curve ?? curve}\n dataKey={s.key}\n {...axisBinding}\n stroke={color}\n strokeWidth={s.strokeWidth ?? strokeWidth ?? 2}\n dot={seriesShowDots ? { r: 3 } : false}\n zIndex={zIndex}\n {...(s.strokeDasharray !== undefined\n ? { strokeDasharray: s.strokeDasharray }\n : {})}\n {...(seriesShowActiveDots !== undefined\n ? { activeDot: seriesShowActiveDots ? { r: 5 } : false }\n : {})}\n connectNulls={seriesConnectNulls}\n {...seriesLegendType}\n {...animation}\n >\n {label}\n </Line>\n );\n };\n\n const renderReferenceArea = (\n { area, range }: (typeof referenceAreas)[number],\n index: number\n ) => {\n const [start, end] = range;\n return (\n <ReferenceArea\n key={`${area.label ?? 'area'}-${index}`}\n {...orphanedAxisBinding}\n // Bands run along the category axis: X by default, Y when the\n // marks grow horizontally.\n {...(isHorizontal\n ? { y1: categoryAt(start), y2: categoryAt(end) }\n : { x1: categoryAt(start), x2: categoryAt(end) })}\n fill=\"var(--ui-background-surface-secondary)\"\n fillOpacity={0.6}\n zIndex={REFERENCE_AREA_Z_INDEX}\n ifOverflow=\"extendDomain\"\n label={\n area.label\n ? {\n value: area.label,\n position: 'insideTop',\n fill: 'var(--ui-text-on-surface-secondary)',\n fontSize: 12,\n }\n : undefined\n }\n />\n );\n };\n\n const renderReferenceLine = (\n {\n line,\n lineAxis,\n position,\n isVerticalRule,\n }: (typeof resolvedReferenceLines)[number],\n index: number\n ) => (\n <ReferenceLine\n key={`${line.label ?? 'ref'}-${index}`}\n // Binding to an id no axis declares makes recharts invent an\n // implicit one (see `hasSecondaryValueAxis`), so the request is\n // only honored once a series has brought that axis into being.\n {...(lineAxis === 'secondary' && hasSecondaryValueAxis\n ? valueAxisBinding('secondary')\n : {})}\n {...position}\n // Caption at the top of the rule by default: above the right\n // end of a horizontal one, above the top of a vertical one\n // (which the plot margin reserves room for — see\n // REFERENCE_LABEL_MARGIN). A config's own `labelPosition`\n // overrides that, as on the other cartesian charts.\n {...resolveReferenceLineProps(\n line.label,\n line.labelPosition ?? (isVerticalRule ? 'top' : 'insideTopRight')\n )}\n />\n );\n\n return (\n <div\n ref={ref}\n data-orientation={orientation}\n className={cn(composedChartVariants({ orientation }), className)}\n {...props}\n >\n <ChartContainer\n config={config}\n className=\"size-full [&_.recharts-label]:fill-foreground\"\n >\n <RechartsComposedChart\n data={data as readonly unknown[]}\n layout={isHorizontal ? 'vertical' : 'horizontal'}\n barSize={barSize}\n barGap={barGap}\n barCategoryGap={barCategoryGap}\n margin={resolvedMargin}\n >\n {showGrid && (\n <CartesianGrid\n // Spread only when the primary axis has no series (see above) —\n // an explicit `undefined` id resolves to the same `0` but\n // reorders the grid's SVG attributes on every existing chart.\n {...orphanedAxisBinding}\n horizontal={gridHorizontal ?? !isHorizontal}\n vertical={gridVertical ?? isHorizontal}\n strokeDasharray={gridDashed ? '3 3' : undefined}\n />\n )}\n {isHorizontal ? renderHorizontalAxes() : renderVerticalAxes()}\n {showTooltip && (\n <ChartTooltip\n {...(tooltipCursor ? {} : { cursor: false })}\n content={tooltipContent ?? <ChartTooltipContent />}\n />\n )}\n {showLegend && (\n <ChartLegend\n verticalAlign={legendPosition}\n content={legendContent}\n />\n )}\n {/* Rendered back-to-front in the caller's `series` order — later\n entries sit on top. Order them so thin marks (a line) come after\n the areas/bars they should overlay. */}\n {series.map(renderSeries)}\n {referenceAreas.map(renderReferenceArea)}\n {resolvedReferenceLines.map(renderReferenceLine)}\n {showBrush && (\n <Brush\n dataKey={xKey}\n // The brush slices rows by index, so its captions come from\n // whichever axis holds the categories — Y when horizontal.\n tickFormatter={isHorizontal ? yTickFormatter : xTickFormatter}\n {...resolveBrushProps({ brushHeight, brushAriaLabel })}\n />\n )}\n </RechartsComposedChart>\n </ChartContainer>\n </div>\n );\n }\n);\nComposedChart.displayName = 'ComposedChart';\n\nexport { ComposedChart, composedChartVariants };\n"],"names":["composedChartVariants","cva","SERIES_Z_INDEX_BASE","REFERENCE_AREA_Z_INDEX","SECONDARY_VALUE_AXIS_ID","DEFAULT_CHART_MARGIN","ACTIVE_BAR_FILL_OPACITY","REFERENCE_LABEL_MARGIN","ComposedChart","React","className","config","data","series","xKey","referenceLine","referenceArea","orientation","xAxisLabel","yAxisLabel","xUnit","yUnit","curve","barRadius","barSize","barGap","barCategoryGap","showBackground","backgroundFill","showActiveBar","fillOpacity","strokeWidth","showDots","showActiveDots","connectNulls","margin","showGrid","showTooltip","tooltipCursor","showLegend","legendPosition","showXAxis","showYAxis","xTickFormatter","yTickFormatter","xAxisAngle","xAxisInterval","yAxisTickCount","yAxisDomain","yAxisOrientation","showSecondaryYAxis","secondaryYAxisLabel","secondaryYUnit","secondaryYTickFormatter","secondaryYAxisTickCount","secondaryYAxisDomain","gridDashed","gridHorizontal","gridVertical","tooltipContent","animate","animationDuration","animationBegin","animationEasing","showLabels","labelPosition","labelFormatter","showBrush","brushHeight","brushAriaLabel","props","ref","animation","resolveAnimation","isHorizontal","xAxisTitle","resolveXAxisTitle","hasSecondaryValueAxis","s","hasPrimarySeries","primaryValueAxisIsOrphaned","primaryOrientation","secondaryOrientation","yAxisTitle","resolveYAxisTitle","secondaryYAxisTitle","secondaryXAxisTitle","yDomain","resolveAxisDomain","secondaryYDomain","valueAxisBinding","target","id","orphanedAxisBinding","xAxisHeight","resolveXAxisHeight","referenceLines","referenceAreas","area","resolveCategoryRange","entry","defaultReferenceAxis","seriesAxisOf","seriesAxisByKey","seriesKeysOn","hiddenLegendKeys","categoryAt","row","_a","resolvedReferenceLines","line","categoryRange","lineAxis","value","resolveChartReferenceValue","category","labelMargin","CHART_LABEL_MARGIN","referenceLabelMargin","resolvedMargin","lastIndexInStack","index","renderHorizontalAxes","jsxs","Fragment","jsx","XAxis","resolveRotatedTickAnchor","YAxis","renderVerticalAxes","legendContent","legendProps","ChartLegendContent","item","renderSeries","color","zIndex","axisBinding","stackId","seriesFillOpacity","seriesConnectNulls","seriesShowDots","seriesShowActiveDots","seriesLegendType","seriesLabelPosition","resolveCartesianLabelPosition","label","LabelList","toLabelFormatter","resolveLabelFillClass","CHART_LABEL_FONT_SIZE","radius","rounded","barBackground","barActive","Bar","width","areaStrokeWidth","Area","Line","renderReferenceArea","range","start","end","ReferenceArea","renderReferenceLine","position","isVerticalRule","ReferenceLine","resolveReferenceLineProps","cn","ChartContainer","RechartsComposedChart","CartesianGrid","ChartTooltip","ChartTooltipContent","ChartLegend","Brush","resolveBrushProps"],"mappings":";;;;;;;AA+DA,MAAMA,KAAwBC,GAAI,IAAI;AAAA,EACpC,UAAU;AAAA,IACR,aAAa;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,IAAA;AAAA,EACd;AAAA,EAEF,iBAAiB;AAAA,IACf,aAAa;AAAA,EAAA;AAEjB,CAAC,GA6BKC,KAAsB,KAQtBC,KAAyB,IASzBC,IAA0B,aAI1BC,KAAuB,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAA,GAG5DC,KAA0B,MAI1BC,KAAyB,EAAE,KAAK,GAAA,GAgLhCC,KAAgBC,GAAM;AAAA,EAC1B,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,WAAAC,KAAY;AAAA,IACZ,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC,KAAiB;AAAA,IACjB,gBAAAC,KAAiB;AAAA,IACjB,eAAAC,KAAgB;AAAA,IAChB,aAAAC,KAAc;AAAA,IACd,aAAAC;AAAA,IACA,UAAAC,KAAW;AAAA,IACX,gBAAAC;AAAA,IACA,cAAAC,KAAe;AA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QAAQ,GAAA;AAAA,sBACpC,SAASqB,MAAkB,gBAAAkE,EAACkD,IAAA,CAAA,CAAoB;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAGnDxI,MACC,gBAAAsF;AAAA,oBAACmD;AAAA,oBAAA;AAAA,sBACC,eAAexI;AAAA,sBACf,SAAS0F;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAMZrH,EAAO,IAAIyH,EAAY;AAAA,kBACvBrC,GAAe,IAAI+D,EAAmB;AAAA,kBACtCnD,GAAuB,IAAIwD,EAAmB;AAAA,kBAC9ClG,MACC,gBAAA0D;AAAA,oBAACoD;AAAA,oBAAA;AAAA,sBACC,SAASnK;AAAA,sBAGT,eAAe4D,IAAe9B,IAAiBD;AAAA,sBAC9C,GAAGuI,GAAkB,EAAE,aAAA9G,IAAa,gBAAAC,IAAgB;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACvD;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AACA7D,GAAc,cAAc;"}
|
|
@@ -1,195 +1,329 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { ComposedChart as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as r, jsxs as x, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { ComposedChart as Fe, CartesianGrid as Ke, Text as Re, XAxis as Le, YAxis as Ne, ReferenceArea as Me, ReferenceLine as B, Area as z, Line as H } from "recharts";
|
|
4
|
+
import { cn as Oe } from "../../../lib/utils.js";
|
|
5
|
+
import { resolveAnimation as Xe, resolveRotatedTickAnchor as _e, CHART_LABEL_FONT_SIZE as Se, resolveXAxisTitle as Ee, resolveXAxisHeight as Be, resolveYAxisTitle as ze, resolveAxisDomain as He } from "../chart/chart-format.js";
|
|
6
|
+
import { ChartContainer as je, ChartTooltip as j, ChartTooltipContent as we, ChartLegend as Ie, ChartLegendContent as Pe } from "../chart/chart.js";
|
|
7
|
+
const w = "__cone", A = (t) => `${w}:${t}`;
|
|
8
|
+
function I(t) {
|
|
9
|
+
return t == null ? void 0 : t.filter(
|
|
10
|
+
(o) => !(typeof o.dataKey == "string" && o.dataKey.startsWith(w))
|
|
11
|
+
);
|
|
9
12
|
}
|
|
10
|
-
function
|
|
13
|
+
function We(t, o) {
|
|
14
|
+
return t == null ? void 0 : t.filter(
|
|
15
|
+
(n) => typeof n.dataKey == "string" && o.includes(n.dataKey)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function Ye(t) {
|
|
11
19
|
return function(n) {
|
|
12
|
-
const
|
|
20
|
+
const l = {
|
|
13
21
|
...n,
|
|
14
|
-
payload:
|
|
22
|
+
payload: I(n.payload)
|
|
15
23
|
};
|
|
16
|
-
return typeof t == "function" ?
|
|
24
|
+
return typeof t == "function" ? m.createElement(
|
|
17
25
|
t,
|
|
18
|
-
|
|
19
|
-
) :
|
|
26
|
+
l
|
|
27
|
+
) : m.cloneElement(t, l);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function Ge(t, o, n) {
|
|
31
|
+
return t.filter((l) => o.some(({ forecastKey: c }) => typeof l[c] == "number")).map((l) => l[n]);
|
|
32
|
+
}
|
|
33
|
+
function Ze(t, o, n) {
|
|
34
|
+
return function({
|
|
35
|
+
payload: c,
|
|
36
|
+
index: v,
|
|
37
|
+
...y
|
|
38
|
+
}) {
|
|
39
|
+
const f = c == null ? void 0 : c.value;
|
|
40
|
+
return /* @__PURE__ */ r(
|
|
41
|
+
Re,
|
|
42
|
+
{
|
|
43
|
+
...y,
|
|
44
|
+
style: f != null && t.has(f) ? { fontStyle: "italic", fill: o } : void 0,
|
|
45
|
+
children: n && f != null ? n(f, v) : f
|
|
46
|
+
}
|
|
47
|
+
);
|
|
20
48
|
};
|
|
21
49
|
}
|
|
22
|
-
const
|
|
50
|
+
const qe = m.forwardRef(
|
|
23
51
|
({
|
|
24
52
|
className: t,
|
|
25
|
-
config:
|
|
53
|
+
config: o,
|
|
26
54
|
data: n,
|
|
27
|
-
xKey:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
xKey: l,
|
|
56
|
+
series: c,
|
|
57
|
+
actualKey: v,
|
|
58
|
+
forecastKey: y,
|
|
59
|
+
lowerKey: f,
|
|
60
|
+
upperKey: C,
|
|
61
|
+
xAxisLabel: $,
|
|
62
|
+
yAxisLabel: D,
|
|
63
|
+
yUnit: P,
|
|
64
|
+
actualType: F = "area",
|
|
65
|
+
strokeWidth: K = 2,
|
|
66
|
+
showDots: p = !1,
|
|
67
|
+
styleForecastTicks: W = !1,
|
|
68
|
+
referenceLine: h,
|
|
69
|
+
showForecastRegion: Y = !0,
|
|
70
|
+
showGrid: G = !0,
|
|
71
|
+
showTooltip: Z = !0,
|
|
72
|
+
showLegend: q = !0,
|
|
73
|
+
showXAxis: J = !0,
|
|
74
|
+
showYAxis: Q = !0,
|
|
75
|
+
xTickFormatter: R,
|
|
76
|
+
yTickFormatter: U,
|
|
77
|
+
xAxisAngle: g,
|
|
78
|
+
xAxisInterval: V,
|
|
79
|
+
yAxisTickCount: ee,
|
|
80
|
+
yAxisDomain: te,
|
|
81
|
+
gridDashed: re,
|
|
82
|
+
gridHorizontal: oe,
|
|
83
|
+
gridVertical: ne,
|
|
84
|
+
tooltipContent: T,
|
|
85
|
+
animate: ae,
|
|
86
|
+
animationDuration: le,
|
|
87
|
+
animationBegin: ce,
|
|
88
|
+
animationEasing: ie,
|
|
89
|
+
...se
|
|
90
|
+
}, ue) => {
|
|
91
|
+
var O, X;
|
|
92
|
+
const s = m.useMemo(() => c != null && c.length ? c : !v || !y ? [] : [{ actualKey: v, forecastKey: y, lowerKey: f, upperKey: C }], [c, v, y, f, C]), b = Xe({
|
|
93
|
+
animate: ae,
|
|
94
|
+
animationDuration: le,
|
|
95
|
+
animationBegin: ce,
|
|
96
|
+
animationEasing: ie
|
|
97
|
+
}), L = m.useMemo(
|
|
98
|
+
() => T ? Ye(T) : void 0,
|
|
99
|
+
[T]
|
|
100
|
+
), fe = Ee($), de = ze(D), me = He(te), ve = m.useMemo(() => {
|
|
101
|
+
let e;
|
|
102
|
+
for (const { actualKey: a, forecastKey: i } of s) {
|
|
103
|
+
const u = o[a], d = o[i];
|
|
104
|
+
!u || !d || (e ?? (e = { ...o }), e[i] = {
|
|
105
|
+
label: d.label,
|
|
106
|
+
icon: d.icon,
|
|
107
|
+
...u.theme ? { theme: u.theme } : { color: u.color }
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return e ?? o;
|
|
111
|
+
}, [o, s]), ye = Be($, g), pe = n.map((e) => {
|
|
112
|
+
const a = { ...e };
|
|
113
|
+
for (const { actualKey: i, lowerKey: u, upperKey: d } of s) {
|
|
114
|
+
if (!u || !d) continue;
|
|
115
|
+
const _ = e[u], S = e[d];
|
|
116
|
+
a[A(i)] = typeof _ == "number" && typeof S == "number" ? [_, S] : void 0;
|
|
117
|
+
}
|
|
118
|
+
return a;
|
|
119
|
+
}), N = Ge(n, s, l), k = Y ? N[0] : void 0, M = (O = n[n.length - 1]) == null ? void 0 : O[l], he = Ze(
|
|
120
|
+
new Set(N),
|
|
121
|
+
`var(--color-${(X = s[0]) == null ? void 0 : X.actualKey})`,
|
|
122
|
+
R
|
|
123
|
+
), ke = h ? Array.isArray(h) ? h : [h] : [], ge = () => /* @__PURE__ */ x(E, { children: [
|
|
124
|
+
/* @__PURE__ */ r(
|
|
125
|
+
Le,
|
|
126
|
+
{
|
|
127
|
+
dataKey: l,
|
|
128
|
+
type: "category",
|
|
129
|
+
hide: !J,
|
|
130
|
+
tickLine: !1,
|
|
131
|
+
axisLine: !1,
|
|
132
|
+
tickMargin: 8,
|
|
133
|
+
tickFormatter: R,
|
|
134
|
+
tick: W ? he : void 0,
|
|
135
|
+
angle: g,
|
|
136
|
+
interval: V,
|
|
137
|
+
textAnchor: _e(g),
|
|
138
|
+
height: ye,
|
|
139
|
+
label: fe
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ r(
|
|
143
|
+
Ne,
|
|
144
|
+
{
|
|
145
|
+
type: "number",
|
|
146
|
+
hide: !Q,
|
|
147
|
+
tickLine: !1,
|
|
148
|
+
axisLine: !1,
|
|
149
|
+
unit: P,
|
|
150
|
+
tickFormatter: U,
|
|
151
|
+
tickCount: ee,
|
|
152
|
+
domain: me,
|
|
153
|
+
width: D ? 72 : void 0,
|
|
154
|
+
label: de
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }), Te = () => /* @__PURE__ */ x(E, { children: [
|
|
158
|
+
k != null && M != null && /* @__PURE__ */ r(
|
|
159
|
+
Me,
|
|
160
|
+
{
|
|
161
|
+
x1: k,
|
|
162
|
+
x2: M,
|
|
163
|
+
fill: "var(--ui-background-surface-secondary)",
|
|
164
|
+
fillOpacity: 0.5,
|
|
165
|
+
ifOverflow: "extendDomain"
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
k != null && /* @__PURE__ */ r(
|
|
169
|
+
B,
|
|
170
|
+
{
|
|
171
|
+
x: k,
|
|
172
|
+
stroke: "var(--ui-border-on-surface-border)",
|
|
173
|
+
strokeDasharray: "4 4"
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] }), be = (e, a) => /* @__PURE__ */ r(
|
|
177
|
+
B,
|
|
61
178
|
{
|
|
62
|
-
|
|
179
|
+
y: e.value,
|
|
180
|
+
stroke: "var(--ui-text-on-surface-secondary)",
|
|
181
|
+
strokeDasharray: "4 4",
|
|
182
|
+
ifOverflow: "extendDomain",
|
|
183
|
+
label: e.label ? {
|
|
184
|
+
value: e.label,
|
|
185
|
+
position: "insideTopRight",
|
|
186
|
+
fill: "var(--ui-text-on-surface-secondary)",
|
|
187
|
+
fontSize: Se
|
|
188
|
+
} : void 0
|
|
189
|
+
},
|
|
190
|
+
`${e.label ?? "threshold"}-${a}`
|
|
191
|
+
), xe = () => L ? (
|
|
192
|
+
// Strips the synthetic band before the caller's tooltip sees it — the
|
|
193
|
+
// `__cone` series feeds the Area, not the tooltip.
|
|
194
|
+
/* @__PURE__ */ r(j, { content: L })
|
|
195
|
+
) : /* @__PURE__ */ r(
|
|
196
|
+
j,
|
|
197
|
+
{
|
|
198
|
+
content: (e) => /* @__PURE__ */ r(
|
|
199
|
+
we,
|
|
200
|
+
{
|
|
201
|
+
active: e.active,
|
|
202
|
+
label: e.label,
|
|
203
|
+
payload: I(e.payload)
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
), Ae = () => /* @__PURE__ */ r(
|
|
208
|
+
Ie,
|
|
209
|
+
{
|
|
210
|
+
content: (e) => /* @__PURE__ */ r(
|
|
211
|
+
Pe,
|
|
212
|
+
{
|
|
213
|
+
verticalAlign: e.verticalAlign,
|
|
214
|
+
payload: We(
|
|
215
|
+
e.payload,
|
|
216
|
+
s.map((a) => a.actualKey)
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
), Ce = ({
|
|
222
|
+
actualKey: e,
|
|
223
|
+
lowerKey: a,
|
|
224
|
+
upperKey: i
|
|
225
|
+
}) => a && i ? /* @__PURE__ */ r(
|
|
226
|
+
z,
|
|
227
|
+
{
|
|
228
|
+
"data-slot": "confidence-cone-band",
|
|
229
|
+
dataKey: A(e),
|
|
230
|
+
type: "monotone",
|
|
231
|
+
stroke: "none",
|
|
232
|
+
fill: `var(--color-${e})`,
|
|
233
|
+
fillOpacity: 0.15,
|
|
234
|
+
connectNulls: !1,
|
|
235
|
+
dot: !1,
|
|
236
|
+
activeDot: !1,
|
|
237
|
+
...b,
|
|
238
|
+
legendType: "none",
|
|
239
|
+
tooltipType: "none"
|
|
240
|
+
},
|
|
241
|
+
A(e)
|
|
242
|
+
) : null, $e = ({ actualKey: e }) => {
|
|
243
|
+
const a = F === "line" ? H : z, i = F === "line" ? void 0 : { fill: `var(--color-${e})`, fillOpacity: 0.15 }, u = p ? {
|
|
244
|
+
r: 3,
|
|
245
|
+
fill: `var(--color-${e})`,
|
|
246
|
+
fillOpacity: 1,
|
|
247
|
+
stroke: `var(--color-${e})`,
|
|
248
|
+
strokeWidth: 2
|
|
249
|
+
} : !1;
|
|
250
|
+
return /* @__PURE__ */ r(
|
|
251
|
+
a,
|
|
252
|
+
{
|
|
253
|
+
dataKey: e,
|
|
254
|
+
type: "monotone",
|
|
255
|
+
stroke: `var(--color-${e})`,
|
|
256
|
+
strokeWidth: K,
|
|
257
|
+
...i,
|
|
258
|
+
dot: u,
|
|
259
|
+
activeDot: p ? { r: 5 } : !1,
|
|
260
|
+
connectNulls: !0,
|
|
261
|
+
...b,
|
|
262
|
+
legendType: "rect"
|
|
263
|
+
},
|
|
264
|
+
e
|
|
265
|
+
);
|
|
266
|
+
}, De = ({
|
|
267
|
+
actualKey: e,
|
|
268
|
+
forecastKey: a
|
|
269
|
+
}) => {
|
|
270
|
+
const i = p ? {
|
|
271
|
+
r: 3,
|
|
272
|
+
fill: "var(--ui-background-surface-primary)",
|
|
273
|
+
stroke: `var(--color-${e})`,
|
|
274
|
+
strokeWidth: 2,
|
|
275
|
+
strokeDasharray: "none"
|
|
276
|
+
} : !1;
|
|
277
|
+
return /* @__PURE__ */ r(
|
|
278
|
+
H,
|
|
279
|
+
{
|
|
280
|
+
dataKey: a,
|
|
281
|
+
type: "monotone",
|
|
282
|
+
stroke: `var(--color-${e})`,
|
|
283
|
+
strokeWidth: K,
|
|
284
|
+
strokeDasharray: "5 5",
|
|
285
|
+
dot: i,
|
|
286
|
+
activeDot: p ? { r: 5 } : !1,
|
|
287
|
+
connectNulls: !0,
|
|
288
|
+
...b
|
|
289
|
+
},
|
|
290
|
+
a
|
|
291
|
+
);
|
|
292
|
+
};
|
|
293
|
+
return /* @__PURE__ */ r("div", { ref: ue, className: Oe(t), ...se, children: /* @__PURE__ */ r(
|
|
294
|
+
je,
|
|
295
|
+
{
|
|
296
|
+
config: ve,
|
|
63
297
|
className: "size-full [&_.recharts-label]:fill-foreground",
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
z,
|
|
298
|
+
children: /* @__PURE__ */ x(Fe, { data: pe, children: [
|
|
299
|
+
G && /* @__PURE__ */ r(
|
|
300
|
+
Ke,
|
|
68
301
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
axisLine: !1,
|
|
73
|
-
tickMargin: 8,
|
|
74
|
-
height: s ? 48 : void 0,
|
|
75
|
-
label: E
|
|
302
|
+
horizontal: oe ?? !0,
|
|
303
|
+
vertical: ne ?? !1,
|
|
304
|
+
strokeDasharray: re ? "3 3" : void 0
|
|
76
305
|
}
|
|
77
306
|
),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
label: j
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
l != null && h != null && /* @__PURE__ */ e(
|
|
90
|
-
S,
|
|
91
|
-
{
|
|
92
|
-
x1: l,
|
|
93
|
-
x2: h,
|
|
94
|
-
fill: "var(--ui-background-surface-secondary)",
|
|
95
|
-
fillOpacity: 0.5,
|
|
96
|
-
ifOverflow: "extendDomain"
|
|
97
|
-
}
|
|
98
|
-
),
|
|
99
|
-
l != null && /* @__PURE__ */ e(
|
|
100
|
-
q,
|
|
101
|
-
{
|
|
102
|
-
x: l,
|
|
103
|
-
stroke: "var(--ui-border-on-surface-border)",
|
|
104
|
-
strokeDasharray: "4 4"
|
|
105
|
-
}
|
|
106
|
-
),
|
|
107
|
-
R && (y ? (
|
|
108
|
-
// Strips the synthetic band before the caller's tooltip sees it
|
|
109
|
-
// — the `__cone` series feeds the Area, not the tooltip.
|
|
110
|
-
/* @__PURE__ */ e(b, { content: y })
|
|
111
|
-
) : /* @__PURE__ */ e(
|
|
112
|
-
b,
|
|
113
|
-
{
|
|
114
|
-
content: (o) => /* @__PURE__ */ e(
|
|
115
|
-
J,
|
|
116
|
-
{
|
|
117
|
-
active: o.active,
|
|
118
|
-
label: o.label,
|
|
119
|
-
payload: m(
|
|
120
|
-
o.payload
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
)),
|
|
126
|
-
_ && /* @__PURE__ */ e(
|
|
127
|
-
P,
|
|
128
|
-
{
|
|
129
|
-
content: (o) => /* @__PURE__ */ e(
|
|
130
|
-
Q,
|
|
131
|
-
{
|
|
132
|
-
verticalAlign: o.verticalAlign,
|
|
133
|
-
payload: m(
|
|
134
|
-
o.payload
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
141
|
-
T,
|
|
142
|
-
{
|
|
143
|
-
dataKey: u,
|
|
144
|
-
type: "monotone",
|
|
145
|
-
stroke: "none",
|
|
146
|
-
fill: `var(--color-${i})`,
|
|
147
|
-
fillOpacity: 0.15,
|
|
148
|
-
connectNulls: !1,
|
|
149
|
-
dot: !1,
|
|
150
|
-
activeDot: !1,
|
|
151
|
-
isAnimationActive: !1,
|
|
152
|
-
legendType: "none",
|
|
153
|
-
tooltipType: "none"
|
|
154
|
-
}
|
|
155
|
-
),
|
|
156
|
-
/* @__PURE__ */ e(
|
|
157
|
-
T,
|
|
158
|
-
{
|
|
159
|
-
dataKey: i,
|
|
160
|
-
type: "monotone",
|
|
161
|
-
stroke: `var(--color-${i})`,
|
|
162
|
-
strokeWidth: v,
|
|
163
|
-
fill: `var(--color-${i})`,
|
|
164
|
-
fillOpacity: 0.15,
|
|
165
|
-
dot: !1,
|
|
166
|
-
activeDot: !1,
|
|
167
|
-
connectNulls: !0,
|
|
168
|
-
isAnimationActive: !1
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
F,
|
|
173
|
-
{
|
|
174
|
-
dataKey: p,
|
|
175
|
-
type: "monotone",
|
|
176
|
-
stroke: `var(--color-${i})`,
|
|
177
|
-
strokeWidth: v,
|
|
178
|
-
strokeDasharray: "5 5",
|
|
179
|
-
dot: !1,
|
|
180
|
-
connectNulls: !0,
|
|
181
|
-
isAnimationActive: !1
|
|
182
|
-
}
|
|
183
|
-
)
|
|
307
|
+
ge(),
|
|
308
|
+
Te(),
|
|
309
|
+
ke.map(be),
|
|
310
|
+
Z && xe(),
|
|
311
|
+
q && Ae(),
|
|
312
|
+
s.map(Ce),
|
|
313
|
+
s.map($e),
|
|
314
|
+
s.map(De)
|
|
184
315
|
] })
|
|
185
316
|
}
|
|
186
317
|
) });
|
|
187
318
|
}
|
|
188
319
|
);
|
|
189
|
-
|
|
320
|
+
qe.displayName = "ConfidenceCone";
|
|
190
321
|
export {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
322
|
+
qe as ConfidenceCone,
|
|
323
|
+
Ye as createConeTooltip,
|
|
324
|
+
Ze as createForecastTick,
|
|
325
|
+
I as dropConeBand,
|
|
326
|
+
Ge as forecastPeriodX,
|
|
327
|
+
We as keepMetricSeries
|
|
194
328
|
};
|
|
195
329
|
//# sourceMappingURL=confidence-cone.js.map
|