@automattic/charts 2.0.1 → 3.1.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/TOKENS.md +109 -50
  3. package/dist/index.cjs +529 -233
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +118 -55
  6. package/dist/index.d.cts +90 -48
  7. package/dist/index.d.ts +90 -48
  8. package/dist/index.js +527 -235
  9. package/dist/index.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/charts/area-chart/area-chart.module.scss +8 -3
  12. package/src/charts/area-chart/area-chart.tsx +25 -25
  13. package/src/charts/area-chart/private/overlays.tsx +3 -3
  14. package/src/charts/area-chart/test/area-chart.test.tsx +301 -11
  15. package/src/charts/area-chart/types.ts +4 -3
  16. package/src/charts/bar-chart/bar-chart.module.scss +14 -6
  17. package/src/charts/bar-chart/bar-chart.tsx +21 -15
  18. package/src/charts/bar-chart/test/bar-chart.test.tsx +255 -2
  19. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +23 -18
  20. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx +107 -86
  21. package/src/charts/conversion-funnel-chart/test/chart-scope.test.tsx +36 -0
  22. package/src/charts/geo-chart/geo-chart.module.scss +8 -0
  23. package/src/charts/geo-chart/geo-chart.tsx +12 -4
  24. package/src/charts/heatmap-chart/heatmap-chart.module.scss +22 -9
  25. package/src/charts/heatmap-chart/heatmap-chart.tsx +43 -13
  26. package/src/charts/heatmap-chart/private/build-calendar-data.ts +65 -5
  27. package/src/charts/heatmap-chart/test/build-calendar-data.test.ts +125 -0
  28. package/src/charts/heatmap-chart/types.ts +8 -0
  29. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +13 -7
  30. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +17 -22
  31. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +107 -1
  32. package/src/charts/leaderboard-chart/types.ts +0 -2
  33. package/src/charts/line-chart/line-chart.module.scss +12 -7
  34. package/src/charts/line-chart/line-chart.tsx +32 -28
  35. package/src/charts/line-chart/private/line-chart-annotation.tsx +4 -4
  36. package/src/charts/line-chart/private/line-chart-annotations-overlay.tsx +2 -2
  37. package/src/charts/line-chart/test/line-chart.test.tsx +262 -5
  38. package/src/charts/line-chart/types.ts +4 -3
  39. package/src/charts/pie-chart/pie-chart.tsx +12 -14
  40. package/src/charts/pie-chart/test/pie-chart.test.tsx +73 -1
  41. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +2 -2
  42. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +12 -14
  43. package/src/charts/private/{single-chart-context/single-chart-context.tsx → chart-instance-context/chart-instance-context.ts} +1 -5
  44. package/src/charts/private/chart-instance-context/index.ts +3 -0
  45. package/src/charts/private/{single-chart-context/use-single-chart-context.ts → chart-instance-context/use-chart-instance-context.ts} +1 -3
  46. package/src/charts/private/svg-empty-state/get-all-hidden-message.ts +41 -0
  47. package/src/charts/private/svg-empty-state/index.ts +1 -0
  48. package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +1 -1
  49. package/src/charts/private/svg-empty-state/test/get-all-hidden-message.test.ts +15 -0
  50. package/src/charts/private/with-responsive/test/with-responsive.test.tsx +16 -0
  51. package/src/charts/private/with-responsive/with-responsive.tsx +18 -11
  52. package/src/charts/private/x-zoom/test/x-zoom.test.tsx +2 -2
  53. package/src/charts/private/x-zoom/x-zoom.module.scss +3 -3
  54. package/src/charts/private/x-zoom/x-zoom.tsx +2 -2
  55. package/src/components/legend/legend.tsx +4 -4
  56. package/src/components/legend/private/base-legend.module.scss +1 -1
  57. package/src/components/legend/private/base-legend.tsx +70 -19
  58. package/src/components/legend/test/legend.test.tsx +100 -4
  59. package/src/components/tooltip/accessible-tooltip.tsx +17 -4
  60. package/src/components/tooltip/base-tooltip.tsx +8 -1
  61. package/src/components/trend-indicator/test/trend-indicator.test.tsx +20 -0
  62. package/src/components/trend-indicator/trend-indicator.module.scss +4 -7
  63. package/src/components/trend-indicator/trend-indicator.tsx +3 -0
  64. package/src/hooks/index.ts +1 -1
  65. package/src/hooks/test/use-xychart-theme-provider-override.test.tsx +28 -0
  66. package/src/hooks/test/use-xychart-theme-style-reads.test.tsx +19 -13
  67. package/src/hooks/test/use-xychart-theme.test.tsx +25 -0
  68. package/src/hooks/{use-interactive-legend-data.ts → use-legend-visibility-data.ts} +29 -30
  69. package/src/hooks/use-xychart-theme.ts +6 -4
  70. package/src/index.ts +12 -3
  71. package/src/providers/chart-context/global-charts-provider.tsx +127 -30
  72. package/src/providers/chart-context/hooks/use-default-hidden-series.ts +47 -0
  73. package/src/providers/chart-context/private/theme-override-vars.ts +87 -0
  74. package/src/providers/chart-context/private/with-catalog-pointers.ts +50 -0
  75. package/src/providers/chart-context/test/chart-context.test.tsx +142 -40
  76. package/src/providers/chart-context/test/chart-scope-class.test.tsx +19 -0
  77. package/src/providers/chart-context/test/sparse-theme.test.ts +35 -0
  78. package/src/providers/chart-context/test/theme-override-vars-guard.test.tsx +29 -0
  79. package/src/providers/chart-context/test/theme-override-vars.test.ts +118 -0
  80. package/src/providers/chart-context/test/use-default-hidden-series-paint.test.tsx +56 -0
  81. package/src/providers/chart-context/test/use-default-hidden-series.ssr.test.tsx +39 -0
  82. package/src/providers/chart-context/test/use-default-hidden-series.test.tsx +222 -0
  83. package/src/providers/chart-context/test/with-catalog-pointers.test.ts +47 -0
  84. package/src/providers/chart-context/themes.ts +18 -27
  85. package/src/providers/chart-context/types.ts +7 -4
  86. package/src/providers/chart-scope/chart-scope-context.ts +8 -0
  87. package/src/providers/chart-scope/index.ts +3 -0
  88. package/src/providers/chart-scope/test/chart-scope.test.tsx +24 -0
  89. package/src/providers/chart-scope/test/use-standalone-scope-class.test.tsx +20 -0
  90. package/src/providers/chart-scope/use-chart-scope-element.ts +9 -0
  91. package/src/providers/chart-scope/use-standalone-scope-class.ts +13 -0
  92. package/src/providers/index.ts +1 -0
  93. package/src/styles/chart-scope-class.ts +6 -0
  94. package/src/styles/chart-scope.scss +83 -0
  95. package/src/styles/test/chart-scope.test.ts +165 -0
  96. package/src/styles/test/wpds-fallbacks.test.ts +131 -0
  97. package/src/types.ts +12 -34
  98. package/src/charts/private/grid-control/grid-control.module.scss +0 -8
  99. package/src/charts/private/grid-control/grid-control.tsx +0 -26
  100. package/src/charts/private/grid-control/index.ts +0 -1
  101. package/src/charts/private/grid-control/test/grid-control.test.tsx +0 -56
  102. package/src/charts/private/single-chart-context/index.ts +0 -8
