Hello again — it's Brandon from Outerbase an AI Data Platform. As you can probably imagine I get the privilege to work with a lot of data. And like most sane people I prefer to visualize my data in the form of charts vs. navigating tables, rows, and columns all day (although those people do exist).
Contrary to what most BI tools want you to believe, charts and graphs can actually be beautiful, and helpful. However, with so many libraries out there, choosing the right one can feel overwhelming.
Here are five that I keep an eye out on:
If you are serious about building some next-level, eye-candy data viz, you're going to find what you’re looking for in one of the libraries below.
1. shadcn
shadcn if you're in the frontend world you most likely heard of them. shadcn is a Vercel backed component library who recently introduced their chart components. shadcn sits on top of Recharts and it provides chart components that look great from the start. You can copy and paste them into your app and still leverage Recharts’ full capabilities.
I like that shadcn doesn’t lock users into custom abstractions. When Recharts updates, tjhey don’t have to wait on shadcn to catch up. Instead users can adopt those new features right away.
Here’s a quick example of what this might look like:
import { Bar, BarChart } from "recharts"
import { ChartContainer, ChartTooltipContent } from "@/components/ui/charts"
export function MyChart() {
const data = [
{ label: 'Jan', value: 30 },
{ label: 'Feb', value: 55 },
{ label: 'Mar', value: 40 },
];
return (
<ChartContainer>
<BarChart data={data}>
<Bar dataKey="value" />
<ChartTooltip content={<ChartTooltipContent />} />
</BarChart>
</ChartContainer>
)
}
Why Shadcn?
- Attractive defaults with minimal setup.
- Based on Recharts, so it’s easy to extend.
- Pull in Recharts updates whenever you want.
2. Tremor
Tremor is a library of React components for charts and dashboards, and surprisingly enough they too were just acquired by Vercel (I'm sensing a pattern here...) It has 35+ open-source pieces built on React, Tailwind CSS, and Radix UI. It’s a popular choice for anyone who wants production-ready visuals without a lot of fuss.
Tremor also focuses on accessibility and keyboard navigation. If you need a quick dashboard with minimal friction, Tremor is worth a look.
Here’s a short sample code snippet:
import { Card, Title, BarChart } from '@tremor/react';
export default function Example() {
const chartData = [
{ day: 'Mon', sales: 10 },
{ day: 'Tue', sales: 20 },
{ day: 'Wed', sales: 15 },
];
return (
<Card>
<Title>Sales Overview</Title>
<BarChart
data={chartData}
dataKey="day"
categories={["sales"]}
colors={["blue"]}
/>
</Card>
);
}
Why Tremor?
- Clean defaults and beautiful styling.
- Large set of UI elements, not just charts.
- Good accessibility baked in.
3. Astra UI by Outerbase
Astra UI is a web-component library built on top of Apache ECharts. Because it’s using ECharts under the hood, the customization options are basically endless. The web component approach is really interesting — it means you can embed these charts anywhere, whether you are using React, Vue, Svelte, or just plain ole HTML.
A big plus is how Astra UI integrates with Outerbase's data platform. For instance Outerbase can provide live - updating data via their CDC (Change Data Capture) system, so your charts can always be up to date.
Here’s a short example:
<astra-composed-chart
type="line"
data={stocksData}
keyX="Date"
keyY="Close"
width="600"
height="400"
header="Stock Prices"
subheader="Daily closing prices"
></astra-composed-chart>
Why Astra UI?
- Powered by Apache ECharts, so it’s both powerful and flexible.
- Web components mean you aren’t tied to a specific framework.
- Live-updating charts are possible with Outerbase’s CDC.
If you’re already using Outerbase or want a simpler path to real-time data, Astra UI might be a strong choice. Outerbase's AI can even automatically generate the charts for you.
4. visx
visx is a lower-level set of visualization primitives from Airbnb. It uses D3 under the hood but exposes everything as React components. I like visx for situations where I need total control over how my data is displayed, right down to the smallest detail.
visx is also unopinionated about styling, so it lets me bring my own approach for animations, state management, or theming. That can be good or bad, depending on how much structure you like in a library.
Here’s an example of a grouped bar chart with visx:
import { BarGroup } from '@visx/shape';
import { Group } from '@visx/group';
import { scaleBand, scaleLinear, scaleOrdinal } from '@visx/scale';
export function MyVisxChart({ data }) {
const x0Scale = scaleBand({
domain: data.map(d => d.category),
padding: 0.2,
range: [0, 400],
});
const x1Scale = scaleBand({
domain: ['valueA', 'valueB'],
padding: 0.1,
range: [0, x0Scale.bandwidth()],
});
const yScale = scaleLinear({
domain: [0, Math.max(...data.flatMap(d => [d.valueA, d.valueB]))],
range: [300, 0],
});
const colorScale = scaleOrdinal({
domain: ['valueA', 'valueB'],
range: ['#008080', '#800080'],
});
return (
<svg width={500} height={400}>
<Group left={50} top={50}>
<BarGroup
data={data}
keys={['valueA', 'valueB']}
height={300}
x0Scale={x0Scale}
x1Scale={x1Scale}
yScale={yScale}
color={colorScale}
/>
</Group>
</svg>
);
}
Why visx?
- Very flexible and unopinionated.
- Lets you build truly custom visualizations.
- Splits into multiple packages, so you can keep your bundle size small.
5. nivo
nivo is another React library that relies on d3 under the hood. It offers a huge variety of chart types and is helpful if you need server-side rendering. I also like that it uses react-spring for smooth transitions and animations.
One of my favorite features is its playground, which lets you experiment with chart configurations and see the changes live. Here’s a basic example of a bar chart in nivo:
import { ResponsiveBar } from '@nivo/bar'
const data = [
{ country: 'AD', hotDog: 75 },
{ country: 'AE', hotDog: 92 },
];
export const MyBarChart = () => (
<div style={{ height: 400 }}>
<ResponsiveBar
data={data}
keys={['hotDog']}
indexBy="country"
margin={{ top: 50, right: 50, bottom: 50, left: 60 }}
colors={{ scheme: 'category10' }}
borderColor={{ from: 'color', modifiers: [['darker', 1.6]] }}
axisBottom={{
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: 'Country',
legendPosition: 'middle',
legendOffset: 32,
}}
/>
</div>
);
Why nivo?
- Tons of chart types out of the box.
- Server-side rendering for SEO or performance needs.
- Smooth animations and transitions via react-spring.
Conclusion
Choosing the right data visualization library depends on the job at hand. If you're already using nextjs and want something fast, Shadcn is a good bet. Tremor is handy if you need a whole dashboard solution without writing everything from scratch. If you value powerful, customizable, and beautiful charts out of the box, Astra UI by Outerbase might be perfect. visx is great if you prefer building things from the ground up, and nivo is a strong option if you want a wide range of chart types with advanced transitions or server-side rendering.
I always remind myself that the best charting library is the one that helps me (and my users) see and understand the data the fastest. If you’re looking for a self-hosted or hosted platform to manage your data—and want an easy way to embed live-updated charts—check out Outerbase with Astra UI. It’s a neat solution that doesn’t force you to build it all out myself.
Above all, data visualization should be clear, quick, and delightful. These libraries each take a different path to that same goal. Whichever you choose, I hope you have fun turning your data into insights.
Top comments (4)
how did you embed that chart?? thats amazing :D
thank you! honestly since I'm using outerbase it was literally two clicks:
1 clicking the embed button
2 pasting it in glitch (I would have pasted it in dev.to had they allowed me)
Hey,
that's a nice list!
Happy to add these libs to faelib.com database.
That would be great!