diff --git a/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx b/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx index 326f12ef6f4b..c4da5f03a666 100644 --- a/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx +++ b/packages/x-charts/src/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.tsx @@ -6,7 +6,7 @@ import { useSeries } from '../hooks/useSeries'; import { useSvgRef } from '../hooks'; import { useCartesianContext } from '../context/CartesianProvider'; -type AxisData = { +export type ChartsAxisData = { dataIndex: number; axisValue?: number | Date | string; seriesValues: Record; @@ -19,7 +19,7 @@ export interface ChartsOnAxisClickHandlerProps { * @param {MouseEvent} event The mouse event recorded on the `` element. * @param {null | AxisData} data The data about the clicked axis and items associated with it. */ - onAxisClick?: (event: MouseEvent, data: null | AxisData) => void; + onAxisClick?: (event: MouseEvent, data: null | ChartsAxisData) => void; } function ChartsOnAxisClickHandler(props: ChartsOnAxisClickHandlerProps) { diff --git a/scripts/x-charts-pro.exports.json b/scripts/x-charts-pro.exports.json index 22db3a452177..28020ea97fb9 100644 --- a/scripts/x-charts-pro.exports.json +++ b/scripts/x-charts-pro.exports.json @@ -61,6 +61,7 @@ { "name": "ChartsAxisClasses", "kind": "Interface" }, { "name": "ChartsAxisClassKey", "kind": "TypeAlias" }, { "name": "ChartsAxisContentProps", "kind": "TypeAlias" }, + { "name": "ChartsAxisData", "kind": "TypeAlias" }, { "name": "ChartsAxisHighlight", "kind": "Function" }, { "name": "chartsAxisHighlightClasses", "kind": "Variable" }, { "name": "ChartsAxisHighlightClasses", "kind": "Interface" }, diff --git a/scripts/x-charts.exports.json b/scripts/x-charts.exports.json index e95e714b9698..312af2248e5a 100644 --- a/scripts/x-charts.exports.json +++ b/scripts/x-charts.exports.json @@ -59,6 +59,7 @@ { "name": "ChartsAxisClasses", "kind": "Interface" }, { "name": "ChartsAxisClassKey", "kind": "TypeAlias" }, { "name": "ChartsAxisContentProps", "kind": "TypeAlias" }, + { "name": "ChartsAxisData", "kind": "TypeAlias" }, { "name": "ChartsAxisHighlight", "kind": "Function" }, { "name": "chartsAxisHighlightClasses", "kind": "Variable" }, { "name": "ChartsAxisHighlightClasses", "kind": "Interface" },