Files
2nd/10_Wiki/Topic_Programming/Coding/React_Charts_Library_Comparison.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

5.4 KiB

id, title, category, status, source_trust_level, verification_status, created_at, updated_at, tags, tech_stack, applied_in, aliases
id title category status source_trust_level verification_status created_at updated_at tags tech_stack applied_in aliases
react-charts-library-comparison React Charts — Recharts / Visx / D3 / Tremor Coding draft B conceptual 2026-05-09 2026-05-09
react
charts
dataviz
vibe-coding
language applicable_to
TS / React
Frontend
Recharts
Visx
D3
Tremor
Nivo
Chart.js
dataviz

React Charts

Recharts = 빠른 시작, 한정. Visx (Airbnb) = D3 위 React 컴포넌트, 유연. D3 직접 = 풀 컨트롤. Tremor / shadcn charts = dashboard UI 일관성.

📖 핵심 개념

  • High-level: 차트 종류 직접 (Bar, Line). 빠른 시작.
  • Low-level: scale / axis / shape 조립. 유연.
  • Headless: 행동만, 스타일 너의 것.

💻 코드 패턴

Recharts (간단)

import { LineChart, Line, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';

<ResponsiveContainer width="100%" height={300}>
  <LineChart data={data}>
    <XAxis dataKey="date" />
    <YAxis />
    <Tooltip />
    <Line type="monotone" dataKey="value" stroke="#3b82f6" />
  </LineChart>
</ResponsiveContainer>

→ Pros: 5분 setup. Cons: 복잡 customization 어려움, 큰 데이터 느림.

Tremor (대시보드 UI)

import { Card, AreaChart, Title, Metric, Flex, BadgeDelta } from '@tremor/react';

<Card>
  <Flex>
    <Title>Sales</Title>
    <BadgeDelta deltaType="moderateIncrease">+12%</BadgeDelta>
  </Flex>
  <Metric>$12,345</Metric>
  <AreaChart data={data} index="date" categories={['sales']} colors={['blue']} />
</Card>

→ Tailwind based. Dashboard 만들기 빠름.

Visx (Airbnb, low-level + React)

import { LinePath } from '@visx/shape';
import { scaleLinear } from '@visx/scale';
import { AxisBottom, AxisLeft } from '@visx/axis';
import { GridRows, GridColumns } from '@visx/grid';

const xScale = scaleLinear({ domain: [0, 100], range: [0, width] });
const yScale = scaleLinear({ domain: [0, 100], range: [height, 0] });

<svg width={width + 60} height={height + 40}>
  <g transform="translate(40, 10)">
    <GridRows scale={yScale} width={width} />
    <GridColumns scale={xScale} height={height} />
    <LinePath
      data={data}
      x={d => xScale(d.x)}
      y={d => yScale(d.y)}
      stroke="#3b82f6"
      strokeWidth={2}
    />
    <AxisLeft scale={yScale} />
    <AxisBottom scale={xScale} top={height} />
  </g>
</svg>

→ Pros: D3 의 power + React 의 declarative. Cons: 학습 곡선.

D3 직접 (max 컨트롤)

import * as d3 from 'd3';
import { useEffect, useRef } from 'react';

function Chart({ data }: { data: { x: number; y: number }[] }) {
  const ref = useRef<SVGSVGElement>(null);

  useEffect(() => {
    const svg = d3.select(ref.current);
    const x = d3.scaleLinear().domain(d3.extent(data, d => d.x) as [number, number]).range([0, 400]);
    const y = d3.scaleLinear().domain([0, d3.max(data, d => d.y)!]).range([200, 0]);

    const line = d3.line<typeof data[0]>().x(d => x(d.x)).y(d => y(d.y));

    svg.append('path')
       .datum(data)
       .attr('d', line)
       .attr('fill', 'none')
       .attr('stroke', '#3b82f6');
  }, [data]);

  return <svg ref={ref} width={400} height={200} />;
}

→ React 와 D3 dual responsibility — declarative 깨질 수 있음.

shadcn charts (Recharts wrapper, Tailwind theme)

import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartConfig } from '@/components/ui/chart';
import { Bar, BarChart, XAxis } from 'recharts';

const config = {
  sales: { label: 'Sales', color: 'hsl(var(--chart-1))' },
} satisfies ChartConfig;

<ChartContainer config={config}>
  <BarChart data={data}>
    <XAxis dataKey="month" />
    <ChartTooltip content={<ChartTooltipContent />} />
    <Bar dataKey="sales" fill="var(--color-sales)" radius={4} />
  </BarChart>
</ChartContainer>

→ Recharts power + shadcn theming + a11y.

큰 데이터 — canvas

// React-vis-style 또는 직접 canvas
import { Canvas } from '@react-three/fiber'; // 3D 차트
// 또는 visx/visx-glyph + canvas renderer

10K+ 점 = SVG 느림. Canvas 또는 WebGL.

Animation

// Recharts: animation 자동 (animationDuration)
<Line dataKey="v" isAnimationActive={true} animationDuration={500} />

// Visx + framer-motion
<motion.path d={pathD} initial={{ pathLength: 0 }} animate={{ pathLength: 1 }} />

🤔 의사결정 기준

상황 추천
빠른 dashboard Tremor
단순 차트 Recharts
Custom + Tailwind 일관성 shadcn charts
복잡 / 유연 Visx
풀 컨트롤 + 큰 데이터 D3 + canvas
3D / WebGL three.js / r3f
Native mobile Victory Native / react-native-skia

안티패턴

  • Recharts 로 10K 점: 느림. Canvas.
  • D3 + React 같이 DOM 조작: race. D3 가 SVG 만들고 React 가 render layer.
  • 차트 안에 큰 ResponsiveContainer 매번 resize: ResizeObserver throttle.
  • Tooltip 매 hover 새 객체: re-render. memoize.
  • 색 hard-code: 다크모드 X. theme 사용.
  • Axis 너무 많은 tick: 가독성 낮음. format / count 제한.
  • A11y 무시 — SVG only: aria-label / 표 alternative.

🤖 LLM 활용 힌트

  • 시작 = Recharts / Tremor.
  • 큰 / 유연 = Visx.
  • shadcn charts 가 Tailwind 사용자에게 sweet spot.

🔗 관련 문서