/** Premium chart palette — refined for dark mode contrast */ export const COLOR_PROMPT = '#60a5fa'; // blue-400 export const COLOR_COMPLETION = '#34d399'; // emerald-400 export const COLOR_TOTAL = '#fbbf24'; // amber-400 export const PIE_COLORS = [ '#60a5fa', '#34d399', '#fbbf24', '#a78bfa', '#f472b6', '#38bdf8', '#4ade80', '#facc15', '#c084fc', ]; export const MODEL_COLORS: Record = { 'gemini-3-flash': '#60a5fa', 'gemini-3.1-pro-low': '#818cf8', 'gemini-3.1-pro-high': '#a78bfa', 'claude-sonnet-4-6-thinking': '#f472b6', 'claude-opus-4-6-thinking': '#fb7185', }; const colorMap: Record = { Prompt: COLOR_PROMPT, Completion: COLOR_COMPLETION, Total: COLOR_TOTAL, }; export function BarTooltip({ indexValue, data }: any) { const keys = Object.keys(data).filter((k: string) => k !== 'name' && colorMap[k]); return (

{indexValue}

{keys.map((key: string) => (
{key}: {typeof data[key] === 'number' ? data[key].toLocaleString() : data[key]}
))}
); } export function PieTooltip({ datum }: any) { return (
{datum.id}: {typeof datum.value === 'number' ? datum.value.toLocaleString() : datum.value}
); } export function LineTooltip({ point }: any) { return (

{point.data.xFormatted ?? point.data.x}

{point.serieId}: {typeof point.data.y === 'number' ? point.data.y.toLocaleString() : point.data.y}
); }