package/dist/index.d.cts CHANGED
@@ -510,6 +510,17 @@ type SeriesChartLegendConfig = ChartLegendConfig<SeriesData[]> & {
510
510
  */
511
511
  collapseGroups?: boolean;
512
512
  };
513
+ /**
514
+ * Initial visibility options for charts built from labelled series.
515
+ */
516
+ interface SeriesVisibilityProps {
517
+ /**
518
+ * Series labels to hide from the first defined value. User changes persist until
519
+ * the chart remounts or its ID changes; later values for the same ID are ignored.
520
+ * Omit to retain the provider's existing visibility for the chart ID.
521
+ */
522
+ defaultHiddenSeries?: readonly string[];
523
+ }
513
524
  /**
514
525
  * Base properties shared across all chart components
515
526
  */
@@ -604,37 +615,6 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
604
615
  };
605
616
  };
606
617
  };
607
- /**
608
- * Properties for grid components
609
- */
610
- type GridProps = {
611
- /**
612
- * Width of the grid in pixels
613
- */
614
- width: number;
615
- /**
616
- * Height of the grid in pixels
617
- */
618
- height: number;
619
- /**
620
- * Grid visibility. x is default.
621
- */
622
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
623
- /**
624
- * X-axis scale for the grid
625
- * TODO: Fix any type after resolving visx scale type issues
626
- */
627
- xScale: any;
628
- /**
629
- * Y-axis scale for the grid
630
- * TODO: Fix any type after resolving visx scale type issues
631
- */
632
- yScale: any;
633
- /**
634
- * Top offset for the grid
635
- */
636
- top?: number;
637
- };
638
618
  //#endregion
