Skip to content

Commit 74cee06

Browse files
tlabajdlabrecq
andauthored
fix(charts) - ChartLegendTooltip.title has wrong type (#10129) (#10131)
Co-authored-by: Dan Labrecque <[email protected]>
1 parent 3406ab6 commit 74cee06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { getTheme } from '../ChartUtils/chart-theme';
2828
*
2929
* See https://github.com/FormidableLabs/victory/blob/main/packages/victory-tooltip/src/index.d.ts
3030
*/
31-
export interface ChartLegendTooltipProps extends ChartCursorTooltipProps {
31+
export interface ChartLegendTooltipProps extends Omit<ChartCursorTooltipProps, 'title'> {
3232
/**
3333
* The active prop specifies whether the tooltip component should be displayed.
3434
*/
@@ -295,8 +295,11 @@ export interface ChartLegendTooltipProps extends ChartCursorTooltipProps {
295295
themeColor?: string;
296296
/**
297297
* The title prop specifies a title to render with the legend.
298+
*
299+
* @propType number | string | Function | string[]
300+
* @example title={(datum) => datum.x}
298301
*/
299-
title?: string;
302+
title?: string[] | StringOrNumberOrCallback;
300303
/**
301304
* This prop refers to the width of the svg that ChartLegendTooltip is rendered within. This prop is passed from
302305
* parents of ChartLegendTooltip, and should not be set manually. In versions before ^33.0.0 this prop referred to the

0 commit comments

Comments
 (0)