QueryInsightsChart.constants.ts22 lines · main
1import { CHART_COLORS } from '@/components/ui/Charts/Charts.constants'
2
3export const CHART_TABS = [
4 { id: 'query_latency', label: 'Query latency' },
5 { id: 'rows_read', label: 'Rows read' },
6 { id: 'calls', label: 'Calls' },
7 { id: 'cache_hits', label: 'Cache hits' },
8]
9
10export const LEGEND_ITEMS: Record<string, { label: string; color: string; dataKey: string }[]> = {
11 query_latency: [
12 { label: 'P50', color: 'hsl(var(--chart-4))', dataKey: 'p50' },
13 { label: 'P95', color: CHART_COLORS.GREEN_1, dataKey: 'p95' },
14 ],
15 rows_read: [{ label: 'Rows Read', color: CHART_COLORS.GREEN_1, dataKey: 'rows_read' }],
16 calls: [{ label: 'Calls', color: CHART_COLORS.GREEN_1, dataKey: 'calls' }],
17 cache_hits: [{ label: 'Cache Hits', color: '#10B981', dataKey: 'cache_hits' }],
18}
19
20export const CHART_TYPE = 'linear'
21
22export const SEL_COLOR = 'hsl(var(--chart-blue))'