{
  "type": "bar-chart",
  "description": "Bar chart driven by DuckDB SQL query.",
  "hasChildren": false,
  "propsSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "sql": {
        "type": "string",
        "description": "DuckDB SQL query with {{udf_name}} and $param_name placeholders. Must return 'label' and 'value' columns."
      },
      "title": {
        "description": "Chart title displayed above",
        "type": "string"
      },
      "barColor": {
        "default": "#E8FF59",
        "description": "Bar fill color. Default is Fused lime yellow (#E8FF59).",
        "type": "string"
      },
      "barOpacity": {
        "default": 1,
        "description": "Bar fill opacity from 0 (transparent) to 1 (solid).",
        "type": "number"
      },
      "barRadius": {
        "default": 4,
        "description": "Corner radius of bars in pixels. 0 for sharp corners.",
        "type": "number"
      },
      "hoverColor": {
        "description": "Bar fill color on hover. If omitted, no hover highlight is shown.",
        "type": "string"
      },
      "showGrid": {
        "default": false,
        "description": "Show subtle horizontal grid lines behind bars.",
        "type": "boolean"
      },
      "rotateLabels": {
        "default": true,
        "description": "Rotate x-axis labels -45 degrees. Useful for long category names.",
        "type": "boolean"
      },
      "horizontal": {
        "default": false,
        "description": "If true, renders horizontal bars (categories on y-axis, values on x-axis). Good for ranked lists.",
        "type": "boolean"
      },
      "showValues": {
        "default": false,
        "description": "Show the numeric value label on each bar.",
        "type": "boolean"
      },
      "xAxisFontSize": {
        "default": 11,
        "description": "Font size for x-axis labels in pixels.",
        "type": "number"
      },
      "yAxisFontSize": {
        "default": 11,
        "description": "Font size for y-axis labels in pixels.",
        "type": "number"
      },
      "bottomMargin": {
        "description": "Bottom margin in pixels. Overrides the auto-calculated value from rotateLabels. Useful when labels are clipped.",
        "type": "number"
      },
      "beginAtZero": {
        "default": true,
        "description": "Force the value axis to start at 0.",
        "type": "boolean"
      },
      "animationMs": {
        "default": 300,
        "description": "Bar animation duration in milliseconds. 0 disables animation. Default 300ms, and animation only runs when data changes.",
        "type": "number"
      },
      "style": {
        "description": "Inline CSS styles as a plain CSS string (e.g., \"padding: 8px; background-color: #1a1a1a\")",
        "type": "string"
      }
    },
    "required": [
      "sql"
    ],
    "description": "A bar chart powered by DuckDB SQL queries against UDF outputs. Query must return 'label' and 'value' columns. Uses {{udf_name}} placeholders to reference UDF DataFrames."
  }
}
