/** * Generates and logs a bar chart. The data is expected to be sorted. * * @example * ```typescript * const data = [ * { category: 'A', value: 10 }, * { category: 'B', value: 20 }, * ]; * logBarChart(data, 'category', 'value'); * ``` * * @param data - An array of objects representing the data to be visualized. * @param labels - The key in the data objects to be used for the labels. * @param values - The key in the data objects to be used for the values. * @param options - Optional configuration for the chart. * @param options.formatLabels - A function to format the labels. Defaults to converting the label to a string. * @param options.formatValues - A function to format the values. Defaults to converting the value to a string. * @param options.width - The width of the chart. Defaults to 40. * @param options.title - The title of the chart. * @param options.totalLabel - The label for the total value. * @param options.compact - Whether to use a compact format for the chart. Defaults to false. * * @category Dataviz * */ export default function logBarChart(data: { [key: string]: unknown; }[], labels: string, values: string, options?: { formatLabels?: (d: unknown) => string; formatValues?: (d: number) => string; width?: number; title?: string; totalLabel?: string; compact?: boolean; }): void;