@lobehub/charts
Version:
React modern charts components built on recharts
30 lines (29 loc) • 991 B
TypeScript
import type { Day as WeekDay } from 'date-fns';
import type { Activity, Week } from "../types/charts";
export declare const DEFAULT_MONTH_LABELS: string[];
export declare const DEFAULT_LABELS: {
legend: {
less: string;
more: string;
};
months: string[];
tooltip: string;
totalCount: string;
weekdays: string[];
};
interface MonthLabel {
label: string;
weekIndex: number;
}
export declare const groupByWeeks: (activities: Array<Activity>, weekStart?: WeekDay) => Array<Week>;
export declare const getMonthLabels: (weeks: Array<Week>, monthNames?: Array<string>) => Array<MonthLabel>;
export declare const generateEmptyData: () => Array<Activity>;
export declare const generateTestData: (args: {
interval?: {
end: Date;
start: Date;
};
maxLevel?: number;
}) => Array<Activity>;
export declare const maxWeekdayLabelLength: (firstWeek: Week, weekStart: number, labels: string[], fontSize: number) => number;
export {};