{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "liquid-fill-chart",
  "title": "Liquid Fill Chart",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-react/components/charts/liquid-fill-chart/LiquidFillChart.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { cn } from '@/lib/utils'\nimport { ChartFrame } from '../shared'\n\n// LiquidFillChart — dependency-free SVG gauge\n// ─────────────────────────────────────────────────────────────────────────\n\nexport interface LiquidFillChartProps {\n  /** Fill 0..100. */\n  value: number\n  height?: number | string\n  /** Wave colour. Defaults to chart-1 token. */\n  color?: string\n  /** Show the % label in the centre. Default true. */\n  showLabel?: boolean\n  unit?: string\n  className?: string\n  /** Accessible name announced for the chart image. Defaults to \"Chart\". */\n  ariaLabel?: string\n}\n\nexport const LiquidFillChart = React.forwardRef<HTMLDivElement, LiquidFillChartProps>(\n  ({ value, height = 220, color = 'var(--chart-1)', showLabel = true, unit = '%', className, ariaLabel }, ref) => {\n    const pct = Math.max(0, Math.min(100, value))\n    const level = 100 - pct * 0.72\n    const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '')\n\n    return (\n      <ChartFrame\n        ref={ref}\n        height={height}\n        className={cn('flex items-center justify-center', className)}\n        ariaLabel={ariaLabel || `Liquid fill chart at ${Math.round(pct)}${unit}`}\n      >\n        <svg viewBox=\"0 0 200 200\" className=\"aspect-square h-full max-h-full\" role=\"presentation\">\n          <defs>\n            <clipPath id={uid}>\n              <circle cx=\"100\" cy=\"100\" r=\"84\" />\n            </clipPath>\n          </defs>\n          <circle cx=\"100\" cy=\"100\" r=\"88\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" className=\"text-border\" />\n          <g clipPath={`url(#${uid})`}>\n            <rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" className=\"fill-muted/40\" />\n            <path\n              d={`M 0 ${level} Q 25 ${level - 10}, 50 ${level} T 100 ${level} T 150 ${level} T 200 ${level} V 200 H 0 Z`}\n              fill={color}\n              opacity=\"0.55\"\n            >\n              <animateTransform\n                attributeName=\"transform\"\n                type=\"translate\"\n                from=\"0 0\"\n                to=\"-100 0\"\n                dur=\"6s\"\n                repeatCount=\"indefinite\"\n              />\n            </path>\n            <path\n              d={`M 0 ${level + 6} Q 25 ${level - 4}, 50 ${level + 6} T 100 ${level + 6} T 150 ${level + 6} T 200 ${level + 6} V 200 H 0 Z`}\n              fill={color}\n              opacity=\"0.85\"\n            >\n              <animateTransform\n                attributeName=\"transform\"\n                type=\"translate\"\n                from=\"-100 0\"\n                to=\"0 0\"\n                dur=\"4s\"\n                repeatCount=\"indefinite\"\n              />\n            </path>\n          </g>\n          {showLabel && (\n            <text\n              x=\"100\"\n              y=\"104\"\n              textAnchor=\"middle\"\n              dominantBaseline=\"middle\"\n              className=\"fill-foreground\"\n              fontSize=\"30\"\n              fontWeight=\"700\"\n            >\n              {Math.round(pct)}\n              {unit}\n            </text>\n          )}\n        </svg>\n      </ChartFrame>\n    )\n  },\n)\nLiquidFillChart.displayName = 'LiquidFillChart'\n",
      "type": "registry:ui",
      "target": "~/components/ui/charts/liquid-fill-chart/LiquidFillChart.tsx"
    },
    {
      "path": "packages/registry-react/components/charts/liquid-fill-chart/index.ts",
      "content": "export { LiquidFillChart, type LiquidFillChartProps } from './LiquidFillChart'\n",
      "type": "registry:ui",
      "target": "~/components/ui/charts/liquid-fill-chart/index.ts"
    },
    {
      "path": "packages/registry-react/components/charts/shared.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport * as echartsCore from 'echarts/core'\nimport { use } from 'echarts/core'\nimport { CanvasRenderer } from 'echarts/renderers'\nimport {\n  LineChart as EChartsLineChart,\n  BarChart as EChartsBarChart,\n  PieChart as EChartsPieChart,\n  ScatterChart as EChartsScatterChart,\n  EffectScatterChart as EChartsEffectScatter,\n  PictorialBarChart as EChartsPictorialBar,\n  RadarChart as EChartsRadarChart,\n  GaugeChart as EChartsGaugeChart,\n  HeatmapChart as EChartsHeatmap,\n  TreemapChart as EChartsTreemapChart,\n  FunnelChart as EChartsFunnelChart,\n  BoxplotChart as EChartsBoxplotChart,\n  CandlestickChart as EChartsCandlestickChart,\n  CustomChart as EChartsCustomChart,\n  ChordChart as EChartsChordChart,\n  MapChart as EChartsMapChart,\n  GraphChart as EChartsGraphChart,\n  ParallelChart as EChartsParallelChart,\n  SankeyChart as EChartsSankeyChart,\n  SunburstChart as EChartsSunburstChart,\n  ThemeRiverChart,\n  TreeChart as EChartsTreeChart,\n} from 'echarts/charts'\nimport {\n  GridComponent,\n  PolarComponent,\n  TooltipComponent,\n  LegendComponent,\n  MarkLineComponent,\n  MarkAreaComponent,\n  MarkPointComponent,\n  GraphicComponent,\n  RadarComponent,\n  VisualMapComponent,\n  CalendarComponent,\n  DataZoomComponent,\n  ParallelComponent,\n  SingleAxisComponent,\n  TitleComponent,\n} from 'echarts/components'\nimport ReactECharts from 'echarts-for-react/esm/core'\nimport { cn } from '@/lib/utils'\n\nexport function heightToStyle(height: number | string): string {\n  return /^\\d+$/.test(String(height)) ? `${height}px` : String(height)\n}\n\ninterface ChartFrameProps {\n  height: number | string\n  className?: string\n  /** Apply the accessible role/tabindex/focus-ring chrome. Some chart\n   *  wrappers ship a bare `w-full` frame -- pass `false` for those. */\n  focusable?: boolean\n  /** Accessible name for role=\"img\". Defaults to \"Chart\". */\n  ariaLabel?: string\n}\n\n/** Shared `<div>` wrapper around the ECharts canvas. */\nexport const ChartFrame = React.forwardRef<HTMLDivElement, ChartFrameProps & { children: React.ReactNode }>(\n  ({ height, className, focusable = true, ariaLabel, children }, ref) => (\n    <div\n      ref={ref}\n      role=\"img\"\n      aria-label={ariaLabel || 'Chart'}\n      tabIndex={focusable ? 0 : undefined}\n      style={{ height: heightToStyle(height) }}\n      className={\n        focusable\n          ? cn('focus-visible:ring-ring w-full focus-visible:ring-2 focus-visible:outline-none', className)\n          : cn('w-full', className)\n      }\n    >\n      {children}\n    </div>\n  ),\n)\nChartFrame.displayName = 'ChartFrame'\n\n/** ECharts canvas filling its parent frame. */\nexport function EChart({ option }: { option: any }) {\n  return (\n    <ReactECharts\n      echarts={echartsCore as any}\n      option={option}\n      notMerge\n      lazyUpdate\n      style={{ width: '100%', height: '100%' }}\n    />\n  )\n}\n\nexport const echartsCoreModule = echartsCore\n\n// Register every chart type the wrappers need once at module load.\nuse([\n  CanvasRenderer,\n  EChartsLineChart,\n  EChartsBarChart,\n  EChartsPieChart,\n  EChartsScatterChart,\n  EChartsEffectScatter,\n  EChartsPictorialBar,\n  EChartsRadarChart,\n  EChartsGaugeChart,\n  EChartsHeatmap,\n  EChartsTreemapChart,\n  EChartsFunnelChart,\n  EChartsBoxplotChart,\n  EChartsCandlestickChart,\n  EChartsCustomChart,\n  EChartsChordChart,\n  EChartsMapChart,\n  EChartsGraphChart,\n  EChartsParallelChart,\n  EChartsSankeyChart,\n  EChartsSunburstChart,\n  ThemeRiverChart,\n  EChartsTreeChart,\n  GridComponent,\n  PolarComponent,\n  TooltipComponent,\n  LegendComponent,\n  MarkLineComponent,\n  MarkAreaComponent,\n  MarkPointComponent,\n  GraphicComponent,\n  RadarComponent,\n  VisualMapComponent,\n  CalendarComponent,\n  DataZoomComponent,\n  ParallelComponent,\n  SingleAxisComponent,\n  TitleComponent,\n])\n",
      "type": "registry:ui",
      "target": "~/components/ui/charts/shared.tsx"
    }
  ],
  "dependencies": [
    "echarts",
    "echarts-for-react"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "description": "React mirror of @uipkge/liquid-fill-chart — see the Vue registry item for the canonical description.",
  "categories": [
    "chart"
  ]
}