# Fasting glucose line chart

> Fasting glucose readings, as a line chart with dots.

A shadcn/ui block from the [@organui](https://organui.com/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/organui/chart-line-glucose).

- Page, with a live preview: https://shadcn.exchange/r/organui/chart-line-glucose
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/organui/chart-line-glucose-light-a4d06f7d50cb599a.png
- Registry item: https://organui.com/r/chart-line-glucose.json
- Categories: charts, charts-line
- Listed: 2026-10-22, source last changed 2026-10-22

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/organui/chart-line-glucose.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `recharts`
- Registry items: `card`, `chart`

## Notes from the registry

Fasting glucose line chart: https://organui.com/charts/line#chart-line-glucose

## Files

### `registry/base-nova/charts/chart-line-glucose.tsx`

```tsx
"use client"

import { CartesianGrid, Line, LineChart, XAxis } from "recharts"

import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  type ChartConfig,
} from "@/components/ui/chart"

export const description = "Fasting glucose readings, as a line chart with dots"

// Fasting fingerstick readings in mg/dL, a fictional patient.
const chartData = [
  { day: "Mon", glucose: 132 },
  { day: "Tue", glucose: 124 },
  { day: "Wed", glucose: 141 },
  { day: "Thu", glucose: 118 },
  { day: "Fri", glucose: 112 },
  { day: "Sat", glucose: 121 },
  { day: "Sun", glucose: 108 },
]

const chartConfig = {
  glucose: {
    label: "Glucose (mg/dL)",
    color: "var(--chart-2)",
  },
} satisfies ChartConfig

export function ChartLineGlucose() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Fasting glucose</CardTitle>
        <CardDescription>Fingerstick readings, one week</CardDescription>
      </CardHeader>
      <CardContent>
        <ChartContainer config={chartConfig}>
          <LineChart
            accessibilityLayer
            data={chartData}
            margin={{ left: 12, right: 12 }}
          >
            <CartesianGrid vertical={false} />
            <XAxis
              dataKey="day"
              tickLine={false}
              axisLine={false}
              tickMargin={8}
            />
            <ChartTooltip
              cursor={false}
              content={<ChartTooltipContent hideLabel />}
            />
            <Line
              dataKey="glucose"
              type="natural"
              stroke="var(--color-glucose)"
              strokeWidth={2}
              dot={{ fill: "var(--color-glucose)" }}
              activeDot={{ r: 6 }}
            />
          </LineChart>
        </ChartContainer>
      </CardContent>
      <CardFooter className="text-sm text-muted-foreground">
        Trending down toward target; a fictional patient.
      </CardFooter>
    </Card>
  )
}
```
