# Skill: effect/data-chart — "גרף מונפש" (Animated chart)

Bars grow, a line draws itself or a donut fills round — with labels and values counting up.
עמודות גדלות, קו מצייר את עצמו או דונאט מתמלא — עם תוויות וערכים שעולים.

Category: Overlays & graphics · שכבות וגרפיקה · a real preview: https://media.gpt.org.il/lookbook/effects/data-chart.mp4?v=mv19exzc
Price: **60 credits per finished minute**: the render itself — 1 credit per second of 1080p output. Combined with captions, a hook or other effects: still one render, nothing more for combining.

Base URL: `https://apihub.co.il` · Auth: `Authorization: Bearer <API key>` · Docs: `/docs` (group "Video Effects")
Send `X-Tag: <job name>` on every call of one video; `GET /v1/usage?tag=<job name>` returns what it cost.
**Files are kept 24 hours** — download the finished video.

---

## 1. On its own — one call

```jsonc
POST /v1/effects/data-chart             // x-wait-ms: 110000
{
  "video_url": "https://media.gpt.org.il/samples/sample-he.mp4",
  "start": 0.2,
  "duration": 4.6,
  "params": {
    "title": "צפיות לפי חודש",
    "suffix": "K",
    "data": [
      {
        "label": "ינואר",
        "value": 12
      },
      {
        "label": "פברואר",
        "value": 19
      },
      {
        "label": "מרץ",
        "value": 31
      },
      {
        "label": "אפריל",
        "value": 54
      }
    ],
    "y": 8,
    "height": 32
  }
}
```

A normal render: `status: processing` → poll `GET /v1/executions/{id}` until `completed`, then read `output.url`.

When it plays: a stretch: `start` + `duration` (seconds of the finished video), or `at` (a word id) + `duration`, or `during` { from, to } (word ids).

## 2. With captions, a hook and other effects — the same render

```jsonc
POST /v1/studio/edit               // x-wait-ms: 110000
{
  "video_url": "<the video>",
  "language_code": "he",
  "captions": {
    "style": "classic"
  },
  "effects": [
    {
      "id": "data-chart",
      "params": {
        "title": "צפיות לפי חודש",
        "suffix": "K",
        "data": [
          {
            "label": "ינואר",
            "value": 12
          },
          {
            "label": "פברואר",
            "value": 19
          },
          {
            "label": "מרץ",
            "value": 31
          },
          {
            "label": "אפריל",
            "value": 54
          }
        ],
        "y": 8,
        "height": 32
      },
      "start": 0.2,
      "duration": 4.6
    }
  ],
  "audio": {
    "normalize": true
  },
  "output": {
    "aspect_ratio": "9:16",
    "resolution": "1080",
    "fit": "crop",
    "quality": "high"
  }
}
```

`effects` is a list: add more entries for more effects. The engine applies them by pipeline stage (cuts and time →
camera → grade and looks → overlays → text and captions → sound), never by their order in the list. An edit has one
`transition`, one `color` grade, one `music` bed, one `speed` and one caption style: two effects that set the same
one are refused with a message that names them.

## 3. Params

| param | default | range / options | what it does |
|---|---|---|---|
| `type` | `"bar"` | `bar` · `hbar` · `line` · `donut` | bar = upright bars · hbar = bars across · line · donut |
| `data` | **required** | list | The values, in order |
| `title` | `""` | string | A title over the chart |
| `prefix` | `""` | string | Before each value (₪, $…) |
| `suffix` | `""` | string | After each value (%, K…) |
| `decimals` | `null` | value | Decimals shown (null = as the data has them) |
| `colors` | `[]` | list | The colours (bars use the first; a donut one per slice) — empty = ours |
| `text_color` | `"#FFFFFF"` | string | Labels and values |
| `values` | `true` | boolean | Show the values, counting up |
| `panel` | `true` | boolean | A dark panel behind the chart |
| `y` | `12` | 2–90 | Top of the chart, % from the top |
| `height` | `34` | 10–90 | The chart's height, % of the frame |
| `label_size` | `2.1` | 1–6 | Label size, % of the frame height |
| `draw_ms` | `1600` | 200–60000 | How long it takes to draw, ms |
| `hole` | `0.58` | 0–0.9 | donut: the hole's size (0 = a pie) |
| `direction` | `"auto"` | `auto` · `rtl` · `ltr` | Which side the first value is on (auto = right for Hebrew labels) |

GET `/v1/effects/data-chart` returns the same as JSON (with the full body schema). Every field has a default; numbers
outside their range are refused with the field's name.
