@mui/x-charts
Version:
The community edition of MUI X Charts components.
62 lines • 1.68 kB
TypeScript
import { UseChartPolarAxisSignature } from "../../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
import { AxisId } from "../../models/axis.js";
import { DefaultizedRadarSeriesType } from "../../models/seriesType/radar.js";
import { ChartInstance } from "../../internals/plugins/models/index.js";
interface UseRadarAxisHighlightParams {
/**
* If true, coordinates of the previous/next point will be added.
*/
includesNeighbors?: boolean;
}
interface UseRadarAxisHighlightReturnValue {
/**
* The radar center.
*/
center: {
cx: number;
cy: number;
};
/**
* The radar radius.
*/
radius: number;
/**
* The index of the highlighted axis.
*/
highlightedIndex: number;
/**
* The id of the highlighted axis.
*/
highlightedMetric: AxisId;
/**
* The angle (in radians) of the highlighted axis.
*/
highlightedAngle: number;
/**
* The radar series.
*/
series: DefaultizedRadarSeriesType[];
/**
* The { x, y, value } values for the highlighted points in the same order as the `series` array.
* If `includesNeighbors` is set to `true` it also contains the information for `previous` and `next` data point.
*/
points: Points[];
/**
* Charts instances giving access to `polar2svg` and `svg2polar` helpers.
*/
instance: ChartInstance<[UseChartPolarAxisSignature], []>;
}
interface Point {
x: number;
y: number;
r: number;
angle: number;
value: number;
}
interface Points {
highlighted: Point;
previous?: Point;
next?: Point;
}
export declare function useRadarAxisHighlight(params?: UseRadarAxisHighlightParams): UseRadarAxisHighlightReturnValue | null;
export {};