# Day clock chart

Day clock wraps a day around a clock face. Hand it 24 values, midnight first, and it lights the busiest hour or the hour you mark. Use it to show when someone works: a night owl, an early bird.

> Live preview: see the chart playing at https://bettertyped.github.io/react-wrapped/docs/charts/clock/
>
> A day, hour by hour. The lit hour is the busiest.

## Installation

```bash
pnpm add @react-wrapped/charts @react-wrapped/core gsap
```

## Usage

A chart is data, not markup. Hand a scene an object with `type` set and the numbers to draw, and the scene draws it and plays its entrance on the video's timeline.

```tsx
import { chartScene } from "@react-wrapped/scenes";

export const scene = chartScene(
  {
    eyebrow: "Your year",
    title: ["Day clock."],
    lede: "A day, hour by hour. The lit hour is the busiest.",
    chart: {
      type: "clock",
      hours: [
        5, 3, 1, 0, 0, 0, 1, 3, 6, 10, 12, 11,
        // ...and 12 more
      ],
    },
  },
  { key: "clock", label: "Day clock" },
);
```

## Props

| Prop | Type | What it does |
| --- | --- | --- |
| `type` | `"clock"` | Picks this chart. |
| `hours` | `readonly number[]` | 24 values, midnight first. |
| `mark` | `number` | The hour to light, 0 to 23. The busiest hour when left out. |

## How it comes in

Every chart plays in the order it is read: what it is made of stands first, the numbers arrive with a direction, and the one thing the chart is about lands last with its pill. Nothing is on screen before its own entrance. See [how charts animate](https://bettertyped.github.io/react-wrapped/docs/charts/) for the shared rules.

## Related

- [Charts](https://bettertyped.github.io/react-wrapped/docs/charts/)
- [Wheel chart](https://bettertyped.github.io/react-wrapped/docs/charts/wheel/)
- [River chart](https://bettertyped.github.io/react-wrapped/docs/charts/river/)
- [Where you stand chart](https://bettertyped.github.io/react-wrapped/docs/charts/standing/)
- [Transitions](https://bettertyped.github.io/react-wrapped/docs/transitions/)

Source: https://bettertyped.github.io/react-wrapped/docs/charts/clock/
