---
title: "drawing.insert: Insert Drawing Object — Sheet kit command — Kition"
description: "Inserts a drawing object (shape, text box or chart) with geometry, a frame in sheet points, placement, fill, stroke and text; answers its id."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/drawing.insert"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/sheet/commands/drawing.insert](https://developer.kition.ai/docs/kits/sheet/commands/drawing.insert)

# drawing.insert

**Insert Drawing Object.** Inserts a drawing object (shape, text box or chart) with geometry, a frame in sheet points, placement, fill, stroke and text; answers its id.

- Kit: Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb)); reference: [Sheet kit commands](https://developer.kition.ai/docs/kits/sheet.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | `any` | no | read by the command beside its listed parameters |
| `chart` | `object` | no | {kind?, title?, legend?, dataLabels?, gridlines?, xTitle?, yTitle?} (a chart of the selected cells, or of `range`); a chart of the selected cells, or of `range` |
| `fill` | `any` | no |  |
| `frame` | `object` | no | {x,y,w,h,rot?,flipH?,flipV?} (sheet points); sheet points |
| `geometry` | `object` | no | {preset, adjust?} |
| `kind` | `"shape" \| "textBox" \| "chart"` | no |  |
| `paragraphs` | `any[]` | no | read by the command beside its listed parameters |
| `placement` | `object` | no | {kind: cell, mode?} |
| `range` | `string` | no | cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection |
| `stroke` | `any` | no |  |
| `text` | `string` | no |  |
| `warp` | `any` | no | read by the command beside its listed parameters |

## Call through sheet_run

```text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "drawing.insert" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `body`, `chart`, `fill`, `frame`, `geometry`, `kind`, `paragraphs`, `placement`, `range`, `stroke`, `text`, `warp`. sheet_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "body": {
      "description": "read by the command beside its listed parameters"
    },
    "chart": {
      "additionalProperties": true,
      "description": "{kind?, title?, legend?, dataLabels?, gridlines?, xTitle?, yTitle?} (a chart of the selected cells, or of `range`); a chart of the selected cells, or of `range`",
      "properties": {
        "dataLabels": {},
        "gridlines": {},
        "kind": {},
        "legend": {},
        "title": {
          "type": "string"
        },
        "xTitle": {},
        "yTitle": {}
      },
      "type": "object"
    },
    "fill": {},
    "frame": {
      "additionalProperties": true,
      "description": "{x,y,w,h,rot?,flipH?,flipV?} (sheet points); sheet points",
      "properties": {
        "flipH": {},
        "flipV": {},
        "h": {
          "type": "number"
        },
        "rot": {},
        "w": {
          "type": "number"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "geometry": {
      "additionalProperties": true,
      "description": "{preset, adjust?}",
      "properties": {
        "adjust": {},
        "preset": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "kind": {
      "enum": [
        "shape",
        "textBox",
        "chart"
      ],
      "type": "string"
    },
    "paragraphs": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "placement": {
      "additionalProperties": true,
      "description": "{kind: cell, mode?}",
      "properties": {
        "kind": {
          "description": "cell"
        },
        "mode": {}
      },
      "type": "object"
    },
    "range": {
      "description": "cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection",
      "type": "string"
    },
    "stroke": {},
    "text": {
      "type": "string"
    },
    "warp": {
      "description": "read by the command beside its listed parameters"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/sheet-darwin-arm64@0.1.0 and the kit itself (sheet_commands through @kition/cli@0.1.1, built from KitionAI/kition-sheet@82f13b2).
