Waffle Chart Panel Configuration¶
The Waffle chart panel visualizes categorical data as a grid of colored squares, where each square represents a proportion of the whole. Waffle charts support exactly one metric and an optional breakdown.
Lens Waffle Charts¶
Represents a Waffle chart configuration within a Lens panel.
Waffle charts visualize categorical data as a grid of colored squares, where each square represents a proportion of the whole. Waffle charts support exactly one metric and an optional breakdown.
Examples:
Simple waffle chart showing request distribution:
lens:
type: waffle
data_view: "logs-*"
breakdown:
field: "http.request.method"
type: values
metric:
aggregation: count
Waffle chart with custom colors:
lens:
type: waffle
data_view: "metrics-*"
breakdown:
field: "service.name"
type: values
metric:
aggregation: count
color:
palette: 'eui_amsterdam_color_blind'
assignments:
- values: ['api-gateway']
color: '#00BF6F'
- values: ['database']
color: '#006BB4'
Waffle chart with legend options:
lens:
type: waffle
data_view: "logs-*"
breakdown:
field: "http.request.method"
type: values
metric:
aggregation: count
legend:
visible: show
position: bottom
Attributes:
| Name | Type | Description |
|---|---|---|
data_view |
str
|
The data view that determines the data for the waffle chart. |
metric |
LensDataMetricTypes
|
Metric that determines the size of squares. Waffle charts support only one metric. |
breakdown |
LensBreakdownTypes | None
|
Optional breakdown for grouping data. Waffle charts support only one breakdown. |
Show JSON schema:
{
"$defs": {
"CollapseAggregationEnum": {
"description": "The aggregation to use for the dimension.",
"enum": [
"sum",
"min",
"max",
"avg"
],
"title": "CollapseAggregationEnum",
"type": "string"
},
"ColorValueAssignment": {
"additionalProperties": false,
"description": "Manual color assignment to specific categorical values.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A single category value to assign a color to.",
"title": "Value"
},
"values": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Multiple category values to assign the same color to.",
"title": "Values"
},
"color": {
"description": "The hex color code to assign (e.g., '#FF0000').",
"title": "Color",
"type": "string"
}
},
"required": [
"color"
],
"title": "ColorValueAssignment",
"type": "object"
},
"ColorValueMapping": {
"additionalProperties": false,
"description": "Categorical color mapping for charts keyed by exact values.",
"properties": {
"palette": {
"default": "eui_amsterdam_color_blind",
"description": "The palette ID to use for unassigned colors.\n\nAvailable palettes:\n- 'default' - Standard EUI palette\n- 'eui_amsterdam_color_blind' - Color-blind safe palette (default)\n- 'kibana_palette' or 'legacy' - Legacy Kibana colors\n- 'elastic_brand' - Elastic brand colors\n- 'gray' - Grayscale palette",
"title": "Palette",
"type": "string"
},
"assignments": {
"description": "Manual color assignments to specific data values.",
"items": {
"$ref": "#/$defs/ColorValueAssignment"
},
"title": "Assignments",
"type": "array"
}
},
"title": "ColorValueMapping",
"type": "object"
},
"KqlQuery": {
"additionalProperties": false,
"description": "Represents a KQL (Kibana Query Language) query configuration.\n\nKQL is the default query language in Kibana and provides a simplified syntax for filtering data.",
"properties": {
"kql": {
"description": "The Kibana Query Language (KQL) query string to apply.",
"title": "Kql",
"type": "string"
}
},
"required": [
"kql"
],
"title": "KqlQuery",
"type": "object"
},
"LegacyQueryTypes": {
"oneOf": [
{
"$ref": "#/$defs/KqlQuery"
},
{
"$ref": "#/$defs/LuceneQuery"
}
]
},
"LegendVisibleEnum": {
"description": "Represents the possible values for the visibility of the legend in a pie chart.",
"enum": [
"show",
"hide",
"auto"
],
"title": "LegendVisibleEnum",
"type": "string"
},
"LegendWidthEnum": {
"description": "Represents the possible values for the width/size of the legend.",
"enum": [
"small",
"medium",
"large",
"extra_large"
],
"title": "LegendWidthEnum",
"type": "string"
},
"LensAggregatedMetricTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensOtherAggregatedMetric"
},
{
"$ref": "#/$defs/LensLastValueAggregatedMetric"
},
{
"$ref": "#/$defs/LensCountAggregatedMetric"
},
{
"$ref": "#/$defs/LensSumAggregatedMetric"
},
{
"$ref": "#/$defs/LensPercentileRankAggregatedMetric"
},
{
"$ref": "#/$defs/LensPercentileAggregatedMetric"
}
]
},
"LensBreakdownTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsBreakdown"
},
{
"$ref": "#/$defs/LensMultiTermsBreakdown"
},
{
"$ref": "#/$defs/LensDateHistogramBreakdown"
},
{
"$ref": "#/$defs/LensFiltersBreakdown"
},
{
"$ref": "#/$defs/LensIntervalsBreakdown"
}
]
},
"LensCountAggregatedMetric": {
"additionalProperties": false,
"description": "Represents a count metric configuration within a Lens chart.\n\nCount metrics are used to count the number of documents in a data view.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"default": "count",
"enum": [
"count",
"unique_count"
],
"title": "Aggregation",
"type": "string"
},
"field": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The field to count. If not provided, the count will be of all documents in the data view.",
"title": "Field"
},
"exclude_zeros": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to exclude zero values from the count. Kibana defaults to true if not specified.",
"title": "Exclude Zeros"
}
},
"title": "LensCountAggregatedMetric",
"type": "object"
},
"LensCustomMetricFormat": {
"additionalProperties": false,
"description": "Custom format configuration for metrics using numeral.js patterns.\n\nUse this for complete control over numeric formatting with numeral.js syntax.",
"properties": {
"type": {
"const": "custom",
"default": "custom",
"description": "Format type identifier. Must be 'custom' for custom formats.",
"title": "Type",
"type": "string"
},
"decimals": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of decimal places to display. If not specified, defaults to 0.",
"title": "Decimals"
},
"pattern": {
"description": "numeral.js format pattern (e.g., \"0,0.00\" for comma-separated numbers with 2 decimals).",
"title": "Pattern",
"type": "string"
},
"suffix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional suffix to display after the formatted number (e.g., \" requests\", \" users\").",
"title": "Suffix"
},
"compact": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use compact notation (e.g., 1.2K instead of 1200). Defaults to Kibana's behavior.",
"title": "Compact"
}
},
"required": [
"pattern"
],
"title": "LensCustomMetricFormat",
"type": "object"
},
"LensDataMetricTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensFormulaMetric"
},
{
"$ref": "#/$defs/LensAggregatedMetricTypes"
}
]
},
"LensDateHistogramBreakdown": {
"additionalProperties": false,
"description": "Date histogram breakdown with optional collapse aggregation.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
"title": "Label"
},
"type": {
"const": "date_histogram",
"default": "date_histogram",
"title": "Type",
"type": "string"
},
"field": {
"description": "The name of the field in the data view that this dimension is based on.",
"title": "Field",
"type": "string"
},
"minimum_interval": {
"anyOf": [
{
"$ref": "#/$defs/LensDateMathMinimumInterval"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum interval using Elasticsearch date math format (e.g. `1m`, `1h`). Defaults to `auto`."
},
"partial_intervals": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, show partial intervals. Kibana defaults to `true` if not specified.",
"title": "Partial Intervals"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"field"
],
"title": "LensDateHistogramBreakdown",
"type": "object"
},
"LensDateMathMinimumInterval": {
"anyOf": [
{
"const": "auto",
"type": "string"
},
{
"pattern": "^[1-9][0-9]*(ms|s|m|h|d|w|M|q|y)$",
"type": "string"
}
]
},
"LensFiltersBreakdown": {
"additionalProperties": false,
"description": "Filters breakdown with optional collapse aggregation.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
"title": "Label"
},
"type": {
"const": "filters",
"default": "filters",
"title": "Type",
"type": "string"
},
"filters": {
"description": "The filters to use for the dimension.",
"items": {
"$ref": "#/$defs/LensFiltersDimensionFilter"
},
"title": "Filters",
"type": "array"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"filters"
],
"title": "LensFiltersBreakdown",
"type": "object"
},
"LensFiltersDimensionFilter": {
"additionalProperties": false,
"description": "A filter for a filters dimension.",
"properties": {
"query": {
"$ref": "#/$defs/LegacyQueryTypes",
"description": "The query to use for the dimension."
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the filter. If not provided, the query will be used as the label.",
"title": "Label"
}
},
"required": [
"query"
],
"title": "LensFiltersDimensionFilter",
"type": "object"
},
"LensFormulaMetric": {
"additionalProperties": false,
"description": "Represents a formula metric configuration within a Lens chart.\n\nFormula metrics allow for custom calculations using Kibana's formula syntax.\nThe formula string is passed directly to Kibana, which handles parsing and\nAST generation internally.\n\nExample formulas:\n- Simple arithmetic: \"count() / 100\"\n- Field aggregations: \"(max(response.time) - min(response.time)) / average(response.time)\"\n- With filters: \"count(kql='status:error') / count() * 100\"",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"formula": {
"description": "The formula string to be evaluated for this metric.",
"title": "Formula",
"type": "string"
}
},
"required": [
"formula"
],
"title": "LensFormulaMetric",
"type": "object"
},
"LensIntervalsBreakdown": {
"additionalProperties": false,
"description": "Intervals breakdown with optional collapse aggregation.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
"title": "Label"
},
"type": {
"const": "intervals",
"default": "intervals",
"title": "Type",
"type": "string"
},
"field": {
"description": "The name of the field in the data view that this dimension is based on.",
"title": "Field",
"type": "string"
},
"intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/LensIntervalsDimensionInterval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The intervals to use for the dimension. If not provided, intervals will be automatically picked.",
"title": "Intervals"
},
"granularity": {
"anyOf": [
{
"maximum": 7,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Interval granularity divides the field into evenly spaced intervals based on the minimum and maximum values for the field.\nKibana defaults to 4 if not specified.",
"title": "Granularity"
},
"include_empty_intervals": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, include empty histogram buckets. Defaults to `true`.",
"title": "Include Empty Intervals"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"field"
],
"title": "LensIntervalsBreakdown",
"type": "object"
},
"LensIntervalsDimensionInterval": {
"additionalProperties": false,
"description": "A single interval for an intervals dimension.",
"properties": {
"from": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The start of the interval.",
"title": "From"
},
"to": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The end of the interval.",
"title": "To"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The label for the interval.",
"title": "Label"
}
},
"title": "LensIntervalsDimensionInterval",
"type": "object"
},
"LensLastValueAggregatedMetric": {
"additionalProperties": false,
"description": "Represents a last value metric configuration within a Lens chart.\n\nLast value metrics are used to retrieve the most recent value of a field based on a specified sort order.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"const": "last_value",
"default": "last_value",
"title": "Aggregation",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
},
"date_field": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The field used to determine the 'last' value.",
"title": "Date Field"
}
},
"required": [
"field"
],
"title": "LensLastValueAggregatedMetric",
"type": "object"
},
"LensMetricFormat": {
"additionalProperties": false,
"description": "Standard format configuration for displaying metric values.\n\nSupports common numeric formats with optional suffix and compact notation.",
"properties": {
"type": {
"description": "The format type for the metric value.\n\nAvailable formats:\n- **number**: Plain numeric value with optional decimal places\n- **bytes**: Byte size formatting (B, KB, MB, GB, TB)\n- **bits**: Bit size formatting (b, Kb, Mb, Gb, Tb)\n- **percent**: Percentage formatting with % symbol\n- **duration**: Time duration formatting (ms, s, m, h, d)",
"enum": [
"number",
"bytes",
"bits",
"percent",
"duration"
],
"title": "Type",
"type": "string"
},
"decimals": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of decimal places to display. If not specified, defaults to 2 for number/bytes/percent, 0 for bits/duration.",
"title": "Decimals"
},
"suffix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional suffix to display after the formatted number (e.g., \" requests\", \" users\").",
"title": "Suffix"
},
"compact": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use compact notation (e.g., 1.2K instead of 1200). Defaults to Kibana's behavior.",
"title": "Compact"
}
},
"required": [
"type"
],
"title": "LensMetricFormat",
"type": "object"
},
"LensMetricFormatTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormat"
},
{
"$ref": "#/$defs/LensCustomMetricFormat"
}
]
},
"LensMultiTermsBreakdown": {
"additionalProperties": false,
"description": "Multi-field top-values breakdown with optional collapse aggregation.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
"title": "Label"
},
"type": {
"const": "values",
"default": "values",
"title": "Type",
"type": "string"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of top terms to display.",
"title": "Size"
},
"sort": {
"anyOf": [
{
"$ref": "#/$defs/Sort"
},
{
"type": "null"
}
],
"default": null,
"description": "The sort configuration for the terms."
},
"show_other_bucket": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
"title": "Show Other Bucket"
},
"include_missing_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
"title": "Include Missing Values"
},
"include": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of terms to include. Can be used with or without `include_is_regex`.",
"title": "Include"
},
"exclude": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
"title": "Exclude"
},
"include_is_regex": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
"title": "Include Is Regex"
},
"exclude_is_regex": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
"title": "Exclude Is Regex"
},
"fields": {
"description": "List of field names for multi-field aggregation. Requires at least 2 fields.",
"items": {
"type": "string"
},
"minItems": 2,
"title": "Fields",
"type": "array"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"fields"
],
"title": "LensMultiTermsBreakdown",
"type": "object"
},
"LensOtherAggregatedMetric": {
"additionalProperties": false,
"description": "Represents various aggregated metric configurations within a Lens chart.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"description": "The aggregation type for the metric (e.g., 'min', 'max', 'median', 'average', 'standard_deviation').",
"enum": [
"min",
"max",
"median",
"average",
"standard_deviation"
],
"title": "Aggregation",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
}
},
"required": [
"aggregation",
"field"
],
"title": "LensOtherAggregatedMetric",
"type": "object"
},
"LensPercentileAggregatedMetric": {
"additionalProperties": false,
"description": "Represents a percentile metric configuration within a Lens chart.\n\nPercentile metrics are used to determine the value at a specific percentile in a data set.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"const": "percentile",
"default": "percentile",
"title": "Aggregation",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
},
"percentile": {
"title": "Percentile",
"type": "integer"
}
},
"required": [
"field",
"percentile"
],
"title": "LensPercentileAggregatedMetric",
"type": "object"
},
"LensPercentileRankAggregatedMetric": {
"additionalProperties": false,
"description": "Represents a percentile rank metric configuration within a Lens chart.\n\nPercentile rank metrics are used to determine the rank of a value in a data set.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"const": "percentile_rank",
"default": "percentile_rank",
"title": "Aggregation",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
},
"rank": {
"title": "Rank",
"type": "integer"
}
},
"required": [
"field",
"rank"
],
"title": "LensPercentileRankAggregatedMetric",
"type": "object"
},
"LensSumAggregatedMetric": {
"additionalProperties": false,
"description": "Represents a sum metric configuration within a Lens chart.\n\nSum metrics are used to sum the values of a field.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the metric. If not provided, a label may be inferred from the type and field.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/LensMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric."
},
"filter": {
"anyOf": [
{
"$ref": "#/$defs/LegacyQueryTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "A KQL filter applied before determining the metric value."
},
"aggregation": {
"const": "sum",
"default": "sum",
"title": "Aggregation",
"type": "string"
},
"field": {
"title": "Field",
"type": "string"
},
"exclude_zeros": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to exclude zero values from the sum. Kibana defaults to true if not specified.",
"title": "Exclude Zeros"
}
},
"required": [
"field"
],
"title": "LensSumAggregatedMetric",
"type": "object"
},
"LensTermsBreakdown": {
"additionalProperties": false,
"description": "Top-values breakdown with optional collapse aggregation.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display label for the dimension. If not provided, a label may be inferred from the field and type.",
"title": "Label"
},
"type": {
"const": "values",
"default": "values",
"title": "Type",
"type": "string"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of top terms to display.",
"title": "Size"
},
"sort": {
"anyOf": [
{
"$ref": "#/$defs/Sort"
},
{
"type": "null"
}
],
"default": null,
"description": "The sort configuration for the terms."
},
"show_other_bucket": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, show a bucket for terms not included in the top size. Defaults to `true`.",
"title": "Show Other Bucket"
},
"include_missing_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, show a bucket for documents with a missing value for the field. Defaults to `false`.",
"title": "Include Missing Values"
},
"include": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of terms to include. Can be used with or without `include_is_regex`.",
"title": "Include"
},
"exclude": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of terms to exclude. Can be used with or without `exclude_is_regex`.",
"title": "Exclude"
},
"include_is_regex": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, treat the values in the `include` list as regular expressions. Defaults to `false`.",
"title": "Include Is Regex"
},
"exclude_is_regex": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, treat the values in the `exclude` list as regular expressions. Defaults to `false`.",
"title": "Exclude Is Regex"
},
"field": {
"description": "The name of the field in the data view that this dimension is based on.",
"title": "Field",
"type": "string"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"field"
],
"title": "LensTermsBreakdown",
"type": "object"
},
"LuceneQuery": {
"additionalProperties": false,
"description": "Represents a Lucene query configuration.\n\nLucene provides a more powerful and flexible, but less friendly, syntax for querying data compared to KQL.",
"properties": {
"lucene": {
"description": "The Lucene query string to apply.",
"title": "Lucene",
"type": "string"
}
},
"required": [
"lucene"
],
"title": "LuceneQuery",
"type": "object"
},
"Sort": {
"additionalProperties": false,
"description": "Represents a sort configuration in the Config schema.",
"properties": {
"by": {
"description": "The field name to sort the data by.",
"title": "By",
"type": "string"
},
"direction": {
"description": "The sort direction. Must be either 'asc' for ascending or 'desc' for descending.",
"enum": [
"asc",
"desc"
],
"title": "Direction",
"type": "string"
}
},
"required": [
"by",
"direction"
],
"title": "Sort",
"type": "object"
},
"WaffleAppearance": {
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"values": {
"anyOf": [
{
"$ref": "#/$defs/WaffleValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for numeric values."
}
},
"title": "WaffleAppearance",
"type": "object"
},
"WaffleLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for waffle charts.",
"properties": {
"visible": {
"anyOf": [
{
"$ref": "#/$defs/LegendVisibleEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Visibility of the legend. Kibana defaults vary by chart type."
},
"position": {
"anyOf": [
{
"enum": [
"top",
"right",
"bottom",
"left"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Position of the legend.",
"title": "Position"
},
"width": {
"anyOf": [
{
"$ref": "#/$defs/LegendWidthEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Width of the legend."
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate the legend labels to. Kibana defaults to 1 if not specified. Set to 0 to disable truncation.",
"title": "Truncate Labels"
},
"nested": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend in nested format for multi-level waffle charts. Kibana defaults to False if not specified.",
"title": "Nested"
},
"show_single_series": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend when there is only one series. Kibana defaults to false if not specified.",
"title": "Show Single Series"
}
},
"title": "WaffleLegend",
"type": "object"
},
"WaffleValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"format": {
"anyOf": [
{
"enum": [
"percent",
"value",
"hide"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls how values are displayed in the waffle chart. Kibana defaults to 'percent' if not specified.",
"title": "Format"
},
"decimal_places": {
"anyOf": [
{
"maximum": 10,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls the number of decimal places for values in the waffle chart. Kibana defaults to 2 if not specified.",
"title": "Decimal Places"
}
},
"title": "WaffleValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Waffle chart configuration within a Lens panel.\n\nWaffle charts visualize categorical data as a grid of colored squares,\nwhere each square represents a proportion of the whole.\nWaffle charts support exactly one metric and an optional breakdown.\n\nExamples:\n Simple waffle chart showing request distribution:\n ```yaml\n lens:\n type: waffle\n data_view: \"logs-*\"\n breakdown:\n field: \"http.request.method\"\n type: values\n metric:\n aggregation: count\n ```\n\n Waffle chart with custom colors:\n ```yaml\n lens:\n type: waffle\n data_view: \"metrics-*\"\n breakdown:\n field: \"service.name\"\n type: values\n metric:\n aggregation: count\n color:\n palette: 'eui_amsterdam_color_blind'\n assignments:\n - values: ['api-gateway']\n color: '#00BF6F'\n - values: ['database']\n color: '#006BB4'\n ```\n\n Waffle chart with legend options:\n ```yaml\n lens:\n type: waffle\n data_view: \"logs-*\"\n breakdown:\n field: \"http.request.method\"\n type: values\n metric:\n aggregation: count\n legend:\n visible: show\n position: bottom\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"type": {
"const": "waffle",
"default": "waffle",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/WaffleAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/WaffleLegend"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart legend."
},
"color": {
"anyOf": [
{
"$ref": "#/$defs/ColorValueMapping"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart color."
},
"data_view": {
"description": "The data view that determines the data for the waffle chart.",
"title": "Data View",
"type": "string"
},
"metric": {
"$ref": "#/$defs/LensDataMetricTypes",
"description": "Metric that determines the size of squares. Waffle charts support only one metric."
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/LensBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional breakdown for grouping data. Waffle charts support only one breakdown."
}
},
"required": [
"data_view",
"metric"
],
"title": "LensWaffleChart",
"type": "object"
}
Waffle Chart Legend¶
For comprehensive guidance on legend configuration, see the Legend Configuration Guide.
Represents legend formatting options for waffle charts.
Attributes:
| Name | Type | Description |
|---|---|---|
truncate_labels |
int | None
|
Number of lines to truncate the legend labels to. Kibana defaults to 1 if not specified. Set to 0 to disable truncation. |
nested |
bool | None
|
Whether to show legend in nested format for multi-level waffle charts. Kibana defaults to False if not specified. |
show_single_series |
bool | None
|
Whether to show legend when there is only one series. Kibana defaults to false if not specified. |
Show JSON schema:
{
"$defs": {
"LegendVisibleEnum": {
"description": "Represents the possible values for the visibility of the legend in a pie chart.",
"enum": [
"show",
"hide",
"auto"
],
"title": "LegendVisibleEnum",
"type": "string"
},
"LegendWidthEnum": {
"description": "Represents the possible values for the width/size of the legend.",
"enum": [
"small",
"medium",
"large",
"extra_large"
],
"title": "LegendWidthEnum",
"type": "string"
}
},
"additionalProperties": false,
"description": "Represents legend formatting options for waffle charts.",
"properties": {
"visible": {
"anyOf": [
{
"$ref": "#/$defs/LegendVisibleEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Visibility of the legend. Kibana defaults vary by chart type."
},
"position": {
"anyOf": [
{
"enum": [
"top",
"right",
"bottom",
"left"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Position of the legend.",
"title": "Position"
},
"width": {
"anyOf": [
{
"$ref": "#/$defs/LegendWidthEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Width of the legend."
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate the legend labels to. Kibana defaults to 1 if not specified. Set to 0 to disable truncation.",
"title": "Truncate Labels"
},
"nested": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend in nested format for multi-level waffle charts. Kibana defaults to False if not specified.",
"title": "Nested"
},
"show_single_series": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend when there is only one series. Kibana defaults to false if not specified.",
"title": "Show Single Series"
}
},
"title": "WaffleLegend",
"type": "object"
}
Waffle Chart Appearance¶
Formatting options for value labels.
Attributes:
| Name | Type | Description |
|---|---|---|
values |
WaffleValuesConfig | None
|
Formatting options for numeric values. |
Show JSON schema:
{
"$defs": {
"WaffleValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"format": {
"anyOf": [
{
"enum": [
"percent",
"value",
"hide"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls how values are displayed in the waffle chart. Kibana defaults to 'percent' if not specified.",
"title": "Format"
},
"decimal_places": {
"anyOf": [
{
"maximum": 10,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls the number of decimal places for values in the waffle chart. Kibana defaults to 2 if not specified.",
"title": "Decimal Places"
}
},
"title": "WaffleValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"values": {
"anyOf": [
{
"$ref": "#/$defs/WaffleValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for numeric values."
}
},
"title": "WaffleAppearance",
"type": "object"
}
Formatting options for value labels.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
Literal['percent', 'value', 'hide'] | None
|
Controls how values are displayed in the waffle chart. Kibana defaults to 'percent' if not specified. |
decimal_places |
int | None
|
Controls the number of decimal places for values in the waffle chart. Kibana defaults to 2 if not specified. |
Show JSON schema:
{
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"format": {
"anyOf": [
{
"enum": [
"percent",
"value",
"hide"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls how values are displayed in the waffle chart. Kibana defaults to 'percent' if not specified.",
"title": "Format"
},
"decimal_places": {
"anyOf": [
{
"maximum": 10,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls the number of decimal places for values in the waffle chart. Kibana defaults to 2 if not specified.",
"title": "Decimal Places"
}
},
"title": "WaffleValuesConfig",
"type": "object"
}
ES|QL Waffle Charts¶
Represents a Waffle chart configuration within an ES|QL panel.
Waffle charts visualize categorical data as a grid of colored squares, using ES|QL queries to aggregate and group the data. Waffle charts support exactly one metric and an optional breakdown.
Examples:
ES|QL waffle chart with STATS query:
esql:
type: waffle
query: |
FROM logs-*
| STATS count = COUNT(*) BY http.request.method
metric:
field: "count"
breakdown:
field: "http.request.method"
Attributes:
| Name | Type | Description |
|---|---|---|
metric |
ESQLMetricTypes
|
Metric that determines the size of squares. Waffle charts support only one metric. |
breakdown |
ESQLBreakdownTypes | None
|
Optional breakdown for grouping data. Waffle charts support only one breakdown. |
Show JSON schema:
{
"$defs": {
"CollapseAggregationEnum": {
"description": "The aggregation to use for the dimension.",
"enum": [
"sum",
"min",
"max",
"avg"
],
"title": "CollapseAggregationEnum",
"type": "string"
},
"ColorValueAssignment": {
"additionalProperties": false,
"description": "Manual color assignment to specific categorical values.",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A single category value to assign a color to.",
"title": "Value"
},
"values": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Multiple category values to assign the same color to.",
"title": "Values"
},
"color": {
"description": "The hex color code to assign (e.g., '#FF0000').",
"title": "Color",
"type": "string"
}
},
"required": [
"color"
],
"title": "ColorValueAssignment",
"type": "object"
},
"ColorValueMapping": {
"additionalProperties": false,
"description": "Categorical color mapping for charts keyed by exact values.",
"properties": {
"palette": {
"default": "eui_amsterdam_color_blind",
"description": "The palette ID to use for unassigned colors.\n\nAvailable palettes:\n- 'default' - Standard EUI palette\n- 'eui_amsterdam_color_blind' - Color-blind safe palette (default)\n- 'kibana_palette' or 'legacy' - Legacy Kibana colors\n- 'elastic_brand' - Elastic brand colors\n- 'gray' - Grayscale palette",
"title": "Palette",
"type": "string"
},
"assignments": {
"description": "Manual color assignments to specific data values.",
"items": {
"$ref": "#/$defs/ColorValueAssignment"
},
"title": "Assignments",
"type": "array"
}
},
"title": "ColorValueMapping",
"type": "object"
},
"ESQLBreakdownTypes": {
"additionalProperties": false,
"description": "A breakdown dimension for ESQL charts that supports collapse aggregation.\n\nBreakdowns slice data into categories (e.g. bar segments, waffle sections).\nUnlike plain dimensions, breakdowns support the ``collapse`` aggregation\nwhich merges multiple dimension values into a single bucket using a summary function.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"field": {
"description": "The field to use for the dimension.",
"title": "Field",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional display label for the dimension.",
"title": "Label"
},
"data_type": {
"anyOf": [
{
"const": "date",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data type of the field. Set to 'date' for time/date fields to enable proper sorting and formatting.",
"title": "Data Type"
},
"collapse": {
"anyOf": [
{
"$ref": "#/$defs/CollapseAggregationEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregate all breakdown values into a single bucket using this function (sum, avg, min, max)."
}
},
"required": [
"field"
],
"title": "ESQLBreakdown",
"type": "object"
},
"ESQLCustomMetricFormat": {
"additionalProperties": false,
"description": "Custom format configuration for ES|QL metrics.\n\nAllows specifying a custom number format pattern.\nThis is separate from LensCustomMetricFormat as ES|QL and Lens formatting may diverge in the future.",
"properties": {
"type": {
"const": "custom",
"default": "custom",
"title": "Type",
"type": "string"
},
"pattern": {
"description": "The pattern to display the number in.",
"title": "Pattern",
"type": "string"
}
},
"required": [
"pattern"
],
"title": "ESQLCustomMetricFormat",
"type": "object"
},
"ESQLMetricFormat": {
"additionalProperties": false,
"description": "The format configuration for ES|QL metrics.\n\nSupports standard format types like number, bytes, bits, percent, and duration.\nThis is separate from LensMetricFormat as ES|QL and Lens formatting may diverge in the future.",
"properties": {
"type": {
"enum": [
"number",
"bytes",
"bits",
"percent",
"duration"
],
"title": "Type",
"type": "string"
},
"decimals": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of decimal places to display. If not specified, defaults to 2 for number/bytes/percent/duration, 0 for bits.",
"title": "Decimals"
},
"suffix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The suffix to display after the number.",
"title": "Suffix"
},
"compact": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to display the number in a compact format.",
"title": "Compact"
},
"pattern": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The pattern to display the number in.",
"title": "Pattern"
}
},
"required": [
"type"
],
"title": "ESQLMetricFormat",
"type": "object"
},
"ESQLMetricFormatTypes": {
"anyOf": [
{
"$ref": "#/$defs/ESQLMetricFormat"
},
{
"$ref": "#/$defs/ESQLCustomMetricFormat"
}
]
},
"ESQLMetricTypes": {
"additionalProperties": false,
"description": "A metric that is defined in the ESQL query.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"field": {
"description": "The field in the data view that this metric is based on.",
"title": "Field",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional display label for the metric.",
"title": "Label"
},
"format": {
"anyOf": [
{
"$ref": "#/$defs/ESQLMetricFormatTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "The format of the metric (number, bytes, bits, percent, duration, or custom)."
}
},
"required": [
"field"
],
"title": "ESQLMetric",
"type": "object"
},
"LegendVisibleEnum": {
"description": "Represents the possible values for the visibility of the legend in a pie chart.",
"enum": [
"show",
"hide",
"auto"
],
"title": "LegendVisibleEnum",
"type": "string"
},
"LegendWidthEnum": {
"description": "Represents the possible values for the width/size of the legend.",
"enum": [
"small",
"medium",
"large",
"extra_large"
],
"title": "LegendWidthEnum",
"type": "string"
},
"WaffleAppearance": {
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"values": {
"anyOf": [
{
"$ref": "#/$defs/WaffleValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for numeric values."
}
},
"title": "WaffleAppearance",
"type": "object"
},
"WaffleLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for waffle charts.",
"properties": {
"visible": {
"anyOf": [
{
"$ref": "#/$defs/LegendVisibleEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Visibility of the legend. Kibana defaults vary by chart type."
},
"position": {
"anyOf": [
{
"enum": [
"top",
"right",
"bottom",
"left"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Position of the legend.",
"title": "Position"
},
"width": {
"anyOf": [
{
"$ref": "#/$defs/LegendWidthEnum"
},
{
"type": "null"
}
],
"default": null,
"description": "Width of the legend."
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate the legend labels to. Kibana defaults to 1 if not specified. Set to 0 to disable truncation.",
"title": "Truncate Labels"
},
"nested": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend in nested format for multi-level waffle charts. Kibana defaults to False if not specified.",
"title": "Nested"
},
"show_single_series": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show legend when there is only one series. Kibana defaults to false if not specified.",
"title": "Show Single Series"
}
},
"title": "WaffleLegend",
"type": "object"
},
"WaffleValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels.",
"properties": {
"format": {
"anyOf": [
{
"enum": [
"percent",
"value",
"hide"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls how values are displayed in the waffle chart. Kibana defaults to 'percent' if not specified.",
"title": "Format"
},
"decimal_places": {
"anyOf": [
{
"maximum": 10,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls the number of decimal places for values in the waffle chart. Kibana defaults to 2 if not specified.",
"title": "Decimal Places"
}
},
"title": "WaffleValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Waffle chart configuration within an ES|QL panel.\n\nWaffle charts visualize categorical data as a grid of colored squares,\nusing ES|QL queries to aggregate and group the data.\nWaffle charts support exactly one metric and an optional breakdown.\n\nExamples:\n ES|QL waffle chart with STATS query:\n ```yaml\n esql:\n type: waffle\n query: |\n FROM logs-*\n | STATS count = COUNT(*) BY http.request.method\n metric:\n field: \"count\"\n breakdown:\n field: \"http.request.method\"\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"type": {
"const": "waffle",
"default": "waffle",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/WaffleAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/WaffleLegend"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart legend."
},
"color": {
"anyOf": [
{
"$ref": "#/$defs/ColorValueMapping"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart color."
},
"metric": {
"$ref": "#/$defs/ESQLMetricTypes",
"description": "Metric that determines the size of squares. Waffle charts support only one metric."
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/ESQLBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional breakdown for grouping data. Waffle charts support only one breakdown."
}
},
"required": [
"metric"
],
"title": "ESQLWaffleChart",
"type": "object"
}