drizzle-cube
Version:
Drizzle ORM-first semantic layer with Cube.js compatibility. Type-safe analytics and dashboards with SQL injection protection.
14 lines (13 loc) • 954 B
TypeScript
import { FieldLabelMap } from '../hooks/useCubeMeta';
export declare function getFieldLabel(fieldName: string, labelMap: FieldLabelMap): string;
export declare function transformSeriesKeysWithLabels(seriesKeys: string[], labelMap: FieldLabelMap): string[];
export declare function formatTimeValue(value: any, granularity?: string): string;
export declare function getFieldGranularity(queryObject: any, fieldName: string): string | undefined;
export declare function transformChartData(data: any[], xAxisField: string, yAxisFields: string[], queryObject: any, labelMap?: FieldLabelMap): any[];
export interface ChartSeriesResult {
data: any[];
seriesKeys: string[];
hasDimensions: boolean;
}
export declare function transformChartDataWithSeries(data: any[], xAxisField: string, yAxisFields: string[], queryObject: any, seriesFields?: string[], // New optional parameter for explicit series fields
labelMap?: FieldLabelMap): ChartSeriesResult;