claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
74 lines • 1.75 kB
TypeScript
type ChartType = 'line' | 'bar' | 'pie' | 'area' | 'scatter' | 'sparkline';
interface ChartDataset {
label?: string;
data: any[];
backgroundColor?: string | string[];
borderColor?: string;
borderWidth?: number;
fill?: boolean;
tension?: number;
pointRadius?: number;
pointHoverRadius?: number;
}
interface ChartData {
labels?: string[];
datasets: ChartDataset[];
}
interface ChartOptions {
responsive?: boolean;
maintainAspectRatio?: boolean;
aspectRatio?: number;
plugins?: {
legend?: {
display?: boolean;
position?: 'top' | 'bottom' | 'left' | 'right';
};
title?: {
display?: boolean;
text?: string;
};
tooltip?: {
enabled?: boolean;
mode?: string;
};
};
scales?: {
x?: {
display?: boolean;
title?: {
display?: boolean;
text?: string;
};
grid?: {
display?: boolean;
};
};
y?: {
display?: boolean;
title?: {
display?: boolean;
text?: string;
};
grid?: {
display?: boolean;
};
};
};
animation?: {
duration?: number;
};
}
interface Props {
type?: ChartType;
data?: ChartData;
options?: ChartOptions;
width?: number;
height?: number;
class?: string;
ariaLabel?: string;
ariaDescription?: string;
}
declare const Chart: import("svelte").Component<Props, {}, "">;
type Chart = ReturnType<typeof Chart>;
export default Chart;
//# sourceMappingURL=Chart.svelte.d.ts.map