639
619
  //#region src/components/legend/types.d.ts
640
620
  type VisxLegendProps = Pick<ComponentProps<typeof LegendOrdinal>, 'className' | 'shape' | 'fill' | 'size' | 'labelFormat' | 'labelTransform'>;
@@ -711,7 +691,7 @@ interface ChartLegendOptions {
711
691
  */
712
692
  declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
713
693
  //#endregion
714
- //#region src/charts/private/single-chart-context/single-chart-context.d.ts
694
+ //#region src/charts/private/chart-instance-context/chart-instance-context.d.ts
715
695
  interface ChartInstanceRef {
716
696
  getScales: () => {
717
697
  xScale: unknown;
@@ -728,7 +708,6 @@ interface ChartInstanceRef {
728
708
  };
729
709
  };
730
710
  }
731
- type SingleChartRef = ChartInstanceRef;
732
711
  //#endregion
733
712
  //#region src/visx/types.d.ts
734
713
  type RenderTooltipParams<Datum extends object> = TooltipContextType<Datum> & {
@@ -775,7 +754,7 @@ type RenderLineGlyphProps<Datum extends object> = GlyphProps<Datum> & {
775
754
  glyphStyle?: SVGProps<SVGCircleElement>;
776
755
  position?: 'start' | 'end';
777
756
  };
778
- interface LineChartProps extends BaseChartProps<SeriesData[]> {
757
+ interface LineChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
779
758
  /**
780
759
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
781
760
  */
@@ -800,8 +779,8 @@ interface LineChartProps extends BaseChartProps<SeriesData[]> {
800
779
  */
801
780
  zoomable?: boolean;
802
781
  /**
803
- * Whether the Y axis rescales to fit only the visible series when series are
804
- * hidden or shown through the interactive legend.
782
+ * Whether the Y axis rescales to fit only the visible series when the set of
783
+ * visible series changes — via the interactive legend or otherwise.
805
784
  * Defaults to `true` (the pre-existing behaviour). Set to `false` to pin the Y
806
785
  * axis to the full data extent so hiding series does not move the chart's
807
786
  * baseline — useful for comparison charts. Matches `AreaChart`.
@@ -816,7 +795,7 @@ type TooltipDatum = {
816
795
  };
817
796
  //#endregion
818
797
  //#region src/charts/area-chart/types.d.ts
819
- interface AreaChartProps extends BaseChartProps<SeriesData[]> {
798
+ interface AreaChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
820
799
  /**
821
800
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
822
801
  */
@@ -871,8 +850,8 @@ interface AreaChartProps extends BaseChartProps<SeriesData[]> {
871
850
  */
872
851
  zoomable?: boolean;
873
852
  /**
874
- * Whether the Y axis rescales to fit only the visible series when series are
875
- * hidden or shown through the interactive legend.
853
+ * Whether the Y axis rescales to fit only the visible series when the set of
854
+ * visible series changes — via the interactive legend or otherwise.
876
855
  * Defaults to `true`, matching LineChart. Set to `false` to pin the Y axis to
877
856
  * the full data extent so hiding series does not move the chart's baseline.
878
857
  * @default true
@@ -914,13 +893,13 @@ type AreaChartSubComponents = {
914
893
  Legend: typeof Legend;
915
894
  };
916
895
  type AreaChartBaseProps = Optional<AreaChartProps, 'width' | 'height' | 'size'>;
917
- type AreaChartComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
918
- type AreaChartResponsiveComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
896
+ type AreaChartComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & React.RefAttributes<ChartInstanceRef>> & AreaChartSubComponents;
897
+ type AreaChartResponsiveComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & ResponsiveConfig & React.RefAttributes<ChartInstanceRef>> & AreaChartSubComponents;
919
898
  declare const AreaChart: AreaChartComponent;
920
899
  declare const AreaChartResponsive: AreaChartResponsiveComponent;
921
900
  //#endregion
922
901
  //#region src/charts/bar-chart/bar-chart.d.ts
923
- interface BarChartProps extends BaseChartProps<SeriesData[]> {
902
+ interface BarChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
924
903
  /**
925
904
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
926
905
  */
@@ -1184,6 +1163,14 @@ type HeatmapCell = {
1184
1163
  * days completing the first/last week fall outside the covered range.
1185
1164
  */
1186
1165
  hidden?: boolean;
1166
+ /**
1167
+ * Paint the cell as a faded empty slot that carries no claim about the day:
1168
+ * it is set apart from a measured day that scored zero, and skipped by
1169
+ * hover, tooltips, keyboard navigation and the accessibility tree. For grid
1170
+ * filler — slots drawn only so a short range still fills its container,
1171
+ * which were never measured.
1172
+ */
1173
+ placeholder?: boolean;
1187
1174
  };
1188
1175
  /** A heatmap column (rendered left→right); its cells render top→bottom. */
1189
1176
  type HeatmapColumn = {
@@ -1249,6 +1236,19 @@ declare const buildCalendarHeatmapData: (series: DataPointDate[], options?: {
1249
1236
  * blank cells even when the series has no entry for them.
1250
1237
  */
1251
1238
  hideOutOfRangeDays?: boolean;
1239
+ /**
1240
+ * Draw the grid over this span (`yyyy-MM-dd` bounds) instead of the
1241
+ * series' own. Days inside the grid but outside the series become
1242
+ * placeholder cells: painted as empty slots so a short series still
1243
+ * fills its container, but reporting nothing, since they were never
1244
+ * measured. A start bound is drawn from the beginning of its week, so
1245
+ * the grid always opens on a whole column. Bounds narrower than the
1246
+ * series are ignored — the grid never drops a day that carries data.
1247
+ */
1248
+ gridSpan?: {
1249
+ start?: string;
1250
+ end?: string;
1251
+ };
1252
1252
  }) => CalendarHeatmapResult;
1253
1253
  //#endregion
1254
1254
  //#region src/charts/heatmap-chart/private/heatmap-legend.d.ts
@@ -1310,8 +1310,7 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
1310
1310
  * Custom styling for the chart container
1311
1311
  */
1312
1312
  style?: React.CSSProperties & {
1313
- '--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
1314
- '--a8c--charts--leaderboard--bar--border-radius'?: string;
1313
+ '--a8c-charts-border-radius-leaderboard-bar'?: string;
1315
1314
  };
1316
1315
  /**
1317
1316
  * Custom labels for legend items
@@ -1560,6 +1559,21 @@ declare const relativeLuminance: (hex: string) => number;
1560
1559
  */
1561
1560
  declare const prefersLightText: (backgroundHex: string) => boolean;
1562
1561
  //#endregion
1562
+ //#region src/utils/resolve-css-var.d.ts
1563
+ /**
1564
+ * Resolves a CSS custom property (variable) to its computed value.
1565
+ * Handles multiple formats:
1566
+ * - Plain variable names: '--my-color'
1567
+ * - CSS var() syntax: 'var(--my-color)'
1568
+ * - CSS var() with fallback: 'var(--my-color, #ffffff)'
1569
+ * - Regular values (returned as-is): '#ffffff', 'red'
1570
+ *
1571
+ * @param value - A CSS variable name, var() expression, or regular value
1572
+ * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)
1573
+ * @return The resolved value, fallback value, or null if unresolvable
1574
+ */
1575
+ declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1576
+ //#endregion
1563
1577
  //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1564
1578
  /**
1565
1579
  * Hook to create legend items from leaderboard data
@@ -1609,8 +1623,8 @@ type LineChartAnnotationComponents = {
1609
1623
  Legend: typeof Legend;
1610
1624
  };
1611
1625
  type LineChartBaseProps = Optional<LineChartProps, 'width' | 'height' | 'size'>;
1612
- type LineChartComponent = React.ForwardRefExoticComponent<LineChartBaseProps & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1613
- type LineChartResponsiveComponent = React.ForwardRefExoticComponent<LineChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1626
+ type LineChartComponent = React.ForwardRefExoticComponent<LineChartBaseProps & React.RefAttributes<ChartInstanceRef>> & LineChartAnnotationComponents;
1627
+ type LineChartResponsiveComponent = React.ForwardRefExoticComponent<LineChartBaseProps & ResponsiveConfig & React.RefAttributes<ChartInstanceRef>> & LineChartAnnotationComponents;
1614
1628
  declare const LineChart: LineChartComponent;
1615
1629
  declare const LineChartResponsive: LineChartResponsiveComponent;
1616
1630
  //#endregion
@@ -2042,8 +2056,13 @@ interface GlobalChartsContextValue {
2042
2056
  getChartData: (id: string) => ChartRegistration | undefined;
2043
2057
  theme: CompleteChartTheme;
2044
2058
  getElementStyles: (params: GetElementStylesParams) => ElementStyles;
2045
- resolveThemeColor: (value: string) => string;
2046
2059
  toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
2060
+ setSeriesVisibility: (chartId: string, seriesLabel: string, visible: boolean) => void;
2061
+ setChartHiddenSeries: (chartId: string, seriesLabels: readonly string[]) => void;
2062
+ /** Applies a chart's defaults once. A no-op for a chart that has already been seeded. */
2063
+ seedChartHiddenSeries: (chartId: string, seriesLabels: readonly string[]) => void;
2064
+ /** Whether this chart's defaults have already been seeded, in this or an earlier mount. */
2065
+ hasSeededChart: (chartId: string) => boolean;
2047
2066
  isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
2048
2067
  getHiddenSeries: (chartId: string) => Set<string>;
2049
2068
  isColorPaletteResolved: boolean;
@@ -2060,6 +2079,21 @@ declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2060
2079
  //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
2061
2080
  declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2062
2081
  //#endregion
2082
+ //#region src/providers/chart-context/hooks/use-chart-registration.d.ts
2083
+ declare const useChartRegistration: ({
2084
+ chartId,
2085
+ legendItems,
2086
+ chartType,
2087
+ isDataValid,
2088
+ metadata
2089
+ }: {
2090
+ chartId: string;
2091
+ legendItems: BaseLegendItem[];
2092
+ chartType: ChartType;
2093
+ isDataValid: boolean;
2094
+ metadata?: Record<string, unknown>;
2095
+ }) => void;
2096
+ //#endregion
2063
2097
  //#region src/providers/chart-context/hooks/use-global-charts-theme.d.ts
2064
2098
  /**
2065
2099
  * Hook to get the global chart theme from GlobalChartsProvider
@@ -2074,5 +2108,13 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
2074
2108
  */
2075
2109
  declare const defaultTheme: CompleteChartTheme;
2076
2110
  //#endregion
2077
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridProps, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2111
+ //#region src/providers/chart-scope/use-chart-scope-element.d.ts
2112
+ /**
2113
+ * Returns the nearest chart scope element, or `null` when rendered outside any scope (and during SSR, before the ref is attached).
2114
+ *
2115
+ * @return {HTMLElement | null} The nearest chart scope element, or `null`.
2116
+ */
2117
+ declare const useChartScopeElement: () => HTMLElement | null;
2118
+ //#endregion
2119
+ export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, type SeriesVisibilityProps, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, resolveCssVariable, useChartLegendItems, useChartRegistration, useChartScopeElement, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2078
2120
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -510,6 +510,17 @@ type SeriesChartLegendConfig = ChartLegendConfig<SeriesData[]> & {
510
510
  */
511
511
  collapseGroups?: boolean;
512
512
  };
513
+ /**
514
+ * Initial visibility options for charts built from labelled series.
515
+ */
516
+ interface SeriesVisibilityProps {
517
+ /**
518
+ * Series labels to hide from the first defined value. User changes persist until
519
+ * the chart remounts or its ID changes; later values for the same ID are ignored.
520
+ * Omit to retain the provider's existing visibility for the chart ID.
521
+ */
522
+ defaultHiddenSeries?: readonly string[];
523
+ }
513
524
  /**
514
525
  * Base properties shared across all chart components
515
526
  */
@@ -604,37 +615,6 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
604
615
  };
605
616
  };
606
617
  };
607
- /**
608
- * Properties for grid components
609
- */
610
- type GridProps = {
611
- /**
612
- * Width of the grid in pixels
613
- */
614
- width: number;
615
- /**
616
- * Height of the grid in pixels
617
- */
618
- height: number;
619
- /**
620
- * Grid visibility. x is default.
621
- */
622
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
623
- /**
624
- * X-axis scale for the grid
625
- * TODO: Fix any type after resolving visx scale type issues
626
- */
627
- xScale: any;
628
- /**
629
- * Y-axis scale for the grid
630
- * TODO: Fix any type after resolving visx scale type issues
631
- */
632
- yScale: any;
633
- /**
634
- * Top offset for the grid
635
- */
636
- top?: number;
637
- };
638
618
  //#endregion
639
619
  //#region src/components/legend/types.d.ts
640
620
  type VisxLegendProps = Pick<ComponentProps<typeof LegendOrdinal>, 'className' | 'shape' | 'fill' | 'size' | 'labelFormat' | 'labelTransform'>;
@@ -711,7 +691,7 @@ interface ChartLegendOptions {
711
691
  */
712
692
  declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
713
693
  //#endregion
714
- //#region src/charts/private/single-chart-context/single-chart-context.d.ts
694
+ //#region src/charts/private/chart-instance-context/chart-instance-context.d.ts
715
695
  interface ChartInstanceRef {
716
696
  getScales: () => {
717
697
  xScale: unknown;
@@ -728,7 +708,6 @@ interface ChartInstanceRef {
728
708
  };
729
709
  };
730
710
  }
731
- type SingleChartRef = ChartInstanceRef;
732
711
  //#endregion
733
712
  //#region src/visx/types.d.ts
734
713
  type RenderTooltipParams<Datum extends object> = TooltipContextType<Datum> & {
@@ -775,7 +754,7 @@ type RenderLineGlyphProps<Datum extends object> = GlyphProps<Datum> & {
775
754
  glyphStyle?: SVGProps<SVGCircleElement>;
776
755
  position?: 'start' | 'end';
777
756
  };
778
- interface LineChartProps extends BaseChartProps<SeriesData[]> {
757
+ interface LineChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
779
758
  /**
780
759
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
781
760
  */
@@ -800,8 +779,8 @@ interface LineChartProps extends BaseChartProps<SeriesData[]> {
800
779
  */
801
780
  zoomable?: boolean;
802
781
  /**
803
- * Whether the Y axis rescales to fit only the visible series when series are
804
- * hidden or shown through the interactive legend.
782
+ * Whether the Y axis rescales to fit only the visible series when the set of
783
+ * visible series changes — via the interactive legend or otherwise.
805
784
  * Defaults to `true` (the pre-existing behaviour). Set to `false` to pin the Y
806
785
  * axis to the full data extent so hiding series does not move the chart's
807
786
  * baseline — useful for comparison charts. Matches `AreaChart`.
@@ -816,7 +795,7 @@ type TooltipDatum = {
816
795
  };
817
796
  //#endregion
818
797
  //#region src/charts/area-chart/types.d.ts
819
- interface AreaChartProps extends BaseChartProps<SeriesData[]> {
798
+ interface AreaChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
820
799
  /**
821
800
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
822
801
  */
@@ -871,8 +850,8 @@ interface AreaChartProps extends BaseChartProps<SeriesData[]> {
871
850
  */
872
851
  zoomable?: boolean;
873
852
  /**
874
- * Whether the Y axis rescales to fit only the visible series when series are
875
- * hidden or shown through the interactive legend.
853
+ * Whether the Y axis rescales to fit only the visible series when the set of
854
+ * visible series changes — via the interactive legend or otherwise.
876
855
  * Defaults to `true`, matching LineChart. Set to `false` to pin the Y axis to
877
856
  * the full data extent so hiding series does not move the chart's baseline.
878
857
  * @default true
@@ -914,13 +893,13 @@ type AreaChartSubComponents = {
914
893
  Legend: typeof Legend;
915
894
  };
916
895
  type AreaChartBaseProps = Optional<AreaChartProps, 'width' | 'height' | 'size'>;
917
- type AreaChartComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
918
- type AreaChartResponsiveComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & AreaChartSubComponents;
896
+ type AreaChartComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & React.RefAttributes<ChartInstanceRef>> & AreaChartSubComponents;
897
+ type AreaChartResponsiveComponent = React.ForwardRefExoticComponent<AreaChartBaseProps & ResponsiveConfig & React.RefAttributes<ChartInstanceRef>> & AreaChartSubComponents;
919
898
  declare const AreaChart: AreaChartComponent;
920
899
  declare const AreaChartResponsive: AreaChartResponsiveComponent;
921
900
  //#endregion
922
901
  //#region src/charts/bar-chart/bar-chart.d.ts
923
- interface BarChartProps extends BaseChartProps<SeriesData[]> {
902
+ interface BarChartProps extends BaseChartProps<SeriesData[]>, SeriesVisibilityProps {
924
903
  /**
925
904
  * Legend configuration. Supports `collapseGroups` on top of the shared options.
926
905
  */
@@ -1184,6 +1163,14 @@ type HeatmapCell = {
1184
1163
  * days completing the first/last week fall outside the covered range.
1185
1164
  */
1186
1165
  hidden?: boolean;
1166
+ /**
1167
+ * Paint the cell as a faded empty slot that carries no claim about the day:
1168
+ * it is set apart from a measured day that scored zero, and skipped by
1169
+ * hover, tooltips, keyboard navigation and the accessibility tree. For grid
1170
+ * filler — slots drawn only so a short range still fills its container,
1171
+ * which were never measured.
1172
+ */
1173
+ placeholder?: boolean;
1187
1174
  };
1188
1175
  /** A heatmap column (rendered left→right); its cells render top→bottom. */
1189
1176
  type HeatmapColumn = {
@@ -1249,6 +1236,19 @@ declare const buildCalendarHeatmapData: (series: DataPointDate[], options?: {
1249
1236
  * blank cells even when the series has no entry for them.
1250
1237
  */
1251
1238
  hideOutOfRangeDays?: boolean;
1239
+ /**
1240
+ * Draw the grid over this span (`yyyy-MM-dd` bounds) instead of the
1241
+ * series' own. Days inside the grid but outside the series become
1242
+ * placeholder cells: painted as empty slots so a short series still
1243
+ * fills its container, but reporting nothing, since they were never
1244
+ * measured. A start bound is drawn from the beginning of its week, so
1245
+ * the grid always opens on a whole column. Bounds narrower than the
1246
+ * series are ignored — the grid never drops a day that carries data.
1247
+ */
1248
+ gridSpan?: {
1249
+ start?: string;
1250
+ end?: string;
1251
+ };
1252
1252
  }) => CalendarHeatmapResult;
1253
1253
  //#endregion
1254
1254
  //#region src/charts/heatmap-chart/private/heatmap-legend.d.ts
@@ -1310,8 +1310,7 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
1310
1310
  * Custom styling for the chart container
1311
1311
  */
1312
1312
  style?: React.CSSProperties & {
1313
- '--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
1314
- '--a8c--charts--leaderboard--bar--border-radius'?: string;
1313
+ '--a8c-charts-border-radius-leaderboard-bar'?: string;
1315
1314
  };
1316
1315
  /**
1317
1316
  * Custom labels for legend items
@@ -1560,6 +1559,21 @@ declare const relativeLuminance: (hex: string) => number;
1560
1559
  */
1561
1560
  declare const prefersLightText: (backgroundHex: string) => boolean;
1562
1561
  //#endregion
1562
+ //#region src/utils/resolve-css-var.d.ts
1563
+ /**
1564
+ * Resolves a CSS custom property (variable) to its computed value.
1565
+ * Handles multiple formats:
1566
+ * - Plain variable names: '--my-color'
1567
+ * - CSS var() syntax: 'var(--my-color)'
1568
+ * - CSS var() with fallback: 'var(--my-color, #ffffff)'
1569
+ * - Regular values (returned as-is): '#ffffff', 'red'
1570
+ *
1571
+ * @param value - A CSS variable name, var() expression, or regular value
1572
+ * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)
1573
+ * @return The resolved value, fallback value, or null if unresolvable
1574
+ */
1575
+ declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1576
+ //#endregion
1563
1577
  //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1564
1578
  /**
1565
1579
  * Hook to create legend items from leaderboard data
@@ -1609,8 +1623,8 @@ type LineChartAnnotationComponents = {
1609
1623
  Legend: typeof Legend;
1610
1624
  };
1611
1625
  type LineChartBaseProps = Optional<LineChartProps, 'width' | 'height' | 'size'>;
1612
- type LineChartComponent = React.ForwardRefExoticComponent<LineChartBaseProps & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1613
- type LineChartResponsiveComponent = React.ForwardRefExoticComponent<LineChartBaseProps & ResponsiveConfig & React.RefAttributes<SingleChartRef>> & LineChartAnnotationComponents;
1626
+ type LineChartComponent = React.ForwardRefExoticComponent<LineChartBaseProps & React.RefAttributes<ChartInstanceRef>> & LineChartAnnotationComponents;
1627
+ type LineChartResponsiveComponent = React.ForwardRefExoticComponent<LineChartBaseProps & ResponsiveConfig & React.RefAttributes<ChartInstanceRef>> & LineChartAnnotationComponents;
1614
1628
  declare const LineChart: LineChartComponent;
1615
1629
  declare const LineChartResponsive: LineChartResponsiveComponent;
1616
1630
  //#endregion
@@ -2042,8 +2056,13 @@ interface GlobalChartsContextValue {
2042
2056
  getChartData: (id: string) => ChartRegistration | undefined;
2043
2057
  theme: CompleteChartTheme;
2044
2058
  getElementStyles: (params: GetElementStylesParams) => ElementStyles;
2045
- resolveThemeColor: (value: string) => string;
2046
2059
  toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
2060
+ setSeriesVisibility: (chartId: string, seriesLabel: string, visible: boolean) => void;
2061
+ setChartHiddenSeries: (chartId: string, seriesLabels: readonly string[]) => void;
2062
+ /** Applies a chart's defaults once. A no-op for a chart that has already been seeded. */
2063
+ seedChartHiddenSeries: (chartId: string, seriesLabels: readonly string[]) => void;
2064
+ /** Whether this chart's defaults have already been seeded, in this or an earlier mount. */
2065
+ hasSeededChart: (chartId: string) => boolean;
2047
2066
  isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
2048
2067
  getHiddenSeries: (chartId: string) => Set<string>;
2049
2068
  isColorPaletteResolved: boolean;
@@ -2060,6 +2079,21 @@ declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2060
2079
  //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
2061
2080
  declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2062
2081
  //#endregion
2082
+ //#region src/providers/chart-context/hooks/use-chart-registration.d.ts
2083
+ declare const useChartRegistration: ({
2084
+ chartId,
2085
+ legendItems,
2086
+ chartType,
2087
+ isDataValid,
2088
+ metadata
2089
+ }: {
2090
+ chartId: string;
2091
+ legendItems: BaseLegendItem[];
2092
+ chartType: ChartType;
2093
+ isDataValid: boolean;
2094
+ metadata?: Record<string, unknown>;
2095
+ }) => void;
2096
+ //#endregion
2063
2097
  //#region src/providers/chart-context/hooks/use-global-charts-theme.d.ts
2064
2098
  /**
2065
2099
  * Hook to get the global chart theme from GlobalChartsProvider
@@ -2074,5 +2108,13 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
2074
2108
  */
2075
2109
  declare const defaultTheme: CompleteChartTheme;
2076
2110
  //#endregion
2077
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridProps, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2111
+ //#region src/providers/chart-scope/use-chart-scope-element.d.ts
2112
+ /**
2113
+ * Returns the nearest chart scope element, or `null` when rendered outside any scope (and during SSR, before the ref is attached).
2114
+ *
2115
+ * @return {HTMLElement | null} The nearest chart scope element, or `null`.
2116
+ */
2117
+ declare const useChartScopeElement: () => HTMLElement | null;
2118
+ //#endregion
2119
+ export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, type SeriesVisibilityProps, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, resolveCssVariable, useChartLegendItems, useChartRegistration, useChartScopeElement, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2078
2120
  //# sourceMappingURL=index.d.ts.map