import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { Activity, BarChartIcon, GitCommitHorizontalIcon } from 'lucide-react' export interface ChartHeaderProps { title?: string format?: string | ((value: unknown) => string) customDateFormat?: string minimalHeader?: boolean displayDateInUtc?: boolean highlightedLabel?: number | string | any | null highlightedValue?: number | string | any | null hideChartType?: boolean chartStyle?: string onChartStyleChange?: (style: string) => void showMaxValue?: boolean setShowMaxValue?: (value: boolean) => void } const ChartHeader = ({ format, highlightedValue, highlightedLabel, title, minimalHeader = false, hideChartType = false, chartStyle = 'bar', onChartStyleChange, showMaxValue = false, setShowMaxValue, }: ChartHeaderProps) => { const chartTitle = (

{title}

) const highlighted = (

{highlightedValue !== undefined && highlightedValue} {format === 'seconds' ? ' ' : ''} {typeof format === 'function' ? format(highlightedValue) : format}

) const label =

{highlightedLabel}

if (minimalHeader) { return (
{title && chartTitle}
{highlightedValue !== undefined && highlighted} {label}
) } return (
{title && chartTitle} {highlightedValue !== undefined && highlighted} {label}
{!hideChartType && onChartStyleChange && (
) } export default ChartHeader