Skip to main content
Pie or donut chart.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "PieChart",
      "default": "PieChart",
      "type": "string"
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling"
    },
    "data": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "string"
        }
      ],
      "description": "Row data or {{ interpolation }} reference"
    },
    "dataKey": {
      "description": "Numeric value field",
      "type": "string"
    },
    "nameKey": {
      "description": "Label field",
      "type": "string"
    },
    "height": {
      "default": 300,
      "description": "Chart height in pixels",
      "type": "integer"
    },
    "innerRadius": {
      "default": 0,
      "description": "Inner radius (>0 for donut)",
      "type": "integer"
    },
    "showLabel": {
      "default": false,
      "description": "Show labels on slices",
      "type": "boolean"
    },
    "paddingAngle": {
      "default": 0,
      "description": "Gap between slices in degrees",
      "type": "integer"
    },
    "showLegend": {
      "default": false,
      "description": "Show legend",
      "type": "boolean"
    },
    "showTooltip": {
      "default": true,
      "description": "Show tooltip on hover",
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "data",
    "dataKey",
    "nameKey"
  ]
}