1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add tooltipLabels field to ChartData

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-04-07 15:16:32 +03:00
parent 7c34ba36a6
commit 7b44690efe

View File

@ -13,6 +13,7 @@ import { Badge } from "../badge";
export interface ChartData extends ChartJS.ChartData { export interface ChartData extends ChartJS.ChartData {
datasets?: ChartDataSets[]; datasets?: ChartDataSets[];
tooltipLabels?: ChartTooltipLabel[];
} }
export interface ChartDataSets extends ChartJS.ChartDataSets { export interface ChartDataSets extends ChartJS.ChartDataSets {
@ -36,6 +37,8 @@ export interface ChartProps {
className?: string; className?: string;
} }
type ChartTooltipLabel = (percent: string) => string | string;
export enum ChartKind { export enum ChartKind {
PIE = "pie", PIE = "pie",
BAR = "bar", BAR = "bar",