---
title: "chart.options: Chart Elements — Slide kit command — Kition"
description: "Sets which chart elements show (title, legend position, data labels, gridlines), the colour palette (colorful1–4, monochrome1–13; others are refused), series colours, gap width and overlap of the selected or named chart."
canonical: "https://developer.kition.ai/docs/kits/slide/commands/chart.options"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/slide/commands/chart.options](https://developer.kition.ai/docs/kits/slide/commands/chart.options)

# chart.options

**Chart Elements.** Sets which chart elements show (title, legend position, data labels, gridlines), the colour palette (colorful1–4, monochrome1–13; others are refused), series colours, gap width and overlap of the selected or named chart.

- Kit: Slide 0.1.0 (.kslide and .pptx); reference: [Slide kit commands](https://developer.kition.ai/docs/kits/slide.md)
- Changes the document: yes
- Acts on: `id` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `colors` | `string[]` | no | one per series, or per point when coloured by point |
| `dataLabels` | `boolean` | no |  |
| `gapWidth` | `integer` | no | 0 to 500; % |
| `gridlines` | `boolean` | no |  |
| `id` | `integer \| string` | no |  |
| `legend` | `"b" \| "t" \| "l" \| "r" \| null` | no | legend position, null for none |
| `onSlide` | `integer` | no | the slide the ids are on, from 1 |
| `overlap` | `integer` | no | -100 to 100; % |
| `palette` | `string` | no | a palette name |
| `title` | `string \| null` | no | chart title, null for none |

## Call through slide_run

```text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "chart.options" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `colors`, `dataLabels`, `gapWidth`, `gridlines`, `id`, `legend`, `onSlide`, `overlap`, `palette`, `title`. slide_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": {
    "colors": {
      "description": "one per series, or per point when coloured by point",
      "items": {
        "description": "a colour such as #rrggbb",
        "type": "string"
      },
      "type": "array"
    },
    "dataLabels": {
      "type": "boolean"
    },
    "gapWidth": {
      "description": "0 to 500; %",
      "type": "integer"
    },
    "gridlines": {
      "type": "boolean"
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Shape"
      ]
    },
    "legend": {
      "description": "legend position, null for none",
      "oneOf": [
        {
          "enum": [
            "b",
            "t",
            "l",
            "r"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "onSlide": {
      "description": "the slide the ids are on, from 1",
      "type": "integer"
    },
    "overlap": {
      "description": "-100 to 100; %",
      "type": "integer"
    },
    "palette": {
      "description": "a palette name",
      "type": "string"
    },
    "title": {
      "description": "chart title, null for none",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}
```

Generated from the command list of @kition/slide-darwin-arm64@0.1.0 and the kit itself (slide_commands through @kition/cli@0.1.1, built from KitionAI/kition-slide@7ef3d11).
