{
    "title": "InputData",
    "description": "A doughnut/pie chart widget for visualizing proportional data as circular segments. Use this widget to display part-to-whole relationships, such as market share percentages, budget allocations, or category distributions. Supports multiple doughnut rings, pivot-based auto-generation of series from data columns, and configurable hole size (set to 0% for pie chart). Best for datasets with 2-8 categories where comparing relative proportions is important.",
    "type": "object",
    "properties": {
        "title": {
            "title": "Title",
            "description": "The main heading displayed above the doughnut chart. Use to describe what data is being visualized.",
            "order": 1,
            "type": "string"
        },
        "subTitle": {
            "title": "Subtitle",
            "description": "Secondary text displayed below the title. Use for additional context like time period, data source, or units.",
            "order": 2,
            "type": "string"
        },
        "columnLayout": {
            "title": "Vertical Layout",
            "description": "When enabled, multiple doughnut charts are arranged vertically (stacked). When disabled, they are arranged horizontally (side by side).",
            "order": 3,
            "dataDrivenDisabled": true,
            "type": "boolean"
        },
        "dataseries": {
            "title": "Doughnuts",
            "description": "Array of doughnut chart configurations. Each entry creates a separate doughnut ring that can display different data or perspectives of the same dataset.",
            "type": "array",
            "order": 4,
            "dataDrivenDisabled": true,
            "items": {
                "type": "object",
                "properties": {
                    "label": {
                        "title": "Label",
                        "description": "The name identifier for this doughnut chart. Displayed in legends and tooltips.",
                        "order": 1,
                        "required": true,
                        "type": "string"
                    },
                    "settings": {
                        "title": "Settings",
                        "description": "Configuration options for the doughnut appearance and data processing.",
                        "type": "object",
                        "order": 3,
                        "properties": {
                            "cutout": {
                                "title": "Doghnut Hole Size",
                                "description": "How big in percent should the hole in the middle of the doughnut be? Set to 0% for Pie Chart. Common values: 50% for standard doughnut, 70% for thin ring.",
                                "order": 4,
                                "dataDrivenDisabled": true,
                                "type": "string"
                            },
                            "averageLatest": {
                                "title": "Average Latest Values",
                                "description": "Calculate the average over the given number of newest rows. (If pivoted, then per each of the pivot dataseries.) If not specified then the latest value is shown without modification. Useful for smoothing volatile data.",
                                "order": 7,
                                "dataDrivenDisabled": true,
                                "type": "number"
                            }
                        }
                    },
                    "sections": {
                        "title": "Data",
                        "description": "The table with columns to display as sections in the doughnut. Each section represents a slice of the chart.",
                        "order": 2,
                        "type": "array",
                        "items": {
                            "title": "Sections of the Doughnut",
                            "description": "One doughnut ring will be drawn for the latest row in the chosen table. Each item in this array defines a section/slice.",
                            "type": "array",
                            "dataDrivenDisabled": true,
                            "items": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "title": "Section Label",
                                        "description": "Display name for this doughnut section shown in tooltips and legends. Should be a chosen constant and usually not be assigned dynamically by a table column value.",
                                        "order": 1,
                                        "type": "string"
                                    },
                                    "value": {
                                        "title": "Value",
                                        "description": "The numeric value determining the size of this section relative to other sections. Can be bound to a data column for dynamic updates.",
                                        "type": "number",
                                        "order": 2,
                                        "required": true
                                    },
                                    "color": {
                                        "title": "Section Color",
                                        "description": "The fill color for this doughnut section. Should be a chosen constant and usually not be assigned dynamically by a table column value. Use distinct colors for each section to improve readability.",
                                        "order": 3,
                                        "type": "color",
                                        "color": true
                                    },
                                    "pivot": {
                                        "title": "Split Data by",
                                        "description": "You can specify a column in the input data to autogenerate dataseries for each distinct entry in this column. E.g. if you have a table with columns [city, timestamp, temperature] and specify 'city' as split column, then you will get a doughnut for each city.",
                                        "order": 4,
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
