import * as React from 'react' import { cn } from '../core/cn' import { ResponsiveContainer, Tooltip as RechartsTooltip, Legend as RechartsLegend } from 'recharts' export const chartColors = [ 'hsl(var(--chart-1, 220 70% 50%))', 'hsl(var(--chart-2, 160 60% 45%))', 'hsl(var(--chart-3, 30 80% 55%))', 'hsl(var(--chart-4, 280 65% 60%))', 'hsl(var(--chart-5, 340 75% 55%))', ] export const defaultColors = ['#3b82f6', '#22c55e', '#f59e0b', '#8b5cf6', '#ec4899'] export interface Series { key: string name: string color?: string } export function getSeriesColor(index: number, color?: string): string { return color || defaultColors[index % defaultColors.length] } interface ChartContainerProps { children: React.ReactNode className?: string height?: number | string } export function ChartContainer({ children, className, height = 300 }: ChartContainerProps) { return (
{labelFormatter(label || '')}