import type { ChartType, LegendOptions, TooltipOptions, Plugin } from 'chart.js'; import type { FmChartDataLabelsOptions } from '../../../components/chart'; export interface PieDataset { label: string; data: number[]; backgroundColor?: string[] | string; hoverOffset?: number; datalabels: FmChartDataLabelsOptions; } type FmPieProp = { /** * chart name */ name?: string; /** * chart type */ variant: Extract; /** * chart paragraph */ paragraph?: string; /** * datasets * Should only have one dataset */ datasets: PieDataset[]; /** * metrics * Each categories */ metrics: string[]; /** * legends */ legend?: Partial>>; /** * text * the text in the middle for doughnut */ text?: string; /** * textColor * color for the middle text */ textColor?: string; /** * textStyle * this should only use the font css style */ textStyle?: string; /** * maintain the Aspect ratio so it will always make a sizable chart */ maintainAspectRatio?: boolean; percentage?: string; /** * customize tooltip */ tooltip?: Omit>, 'callbacks'> & { callbacks?: TooltipOptions>['callbacks']; }; /** * custom chart plugins */ plugins?: Plugin<'pie' | 'doughnut'>[]; /** * customize datalabels */ datalabels?: Partial; /** * custom chart height */ height?: string; /** * custom chart width */ width?: string; }; declare const _default: __VLS_WithTemplateSlots, { name: undefined; paragraph: undefined; legend: undefined; text: undefined; textColor: string; textStyle: string; maintainAspectRatio: boolean; percentage: undefined; datalabels: undefined; height: undefined; width: undefined; }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly, { name: undefined; paragraph: undefined; legend: undefined; text: undefined; textColor: string; textStyle: string; maintainAspectRatio: boolean; percentage: undefined; datalabels: undefined; height: undefined; width: undefined; }>>>, { name: string; legend: Partial>; text: string; textColor: string; width: string; height: string; paragraph: string; maintainAspectRatio: boolean; datalabels: Partial; textStyle: string; percentage: string; }, {}>, { title?(_: {}): any; }>; export default _default; type __VLS_NonUndefinedable = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: import('vue').PropType<__VLS_NonUndefinedable>; } : { type: import('vue').PropType; required: true; }; }; type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };