Vector kit command

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)
Changes the document
yes
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of graph.setType
NameTypeRequiredDescription
axisMaxnumberno
axisMinnumberno
categoryTickLength"none" | "short" | "full"no
categoryTickMarksintegerno
clusterWidthnumbernopercent
columnWidthnumbernopercent
connectPointsbooleanno
edgeToEdgebooleannoline graphs: true runs the lines across the whole plot, false puts the points at the centres of their categories
idintegernoobject ID
legendbooleanno
markPointsbooleanno
prefixstringno
rightAxisMaxnumberno
rightAxisMinnumberno
rightPrefixstringno
rightSuffixstringno
rightTickLength"none" | "short" | "full"no
rightTickMarksintegerno
rightTicksintegerno
separateScalesbooleanno
seriesIndexesinteger[]no
suffixstringno
tickLength"none" | "short" | "full"no
tickMarksintegerno
ticksintegerno
ticksBetweenLabelsbooleanno
type"column" | "stackedColumn" | "bar" | "stackedBar" | "line" | "area" | "scatter" | "pie" | "radar"no
valueAxis"left" | "right" | "both"nothe 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/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.