---
title: "graph.setType: Type… — Vector kit command — Kition"
description: "Changes a graph's type and options: column and cluster width, legend, markers, axes ranges, ticks and labels."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/graph.setType"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/graph.setType](https://developer.kition.ai/docs/kits/vector/commands/graph.setType)

# graph.setType

**Type….** Changes a graph's type and options: column and cluster width, legend, markers, axes ranges, ticks and labels.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `axisMax` | `number` | no |  |
| `axisMin` | `number` | no |  |
| `categoryTickLength` | `"none" \| "short" \| "full"` | no |  |
| `categoryTickMarks` | `integer` | no |  |
| `clusterWidth` | `number` | no | percent |
| `columnWidth` | `number` | no | percent |
| `connectPoints` | `boolean` | no |  |
| `edgeToEdge` | `boolean` | no | line graphs: true runs the lines across the whole plot, false puts the points at the centres of their categories |
| `id` | `integer` | no | object ID |
| `legend` | `boolean` | no |  |
| `markPoints` | `boolean` | no |  |
| `prefix` | `string` | no |  |
| `rightAxisMax` | `number` | no |  |
| `rightAxisMin` | `number` | no |  |
| `rightPrefix` | `string` | no |  |
| `rightSuffix` | `string` | no |  |
| `rightTickLength` | `"none" \| "short" \| "full"` | no |  |
| `rightTickMarks` | `integer` | no |  |
| `rightTicks` | `integer` | no |  |
| `separateScales` | `boolean` | no |  |
| `seriesIndexes` | `integer[]` | no |  |
| `suffix` | `string` | no |  |
| `tickLength` | `"none" \| "short" \| "full"` | no |  |
| `tickMarks` | `integer` | no |  |
| `ticks` | `integer` | no |  |
| `ticksBetweenLabels` | `boolean` | no |  |
| `type` | `"column" \| "stackedColumn" \| "bar" \| "stackedBar" \| "line" \| "area" \| "scatter" \| "pie" \| "radar"` | no |  |
| `valueAxis` | `"left" \| "right" \| "both"` | no | the bar graphs' value axis stays along the bottom |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "graph.setType" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `axisMax`, `axisMin`, `categoryTickLength`, `categoryTickMarks`, `clusterWidth`, `columnWidth`, `connectPoints`, `edgeToEdge`, `id`, `legend`, `markPoints`, `prefix`, `rightAxisMax`, `rightAxisMin`, `rightPrefix`, `rightSuffix`, `rightTickLength`, `rightTickMarks`, `rightTicks`, `separateScales`, `seriesIndexes`, `suffix`, `tickLength`, `tickMarks`, `ticks`, `ticksBetweenLabels`, `type`, `valueAxis`. vector_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": {
    "axisMax": {
      "type": "number"
    },
    "axisMin": {
      "type": "number"
    },
    "categoryTickLength": {
      "enum": [
        "none",
        "short",
        "full"
      ],
      "type": "string"
    },
    "categoryTickMarks": {
      "type": "integer"
    },
    "clusterWidth": {
      "description": "percent",
      "type": "number"
    },
    "columnWidth": {
      "description": "percent",
      "type": "number"
    },
    "connectPoints": {
      "type": "boolean"
    },
    "edgeToEdge": {
      "description": "line graphs: true runs the lines across the whole plot, false puts the points at the centres of their categories",
      "type": "boolean"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "legend": {
      "type": "boolean"
    },
    "markPoints": {
      "type": "boolean"
    },
    "prefix": {
      "type": "string"
    },
    "rightAxisMax": {
      "type": "number"
    },
    "rightAxisMin": {
      "type": "number"
    },
    "rightPrefix": {
      "type": "string"
    },
    "rightSuffix": {
      "type": "string"
    },
    "rightTickLength": {
      "enum": [
        "none",
        "short",
        "full"
      ],
      "type": "string"
    },
    "rightTickMarks": {
      "type": "integer"
    },
    "rightTicks": {
      "type": "integer"
    },
    "separateScales": {
      "type": "boolean"
    },
    "seriesIndexes": {
      "items": {
        "description": "a position counted from 0 (the first is 0)",
        "type": "integer"
      },
      "type": "array"
    },
    "suffix": {
      "type": "string"
    },
    "tickLength": {
      "enum": [
        "none",
        "short",
        "full"
      ],
      "type": "string"
    },
    "tickMarks": {
      "type": "integer"
    },
    "ticks": {
      "type": "integer"
    },
    "ticksBetweenLabels": {
      "type": "boolean"
    },
    "type": {
      "enum": [
        "column",
        "stackedColumn",
        "bar",
        "stackedBar",
        "line",
        "area",
        "scatter",
        "pie",
        "radar"
      ],
      "type": "string"
    },
    "valueAxis": {
      "description": "the bar graphs' value axis stays along the bottom",
      "enum": [
        "left",
        "right",
        "both"
      ],
      "type": "string"
    }
  },
  "returns": "the current ones",
  "type": "object"
}
```

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