import type { DateOperation, DistributionChart, LeaderboardChart, MultipleTimeBasedChart, ObjectiveChart, PercentageChart, SmartChart, TimeBasedChart, ValueChart } from '@forestadmin/datasource-toolkit'; export default class ResultBuilder { private static readonly formats; value(value: number, previousValue?: number): ValueChart; distribution(obj: Record): DistributionChart; /** * Add a TimeBasedChart based on a time range and a set of values. * @param {DateOperation} timeRange - The time range for the chart, * specified as "Year", "Month", "Week" or "Day". * @param {Array<{ date: Date; value: number | null }> | Record} values - * This can be an array of objects with 'date' and 'value' properties, * or a record (object) with date-value pairs. * * @returns {TimeBasedChart} Returns a TimeBasedChart representing the data within the specified * time range. * * @example * timeBased( * 'Day', * [ * { date: new Date('2023-01-01'), value: 42 }, * { date: new Date('2023-01-02'), value: 55 }, * { date: new Date('2023-01-03'), value: null }, * ] * ); */ timeBased(timeRange: DateOperation, values: Array<{ date: Date; value: number | null; }> | Record): TimeBasedChart; /** * Add a MultipleTimeBasedChart based on a time range, * an array of dates, and multiple lines of data. * * @param {DateOperation} timeRange - The time range for the chart, * specified as "Year", "Month", "Week" or "Day". * @param {Date[]} dates - An array of dates that define the x-axis values for the chart. * @param {Array<{ label: string; values: Array }>} lines - An array of lines, * each containing a label and an array of numeric data values (or null) * corresponding to the dates. * * @returns {MultipleTimeBasedChart} Returns a MultipleTimeBasedChart representing multiple * lines of data within the specified time range. * * @example * multipleTimeBased( * 'Day', * [ * new Date('1985-10-26'), * new Date('2011-10-05T14:48:00.000Z'), * new Date() * ], * [ * { label: 'line1', values: [1, 2, 3] }, * { label: 'line2', values: [3, 4, null] } * ], * ); */ multipleTimeBased(timeRange: DateOperation, dates: Date[], lines: Array<{ label: string; values: Array; }>): MultipleTimeBasedChart; percentage(value: number): PercentageChart; objective(value: number, objective: number): ObjectiveChart; leaderboard(obj: Record): LeaderboardChart; smart(data: unknown): SmartChart; private static buildTimeBasedChartResult; } //# sourceMappingURL=result-builder.d.ts.map