Chart

Chart container and lightweight sparkline helpers

Bar Chart - Interactive

Showing total visitors for the last 3 months

Apr 2Apr 6Apr 10Apr 14Apr 18Apr 22Apr 26Apr 30
import { BarSparkline, ChartContainer } from '@/components/ui/chart'

...

Installation

npx @fictjs/shadcn@latest add chart

Usage


  BarSparkline,
  ChartContainer,
  ChartLegend,
  ChartTooltipContent,
} from "@/components/ui/chart"

Examples

Example

import { BarSparkline, ChartContainer } from '@/components/ui/chart'

...

Example Grid

import { BarSparkline, ChartContainer } from '@/components/ui/chart'

...

Example Axis

JanFebMarAprMayJun
import { BarSparkline, ChartContainer } from '@/components/ui/chart'

...

Example Tooltip

JanFebMarAprMayJun
import { BarSparkline, ChartContainer } from '@/components/ui/chart'

...

Example Legend

JanFebMarAprMayJun
DesktopMobile
import { BarSparkline, ChartContainer, ChartLegend } from '@/components/ui/chart'

...

Tooltip

Page ViewsDesktop 186Mobile 80
Chrome 1,286Firefox 1,000
Page ViewsDesktop 12,486
Chrome 1,286
import { ChartTooltipContent } from '@/components/ui/chart'

...

Rtl

يونمايأبرمارفبرينا
سطح المكتبالجوال
import { BarSparkline, ChartContainer, ChartLegend } from '@/components/ui/chart'

...