{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "recharts-line-chart",
  "description": "Deprecated: Recharts line chart. Use line-chart instead.",
  "dependencies": [
    "recharts",
    "cn@^0.2.4"
  ],
  "registryDependencies": [
    "https://ui-three-mu.vercel.app/r/recharts-chart.json"
  ],
  "files": [
    {
      "path": "registry/preskok/ui/preskok-ui/recharts-line-chart.tsx",
      "content": "\"use client\"\n\nimport React from \"react\"\nimport { twMerge } from \"cn\"\nimport { Line, LineChart as LineChartPrimitive, type LineProps } from \"recharts\"\nimport type {\n  NameType,\n  ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\"\n\nimport {\n  CartesianGrid,\n  Chart,\n  ChartLegend,\n  ChartLegendContent,\n  ChartTooltip,\n  ChartTooltipContent,\n  constructCategoryColors,\n  DEFAULT_COLORS,\n  getColorValue,\n  valueToPercent,\n  XAxis,\n  YAxis,\n  type BaseChartProps,\n} from \"./recharts-chart\"\n\ninterface RechartsLineChartProps<\n  TValue extends ValueType,\n  TName extends NameType,\n> extends BaseChartProps<TValue, TName> {\n  connectNulls?: boolean\n  lineProps?: LineProps\n  chartProps?: Omit<\n    React.ComponentProps<typeof LineChartPrimitive>,\n    \"data\" | \"stackOffset\"\n  >\n}\n\n/**\n * @deprecated Use `LineChart` from `@preskok/line-chart`, built on TanStack Charts.\n */\nexport const RechartsLineChart = <\n  TValue extends ValueType,\n  TName extends NameType,\n>({\n  data = [],\n  dataKey,\n  colors = DEFAULT_COLORS,\n  connectNulls = false,\n  type = \"default\",\n  className,\n  config,\n  children,\n\n  // Components\n  tooltip = true,\n  tooltipProps,\n\n  legend = true,\n  legendProps,\n\n  intervalType = \"equidistantPreserveStart\",\n\n  valueFormatter = (value: number) => value.toString(),\n\n  // XAxis\n  displayEdgeLabelsOnly = false,\n  xAxisProps,\n  hideXAxis = false,\n\n  // YAxis\n  yAxisProps,\n  hideYAxis = false,\n\n  hideGridLines = false,\n  chartProps,\n  lineProps,\n  ...props\n}: RechartsLineChartProps<TValue, TName>) => {\n  const categoryColors = constructCategoryColors(Object.keys(config), colors)\n\n  return (\n    <Chart\n      className={twMerge(\"w-full\", className)}\n      config={config}\n      data={data}\n      dataKey={dataKey}\n      {...props}\n    >\n      {({ onLegendSelect, selectedLegend }) => (\n        <LineChartPrimitive\n          onClick={() => {\n            onLegendSelect(null)\n          }}\n          data={data}\n          margin={{\n            bottom: 0,\n            left: 0,\n            right: 0,\n            top: 5,\n          }}\n          stackOffset={type === \"percent\" ? \"expand\" : undefined}\n          {...chartProps}\n        >\n          {!hideGridLines && <CartesianGrid strokeDasharray=\"4 4\" />}\n          <XAxis\n            hide={hideXAxis}\n            displayEdgeLabelsOnly={displayEdgeLabelsOnly}\n            intervalType={intervalType}\n            {...xAxisProps}\n          />\n          <YAxis\n            hide={hideYAxis}\n            tickFormatter={type === \"percent\" ? valueToPercent : valueFormatter}\n            {...yAxisProps}\n          />\n\n          {legend && (\n            <ChartLegend\n              content={\n                typeof legend === \"boolean\" ? <ChartLegendContent /> : legend\n              }\n              {...legendProps}\n            />\n          )}\n\n          {tooltip && (\n            <ChartTooltip\n              content={\n                typeof tooltip === \"boolean\" ? (\n                  <ChartTooltipContent accessibilityLayer />\n                ) : (\n                  tooltip\n                )\n              }\n              {...tooltipProps}\n            />\n          )}\n\n          {!children\n            ? Object.entries(config).map(([category, values]) => {\n                const strokeOpacity =\n                  selectedLegend && selectedLegend !== category ? 0.1 : 1\n\n                return (\n                  <Line\n                    key={category}\n                    dot={false}\n                    name={category}\n                    type=\"linear\"\n                    dataKey={category}\n                    stroke={getColorValue(\n                      values.color || categoryColors.get(category)\n                    )}\n                    style={\n                      {\n                        strokeOpacity,\n                        strokeWidth: 2,\n                        \"--line-color\": getColorValue(\n                          values.color || categoryColors.get(category)\n                        ),\n                      } as React.CSSProperties\n                    }\n                    strokeLinejoin=\"round\"\n                    strokeLinecap=\"round\"\n                    connectNulls={connectNulls}\n                    {...lineProps}\n                  />\n                )\n              })\n            : children}\n        </LineChartPrimitive>\n      )}\n    </Chart>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}