# React charting libraries

React charting libraries draw charts from data inside React apps. These libraries turn metrics, prices, and usage data into the charts on dashboards and reports.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Recharts](#recharts) | 256.8M | 27.7K | Nov 2026 | MIT |
| [visx](#visx-shape) | 40.7M | 21.1K | Jun 2026 | MIT |
| [react-chartjs-2](#react-chartjs) | 22.6M | 6.9K | Oct 2025 | MIT |
| [echarts-for-react](#echarts-for-react) | 8.4M | 5.0K | Nov 2026 | MIT |
| [MUI X Charts](#mui-x-charts) | 6.0M | 5.9K | Nov 2026 | MIT |
| [react-apexcharts](#react-apexcharts) | 5.6M | 1.4K | Nov 2026 | SEE LICENSE IN LICENSE.md |
| [nivo](#nivo) | 4.6M | 14.1K | May 2025 | MIT |
| [react-plotly.js](#react-plotly-js) | 3.8M | 1.1K | Jul 2026 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Recharts](#recharts) has the most monthly downloads in this comparison, at 256.8M.

## Capabilities

| Library | SVG rendering | Canvas/WebGL rendering |
| --- | --- | --- |
| [Recharts](#recharts) | Yes | No |
| [visx](#visx-shape) | Yes | No |
| [react-chartjs-2](#react-chartjs) | No | Yes |
| [echarts-for-react](#echarts-for-react) | Yes | Yes |
| [MUI X Charts](#mui-x-charts) | Yes | Via plugin |
| [react-apexcharts](#react-apexcharts) | Yes | Via plugin |
| [nivo](#nivo) | Yes | Yes |
| [react-plotly.js](#react-plotly-js) | Yes | Yes |

## Libraries

### Recharts

[GitHub](https://github.com/recharts/recharts) · [npm](https://www.npmjs.com/package/recharts) · [Docs](https://raw.githubusercontent.com/recharts/recharts/main/README.md)

Recharts builds each chart from separate React components. A `LineChart`, for example, holds an `XAxis`, a `Tooltip`, a `CartesianGrid`, and one `Line` per data series, all written as JSX. Every component renders SVG. The package installs together with `react-is`, which has to match the version of React in the app.

- Downloads / mo: 256.8M
- Stars: 27.7K
- Last release: 3.11.0
- License: MIT
- Capabilities: [From the Recharts docs](https://raw.githubusercontent.com/recharts/recharts/main/README.md)

**Strengths**

- **Composes charts from React components.** Combine axes, tooltips, grids, and lines as separate React components.
- **Resizes to its parent container.** Use ResponsiveContainer to adapt charts to the parent’s size.

**Watch out for**

- **PNG export needs a helper.** The separate `recharts-to-png` package converts a rendered chart to a PNG image.

```sh
npm install recharts react-is
```

**shadcn-ui/ui** (128.5K stars)

[shadcn-ui/ui](https://github.com/shadcn-ui/ui) 

```tsx
export function ChartAreaInteractive() {
  const [timeRange, setTimeRange] = React.useState("90d")

  const filteredData = chartData.filter((item) => {
    const date = new Date(item.date)
    const referenceDate = new Date("2024-06-30")
    let daysToSubtract = 90
    if (timeRange === "30d") {
      daysToSubtract = 30
    } else if (timeRange === "7d") {
      daysToSubtract = 7
    }
    const startDate = new Date(referenceDate)
    startDate.setDate(startDate.getDate() - daysToSubtract)
    return date >= startDate
  })

  return (
    <Card className="pt-0">
      <CardHeader className="flex items-center gap-2 space-y-0 border-b py-5 sm:flex-row">
        <div className="grid flex-1 gap-1">
          <CardTitle>Area Chart - Interactive</CardTitle>
          <CardDescription>
            Showing total visitors for the last 3 months
          </CardDescription>
        </div>
        <Select value={timeRange} onValueChange={setTimeRange}>
          <SelectTrigger
            className="hidden w-[160px] rounded-lg sm:ml-auto sm:flex"
            aria-label="Select a value"
          >
            <SelectValue placeholder="Last 3 months" />
          </SelectTrigger>
          <SelectContent className="rounded-xl">
            <SelectItem value="90d" className="rounded-lg">
              Last 3 months
            </SelectItem>
            <SelectItem value="30d" className="rounded-lg">
              Last 30 days
            </SelectItem>
            <SelectItem value="7d" className="rounded-lg">
              Last 7 days
            </SelectItem>
          </SelectContent>
        </Select>
      </CardHeader>
      <CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
        <ChartContainer
          config={chartConfig}
          className="aspect-auto h-[250px] w-full"
        >
          <AreaChart data={filteredData}>
            <defs>
              <linearGradient id="fillDesktop" x1="0" y1="0" x2="0" y2="1">
                <stop
                  offset="5%"
                  stopColor="var(--color-desktop)"
                  stopOpacity={0.8}
                />
                <stop
                  offset="95%"
                  stopColor="var(--color-desktop)"
                  stopOpacity={0.1}
                />
              </linearGradient>
              <linearGradient id="fillMobile" x1="0" y1="0" x2="0" y2="1">
                <stop
                  offset="5%"
                  stopColor="var(--color-mobile)"
                  stopOpacity={0.8}
                />
                <stop
                  offset="95%"
                  stopColor="var(--color-mobile)"
                  stopOpacity={0.1}
                />
              </linearGradient>
            </defs>
            <CartesianGrid vertical={false} />
            <XAxis
              dataKey="date"
              tickLine={false}
              axisLine={false}
              tickMargin={8}
              minTickGap={32}
              tickFormatter={(value) => {
                const date = new Date(value)
                return date.toLocaleDateString("en-US", {
                  month: "short",
                  day: "numeric",
                })
              }}
            />
            <ChartTooltip
              cursor={false}
              content={
                <ChartTooltipContent
                  labelFormatter={(value) => {
                    return new Date(value).toLocaleDateString("en-US", {
                      month: "short",
                      day: "numeric",
                    })
                  }}
                  indicator="dot"
                />
              }
            />
            <Area
              dataKey="mobile"
              type="natural"
              fill="url(#fillMobile)"
              stroke="var(--color-mobile)"
              stackId="a"
            />
            <Area
              dataKey="desktop"
              type="natural"
              fill="url(#fillDesktop)"
              stroke="var(--color-desktop)"
              stackId="a"
            />
            <ChartLegend content={<ChartLegendContent />} />
          </AreaChart>
        </ChartContainer>
      </CardContent>
    </Card>
  )
}

```

[apps/v4/registry/new-york-v4/charts/chart-area-interactive.tsx](https://github.com/shadcn-ui/ui/blob/968d8cb9dc42ae5d52e8fd356cf84596ec832a26/apps/v4/registry/new-york-v4/charts/chart-area-interactive.tsx#L139-L266) · [More projects using Recharts →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20recharts&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { LineChart, Line, XAxis, Tooltip, CartesianGrid } from 'recharts';
const data = [{ name: 'A', uv: 1 }, { name: 'B', uv: 2 }];
export default function Example() {
  return <LineChart width={400} height={240} data={data}><XAxis dataKey="name" /><Tooltip /><CartesianGrid stroke="#ccc" /><Line type="monotone" dataKey="uv" stroke="#8884d8" /></LineChart>;
}

```

From [README.md](https://github.com/recharts/recharts/blob/main/README.md)

### visx

[GitHub](https://github.com/airbnb/visx) · [npm](https://www.npmjs.com/package/@visx/shape) · [Docs](https://airbnb.io/visx/docs/shape)

visx is a collection of low-level visualization components from Airbnb, published as separate packages such as `@visx/shape`, `@visx/scale`, and `@visx/group`. Scales turn data values into positions, and shapes such as `Bar` draw them inside an `svg` element that the app writes itself. An app installs only the packages it uses.

- Downloads / mo: 40.7M
- Stars: 21.1K
- Last release: 4.0.0
- License: MIT
- Capabilities: [From the visx docs](https://airbnb.io/visx/docs/shape)

**Strengths**

- **Install only what's used.** Each scale, shape, and axis package installs on its own.
- **Any React animation library.** visx leaves animation to the React animation library an app already bundles.

**Watch out for**

- **No built-in animation.** Transitions come from a React animation library the app already uses.
- **Charts are assembled by hand.** Axes, legends, and tooltips come from their own packages and are placed by the app.

```sh
npm install --save @visx/shape
```

**apache/airflow** (47.5K stars)

[apache/airflow](https://github.com/apache/airflow) 

```tsx
const CustomEdge = ({ data, source, target }: Props) => {
  const [strokeColor, blueColor, dataEdgeColor] = useToken("colors", [
    "border.inverted",
    "blue.500",
    "purple.500",
  ]);

  // Read isSelected directly from the node store so that selection changes
  // don't require the parent to rebuild and pass down a new edges array.
  // useNodesData subscribes to data changes for these specific node IDs only.
  const nodesData = useNodesData([source, target]);

  if (data === undefined) {
    return undefined;
  }
  const { rest } = data;

  // rest.isSelected covers what node-level selection can't express on its own: a gate
  // (asset-condition) node is shared by every asset in its AND/OR condition, so marking the gate
  // itself selected would highlight every edge touching it, not just the path relevant to the
  // currently selected asset/Dag. See getGatePathEdgeIdsForSelection.
  const isSelected = Boolean(rest.isSelected) || nodesData.some((node) => Boolean(node.data.isSelected));

  const edgeStrokeColor = isSelected ? (rest.edgeType === "data" ? dataEdgeColor : blueColor) : strokeColor;

  return (
    <g {...opacityStyle(rest.isFiltered)}>
      {rest.labels?.map(({ height, id, text, width, x, y }) => {
        if (y === undefined || x === undefined) {
          return undefined;
        }

        return (
          <Group
            // Add a tiny bit of height so letters aren't cut off
            height={(height ?? 0) + 2}
            key={id}
            left={x}
            top={y}
            width={width}
          >
            <foreignObject height={(height ?? 0) + 2} width={width}>
              <Text>{text}</Text>
            </foreignObject>
          </Group>
        );
      })}
      {(rest.sections ?? []).map((section) => (
        <LinePath
          data={[section.startPoint, ...(section.bendPoints ?? []), section.endPoint]}
          key={section.id}
          stroke={edgeStrokeColor}
          strokeDasharray={rest.isSetupTeardown ? "10,5" : undefined}
          strokeWidth={isSelected ? 3 : 1}
          x={(point: ElkPoint) => point.x}
          y={(point: ElkPoint) => point.y}
        />
      ))}
    </g>
  );
};

```

[airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx](https://github.com/apache/airflow/blob/842402c7eeef1698a19030931832e82a81f87795/airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx#L31-L91) · [More projects using visx →](https://dashboard.exa.ai/playground/search?q=%40visx/shape%20GitHub%20projects)

**Quickstart**

```tsx
import React from 'react';
import {Bar} from '@visx/shape';

export default function BarGraph() {
  return (
    <svg width={160} height={180}>
      <Bar x={20} y={20} width={80} height={120} fill="#fc2e1c" />
    </svg>
  );
}

```

From [README.md](https://github.com/airbnb/visx/blob/master/README.md)

### react-chartjs-2

[GitHub](https://github.com/reactchartjs/react-chartjs-2) · [npm](https://www.npmjs.com/package/react-chartjs-2) · [Docs](https://raw.githubusercontent.com/reactchartjs/react-chartjs-2/master/README.md)

react-chartjs-2 provides React components, such as `Line`, `Bar`, and `Doughnut`, for Chart.js, a charting library that draws on an HTML canvas. Chart.js installs as its own package next to the wrapper. Each component takes `data` and `options` props in the Chart.js format. The chart types, scales, and plugins in use are imported and registered with `ChartJS.register` before the first render.

- Downloads / mo: 22.6M
- Stars: 6.9K
- Last release: 5.3.1
- License: MIT
- Capabilities: [From the react-chartjs-2 docs](https://raw.githubusercontent.com/reactchartjs/react-chartjs-2/master/README.md)

**Strengths**

- **Supports mixed chart types.** Combine supported chart types in one Chart.js canvas.
- **Loads selected chart components.** Import and register only the Chart.js components the application uses.

**Watch out for**

- **Registration before render.** A chart type, scale, or plugin that isn't registered with `ChartJS.register` fails to draw.
- **Styled through options.** Colors, fonts, and borders are set in the chart options or plugins.

```sh
npm i react-chartjs-2 chart.js
```

**adrianhajdin/banking** (3.2K stars)

[adrianhajdin/banking](https://github.com/adrianhajdin/banking) 

```tsx
const DoughnutChart = ({ accounts }: DoughnutChartProps) => {
  const accountNames = accounts.map((a) => a.name);
  const balances = accounts.map((a) => a.currentBalance)

  const data = {
    datasets: [
      {
        label: 'Banks',
        data: balances,
        backgroundColor: ['#0747b6', '#2265d8', '#2f91fa'] 
      }
    ],
    labels: accountNames
  }

  return <Doughnut 
    data={data} 
    options={{
      cutout: '60%',
      plugins: {
        legend: {
          display: false
        }
      }
    }}
  />
}

```

[components/DoughnutChart.tsx](https://github.com/adrianhajdin/banking/blob/eb590063807cd4b7af39eff89cee2897f24232d1/components/DoughnutChart.tsx#L10-L36) · [More projects using react-chartjs-2 →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20react-chartjs-2&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
import { Doughnut } from 'react-chartjs-2';
ChartJS.register(ArcElement, Tooltip, Legend);
const data = { labels: ['A', 'B'], datasets: [{ data: [1, 2] }] };
export default function Example() { return <Doughnut data={data} />; }

```

From [README.md](https://github.com/reactchartjs/react-chartjs-2/blob/master/README.md)

### echarts-for-react

[GitHub](https://github.com/hustcc/echarts-for-react) · [npm](https://www.npmjs.com/package/echarts-for-react) · [Docs](https://raw.githubusercontent.com/hustcc/echarts-for-react/master/README.md)

echarts-for-react renders Apache ECharts charts in React through one component, `ReactECharts`, which takes an ECharts `option` object. The `echarts` package installs separately, at the version the app chooses. Props such as `notMerge`, `lazyUpdate`, `theme`, and `onEvents` pass through to the engine. For any other ECharts call, `getEchartsInstance()` returns the chart instance. Importing from `echarts-for-react/lib/core` with only the needed chart modules keeps the bundle smaller.

- Downloads / mo: 8.4M
- Stars: 5.0K
- Last release: 3.1.0
- License: MIT
- Capabilities: [From the echarts-for-react docs](https://raw.githubusercontent.com/hustcc/echarts-for-react/master/README.md)

**Strengths**

- **Exposes the ECharts instance.** Use getEchartsInstance() to access the engine’s chart APIs.
- **Resizes when the window changes.** Automatic window resizing is enabled by default.

**Watch out for**

- **Separate engine install.** The `echarts` package installs alongside the wrapper as a peer dependency.

```sh
npm install --save echarts-for-react
npm install --save echarts
```

**NVIDIA/garak** (10.0K stars)

[NVIDIA/garak](https://github.com/NVIDIA/garak) 

```tsx
const TaxonomyCellChart = ({ cells, isDark, selectedKey, onSelect }: TaxonomyCellChartProps) => {
  const { option, height } = useTaxonomyCellChartOptions(cells, selectedKey, isDark);

  const handleClick = (params: ECElementEvent) => {
    // Axis-label clicks carry the label in `value` with no dataIndex; bar clicks
    // carry the dataIndex. Resolve both to the same cell so they behave alike.
    const cell =
      params.componentType === "yAxis"
        ? cells.find(c => c.otherLabel === params.value)
        : cells[params.dataIndex];
    if (cell) onSelect(selectedKey === cell.otherKey ? null : cell.otherKey);
  };

  return (
    <ReactECharts
      option={option}
      style={{ height, width: "100%" }}
      onEvents={{ click: handleClick }}
    />
  );
};

```

[garak-report/src/components/TechniqueIntent/TaxonomyCellChart.tsx](https://github.com/NVIDIA/garak/blob/892779207cbc38f65a738ef9cbdfbc1e83aa0b55/garak-report/src/components/TechniqueIntent/TaxonomyCellChart.tsx#L35-L55) · [More projects using echarts-for-react →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20echarts-for-react&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import ReactECharts from 'echarts-for-react';
const option = { xAxis: { type: 'category', data: ['A', 'B'] }, yAxis: { type: 'value' }, series: [{ type: 'bar', data: [1, 2] }] };
export default function Example() { return <ReactECharts option={option} />; }

```

From [README.md](https://github.com/hustcc/echarts-for-react/blob/master/README.md)

### MUI X Charts

[GitHub](https://github.com/mui/mui-x) · [npm](https://www.npmjs.com/package/@mui/x-charts) · [Docs](https://mui.com/x/react-charts/quickstart/)

MUI X Charts is a set of React chart components from MUI that render SVG, covering bar, line, pie, scatter, gauge, and radar charts, among others. A chart can be used whole, such as `BarChart` with `xAxis` and `series` props, or composed from parts like `ChartsXAxis` and `BarPlot` inside a `ChartsDataProvider`. The community edition is MIT licensed and installs with Material UI and Emotion.

- Downloads / mo: 6.0M
- Stars: 5.9K
- Last release: 9.18.1
- License: MIT
- Capabilities: [From the MUI X Charts docs](https://mui.com/x/react-charts/quickstart/)

**Strengths**

- **Composable parts.** Axes, plots, and legends combine inside a data provider to build custom charts.
- **Shared MUI theme.** Charts follow the Material UI theme already set up in the app.

**Watch out for**

- **Advanced charts are paid.** Funnel, heatmap, and sankey charts, zooming, panning, and export need the commercial Pro plan.
- **WebGL needs Premium.** WebGL rendering for dense data is part of the Premium plan.

```sh
npm install @mui/x-charts @mui/material @emotion/react @emotion/styled
```

**mui/material-ui** (99.4K stars)

[mui/material-ui](https://github.com/mui/material-ui) 

```tsx
function PieCenterLabel({ primaryText, secondaryText }: PieCenterLabelProps) {
  const { width, height, left, top } = useDrawingArea();
  const primaryY = top + height / 2 - 10;
  const secondaryY = primaryY + 24;

  return (
    <React.Fragment>
      <StyledText variant="primary" x={left + width / 2} y={primaryY}>
        {primaryText}
      </StyledText>
      <StyledText variant="secondary" x={left + width / 2} y={secondaryY}>
        {secondaryText}
      </StyledText>
    </React.Fragment>
  );
}

```

[docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.tsx](https://github.com/mui/material-ui/blob/2271f606888b970f5e92d2204d81984974421121/docs/data/material/getting-started/templates/dashboard/components/ChartUserByCountry.tsx#L100-L115) · [More projects using MUI X Charts →](https://dashboard.exa.ai/playground/search?q=%40mui/x-charts%20GitHub%20projects)

**Quickstart**

```tsx
import { BarChart } from '@mui/x-charts/BarChart';
export default function Example() {
  return (
<BarChart
  xAxis={[
    {
      id: 'barCategories',
      data: ['bar A', 'bar B', 'bar C'],
      height: 28,
    },
  ]}
  series={[
    {
      data: [2, 5, 3],
    },
  ]}
  height={300}
/>
  );
}

```

From [quickstart.md](https://mui.com/x/react-charts/quickstart/)

### react-apexcharts

[GitHub](https://github.com/apexcharts/react-apexcharts) · [npm](https://www.npmjs.com/package/react-apexcharts) · [Docs](https://apexcharts.com/docs/react-charts/)

react-apexcharts is the React wrapper for ApexCharts, a JavaScript chart engine that installs alongside it. The `Chart` component takes an `options` object, a `series` array, a chart `type` such as `bar`, and a width and height. Changing `series` or any option re-renders the chart. A separate entry point, `react-apexcharts/server`, renders charts inside Next.js server components.

- Downloads / mo: 5.6M
- Stars: 1.4K
- Last release: 2.2.1
- License: SEE LICENSE IN LICENSE.md
- Capabilities: [From the react-apexcharts docs](https://apexcharts.com/docs/react-charts/)

**Strengths**

- **Updates from props.** Changing `series` or an option redraws the chart with no extra call.
- **Server rendering.** The `react-apexcharts/server` import renders charts in Next.js server components.

**Watch out for**

- **Separate engine install.** The `apexcharts` package installs together with the wrapper.

```sh
npm install react-apexcharts apexcharts
```

**artifacthub/hub** (2.1K stars)

[artifacthub/hub](https://github.com/artifacthub/hub) 

```tsx
const BrushChart = (props: Props) => {
  const primaryColor = getMetaTag('primaryColor');
  const secondaryColor = getMetaTag('secondaryColor');
  const point = useBreakpointDetect();
  const lastSeriesDate = props.series[props.series.length - 1][0];

  useEffect(() => {
    // We force to use original selection after changing breakpoint
    ApexCharts.exec(
      `${props.id}BrushChart`,
      'updateOptions',
      {
        selection: {
          xaxis: {
            min: subMonths(new Date(lastSeriesDate), 12).getTime(), // We select last year
            max: lastSeriesDate,
          },
        },
      },
      false,
      true
    );
  }, [point, props.id, lastSeriesDate]);

  const getBarChartConfig = (): ApexCharts.ApexOptions => {
    return {
      chart: {
        id: `${props.id}BarChart`,
        height: 300,
        type: 'bar',
        redrawOnWindowResize: true,
        redrawOnParentResize: false,
        zoom: {
          enabled: false,
        },
        fontFamily: 'var(--bs-body-font-family)',
        toolbar: {
          show: false,
        },
      },
      grid: { borderColor: 'var(--border-md)' },
      plotOptions: {
        bar: {
          borderRadius: 0,
          dataLabels: {
            position: 'top',
          },
        },
      },
      dataLabels: {
        enabled: true,
        offsetY: -20,
        style: {
          fontSize: '12px',
          colors: ['var(--color-font)'],
        },
        formatter: (value: number) => {
          // Display only one decimal
          return prettifyNumber(value, 1);
        },
      },
      colors: ['var(--color-1-500)'],
      xaxis: {
        type: 'datetime',
        position: 'bottom',
        axisBorder: {
          show: false,
        },
        axisTicks: {
          show: false,
        },
        tooltip: {
          enabled: true,
        },
        labels: {
          format: `MM/yy`,
          style: {
            colors: 'var(--color-font)',
          },
        },
      },
      yaxis: {
        labels: {
          style: {
            colors: 'var(--color-font)',
          },
        },
      },
      tooltip: {
        x: {
          format: `MMM'yy`,
        },
      },
      title: {
        text: props.title,
        style: {
          color: 'var(--color-font)',
        },
      },
      responsive: [
        {
          breakpoint: 1920,
          options: {
            plotOptions: {
              bar: {
                columnWidth: '80%',
              },
            },
            dataLabels: {
              offsetY: -15,
              style: {
                fontSize: '9px',
              },
            },
          },
        },
        {
          breakpoint: 768,
          options: {
            dataLabels: {
              enabled: false,
            },
          },
        },
      ],
    };
  };

  const getAreaChartConfig = (): ApexCharts.ApexOptions => {
    return {
      chart: {
        id: `${props.id}BrushChart`,
        height: 120,
        type: 'area',
        redrawOnWindowResize: true,
        redrawOnParentResize: false,
        zoom: {
          enabled: false,
        },
        brush: {
          target: `${props.id}BarChart`,
          enabled: true,
          autoScaleYaxis: false,
        },
        selection: {
          enabled: true,
          xaxis: {
            min: subMonths(new Date(lastSeriesDate), 12).getTime(), // We select last year
            max: lastSeriesDate,
          },
          fill: {
            color: props.activeTheme === 'dark' ? '#222529' : secondaryColor,
            opacity: 0.2,
          },
          stroke: {
            width: 1,
            dashArray: 4,
            color: props.activeTheme === 'dark' ? '#222529' : secondaryColor,
            opacity: 1,
          },
        },
        fontFamily: 'var(--bs-body-font-family)',
        toolbar: {
          show: false,
        },
      },
      grid: { borderColor: 'var(--border-md)' },
      plotOptions: {
        bar: {
          borderRadius: 0,
          dataLabels: {
            position: 'top',
          },
        },
      },
      colors: ['var(--color-1-500)'],
      xaxis: {
        type: 'datetime',
        position: 'bottom',
        axisBorder: {
          show: false,
        },
        axisTicks: {
          show: false,
        },
        tooltip: {
          enabled: true,
        },
        labels: {
          format: `MM/yy`,
          style: {
            colors: 'var(--color-font)',
          },
        },
      },
      yaxis: {
        labels: {
          style: {
            colors: 'var(--color-font)',
          },
        },
      },
      stroke: {
        curve: 'smooth',
      },
      fill: {
        opacity: 0.5,
        colors: [
          () => {
            return props.activeTheme === 'dark' ? '#222529' : primaryColor;
          },
        ],
      },
    };
  };

  return (
    <>
      <ReactApexChart
        options={getBarChartConfig()}
        series={[
          {
            name: props.id === 'releases' ? 'Releases' : 'Packages',
            data: props.series,
          },
        ]}
        type="bar"
        height={300}
      />
      {/* Brush chart is only visible when we have collected data from more than one year */}
      {props.series.length > 12 && (
        <ReactApexChart options={getAreaChartConfig()} series={[{ data: props.series }]} type="area" height={130} />
      )}
    </>
  );
};

```

[web/src/layout/stats/BrushChart.tsx](https://github.com/artifacthub/hub/blob/95f1d3e86be890fd38ada4383eb6f8642b5c810b/web/src/layout/stats/BrushChart.tsx#L26-L261) · [More projects using react-apexcharts →](https://dashboard.exa.ai/playground/search?q=react-apexcharts%20GitHub%20projects)

**Quickstart**

```tsx
import Chart from 'react-apexcharts';
const options = { chart: { id: 'basic-bar' }, xaxis: { categories: ['A', 'B'] } };
const series = [{ name: 'Series', data: [1, 2] }];
export default function Example() { return <Chart options={options} series={series} type="bar" width={400} height={240} />; }

```

From [README.md](https://github.com/apexcharts/react-apexcharts/blob/master/README.md)

### nivo

[GitHub](https://github.com/plouc/nivo) · [npm](https://www.npmjs.com/package/@nivo/line) · [Docs](https://github.com/plouc/nivo/blob/master/website/src/data/components/line/meta.yml)

nivo is a set of chart packages, one per chart type, such as `@nivo/line` and `@nivo/bar`, each exporting a React component. A chart takes its data and settings as props on that one component. Many chart types come in SVG, HTML, and canvas versions. Motion transitions run on react-spring, and the project lists server-side rendering among its features.

- Downloads / mo: 4.6M
- Stars: 14.1K
- Last release: 0.99.0
- License: MIT
- Capabilities: [From the nivo docs](https://github.com/plouc/nivo/blob/master/website/src/data/components/line/meta.yml)

**Strengths**

- **Offers SVG and Canvas renderers.** Choose SVG or Canvas versions of the line chart.

**Watch out for**

- **Canvas drops transitions.** Canvas versions skip transitions and server rendering, which the SVG versions keep.
- **Responsive needs parent height.** A responsive chart renders only inside a parent element with a set height.

```sh
npm install @nivo/line
```

**evidentlyai/evidently** (8.1K stars)

[evidentlyai/evidently](https://github.com/evidentlyai/evidently) 

```tsx
const _LineGraphColumn: React.FunctionComponent<LineGraphColumnProps> = (props) => {
  const theme = useNivoTheme()
  return (
    <Box sx={{ maxWidth: 200, height: 50 }}>
      <ResponsiveLineCanvas
        data={[
          {
            id: '1',
            // biome-ignore lint: FIX IT
            data: props.data[props.xField].map((val: any, idx: number) => ({
              x: val,
              y: props.data[props.yField][idx]
            }))
          }
        ]}
        theme={theme}
        margin={{ top: 0, right: 0, bottom: 0, left: 0 }}
        xScale={{ type: 'linear', min: 0, max: 25 }}
        axisTop={null}
        colors={[props.color]}
        axisRight={null}
        enableGridX={false}
        enableGridY={false}
      />
    </Box>
  )
}

```

[ui/packages/evidently-ui-lib/src/widgets/BigTableWidget/LineGraphColumn.tsx](https://github.com/evidentlyai/evidently/blob/34771fe41c08ca074d96a52aaf4a45cd640cbaf5/ui/packages/evidently-ui-lib/src/widgets/BigTableWidget/LineGraphColumn.tsx#L15-L41) · [More projects using nivo →](https://dashboard.exa.ai/playground/search?q=React%20projects%20that%20use%20%40nivo/line&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { Line } from '@nivo/line';
const data = [{ id: 'Requests', data: [{ x: 'Mon', y: 1 }, { x: 'Tue', y: 2 }] }];
export default function Example() { return <Line width={400} height={240} data={data} />; }

```

From [line.md](https://nivo.rocks/line/)

### react-plotly.js

[GitHub](https://github.com/plotly/react-plotly.js) · [npm](https://www.npmjs.com/package/react-plotly.js)

react-plotly.js renders plotly.js charts through one React component, `Plot`, which takes `data` and `layout` props in the plotly.js format. A single `data` array can mix trace types, such as a scatter line and bars on the same axes. plotly.js installs as its own package. The component calls `Plotly.react` to redraw when `data`, `layout`, or `config` is replaced with a new object.

- Downloads / mo: 3.8M
- Stars: 1.1K
- Last release: 4.1.0
- License: MIT
- Capabilities: [From the react-plotly.js docs](https://github.com/plotly/react-plotly.js)

**Strengths**

- **Mixed trace types.** One `data` array holds lines, bars, and other traces drawn on shared axes.
- **Event callbacks.** Props such as `onUpdate` and `onInitialized` report the figure after each change.

**Watch out for**

- **Updates need new objects.** Editing a data array in place leaves the chart unchanged until `data` is replaced or `revision` changes.
- **Props can be mutated.** The component may change its `layout` and `data` props in response to user input.

```sh
npm install react-plotly.js plotly.js
```

**aimhubio/aim** (6.3K stars)

[aimhubio/aim](https://github.com/aimhubio/aim) 

```tsx
function PlotlyVisualizer(
  props: IPlotlyVisualizerProps,
): React.FunctionComponentElement<React.ReactNode> {
  return (
    <ErrorBoundary>
      <BusyLoaderWrapper
        className='VisualizationLoader'
        isLoading={!!props.isLoading}
      >
        <div className='PlotlyVisualizer'>
          {_.isEmpty(props.data?.processedValue) ? (
            <IllustrationBlock size='xLarge' title='No Tracked Figures' />
          ) : (
            <div className='PlotlyVisualizer__recordCnt'>
              <Plot
                data={props.data?.processedValue?.data}
                layout={props.data?.processedValue?.layout}
                frames={props.data?.processedValue?.frames}
                useResizeHandler={true}
              />
            </div>
          )}
        </div>
      </BusyLoaderWrapper>
    </ErrorBoundary>
  );
}

```

[aim/web/ui/src/pages/RunDetail/PlotlyVisualizer/PlotlyVisualizer.tsx](https://github.com/aimhubio/aim/blob/6e098e38065364c76b2bb7c028f266e53b647642/aim/web/ui/src/pages/RunDetail/PlotlyVisualizer/PlotlyVisualizer.tsx#L13-L39) · [More projects using react-plotly.js →](https://dashboard.exa.ai/playground/search?q=react-plotly.js%20GitHub%20projects)

**Quickstart**

```tsx
import Plot from 'react-plotly.js';

function App() {
  return (
    <Plot
      data={[
        {
          x: [1, 2, 3],
          y: [2, 6, 3],
          type: 'scatter',
          mode: 'lines+markers',
          marker: {color: 'red'},
        },
        {type: 'bar', x: [1, 2, 3], y: [2, 5, 3]},
      ]}
      layout={{width: 320, height: 240, title: {text: 'A Fancy Plot'}}}
    />
  );
}

```

From [README.md](https://github.com/plotly/react-plotly.js/blob/main/README.md)

## FAQ

### Which React chart library should I use?

To build charts from JSX components, use [Recharts](#recharts). For full control over every shape, [visx](#visx-shape) supplies the low-level parts. To use an existing chart engine, pick its wrapper: [react-chartjs-2](#react-chartjs) for Chart.js, [echarts-for-react](#echarts-for-react) for Apache ECharts, or [react-plotly.js](#react-plotly-js) for Plotly.

### Recharts vs Chart.js: which should I use?

Recharts declares each chart as React components and renders SVG. Chart.js, used through [react-chartjs-2](#react-chartjs), draws on a canvas from a data object and an options object, and each chart type, scale, and plugin is registered before use.

### Recharts vs nivo: what's the difference?

Recharts composes a chart from separate components for axes, grids, tooltips, and series. [nivo](#nivo) exports one component per chart type, configured through props, and offers canvas versions of many charts besides SVG.

### Recharts vs visx: what's the difference?

Recharts ships complete chart types such as `LineChart` and `BarChart`. [visx](#visx-shape) ships scales, shapes, and axes as separate packages, and the app assembles its own chart inside an `svg` element.

### How do I make a Recharts chart responsive?

Wrap the chart in `ResponsiveContainer`, which sets the chart's width and height from the size of its parent element.

### What is MUI X Charts?

[MUI X Charts](#mui-x-charts) is a set of React chart components from MUI that render SVG. The community edition is MIT licensed, and the Pro and Premium plans add charts such as funnel and sankey, zoom, export, and WebGL rendering.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "React charting libraries Recharts nivo react-chartjs-2 echarts-for-react SVG Canvas tooltips resizing image export",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
