XY Chart Panel Configuration¶
The XY chart panel creates line, bar, and area charts for time series and other data visualizations.
A Poem for the Time Series Enthusiasts¶
For those who see patterns across the timeline:
Lines that rise and bars that fall,
Area charts that show it all.
X-axis marching slowly through time,
Y-axis tracking every climb.
When incidents spike at 2 AM,
The XY chart says: "Here I am."
Stacked or unstacked, the choice is yours,
Percentage mode for ratio scores.
Dimensions set the horizontal stage,
Metrics show what happens, page by page.
Break it down by service, host, or zone—
No pattern ever goes unknown.
From request counts to error rates,
Your time series sits and waits.
So here's to charts, both line and bar,
That show exactly where things are.
Lens Bar Charts¶
Represents a Bar chart configuration within a Lens panel.
Examples:
Simple bar chart with time series:
lens:
type: bar
data_view: "logs-*"
dimension:
type: date_histogram
field: "@timestamp"
metrics:
- aggregation: count
Stacked bar chart with breakdown:
lens:
type: bar
mode: stacked
data_view: "logs-*"
dimension:
type: date_histogram
field: "@timestamp"
breakdown:
type: values
field: "service.name"
metrics:
- aggregation: count
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"BarChartAppearance": {
"additionalProperties": false,
"description": "Represents bar chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include bar-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"min_bar_height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum height for bars in bar charts.",
"title": "Min Bar Height"
}
},
"title": "BarChartAppearance",
"type": "object"
},
"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"
},
"LensBreakdownTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsBreakdown"
},
{
"$ref": "#/$defs/LensMultiTermsBreakdown"
},
{
"$ref": "#/$defs/LensDateHistogramBreakdown"
},
{
"$ref": "#/$defs/LensFiltersBreakdown"
},
{
"$ref": "#/$defs/LensIntervalsBreakdown"
}
]
},
"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"
},
"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"
},
"LensDateHistogramDimension": {
"additionalProperties": false,
"description": "Represents a histogram dimension configuration within a Lens chart.\n\nDate histogram dimensions are used for aggregating data into buckets based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensDateHistogramDimension",
"type": "object"
},
"LensDateMathMinimumInterval": {
"anyOf": [
{
"const": "auto",
"type": "string"
},
{
"pattern": "^[1-9][0-9]*(ms|s|m|h|d|w|M|q|y)$",
"type": "string"
}
]
},
"LensDimensionTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsDimension"
},
{
"$ref": "#/$defs/LensMultiTermsDimension"
},
{
"$ref": "#/$defs/LensDateHistogramDimension"
},
{
"$ref": "#/$defs/LensFiltersDimension"
},
{
"$ref": "#/$defs/LensIntervalsDimension"
}
]
},
"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"
},
"LensFiltersDimension": {
"additionalProperties": false,
"description": "Represents a filters dimension configuration within a Lens chart.\n\nFilters dimensions are used for filtering data based on 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 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"
}
},
"required": [
"filters"
],
"title": "LensFiltersDimension",
"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"
},
"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"
},
"LensIntervalsDimension": {
"additionalProperties": false,
"description": "Represents an intervals dimension configuration within a Lens chart.\n\nIntervals dimensions are used for aggregating data based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensIntervalsDimension",
"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"
},
"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"
},
"LensMultiTermsDimension": {
"additionalProperties": false,
"description": "Represents a multi-field top values dimension configuration within a Lens chart.\n\nMulti-terms dimensions are used for aggregating data based on unique combinations\nof values across multiple fields.",
"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"
}
},
"required": [
"fields"
],
"title": "LensMultiTermsDimension",
"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"
},
"LensTermsDimension": {
"additionalProperties": false,
"description": "Represents a single-field top values dimension configuration within a Lens chart.\n\nTerms dimensions are used for aggregating data based on unique values of a single 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 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"
}
},
"required": [
"field"
],
"title": "LensTermsDimension",
"type": "object"
},
"LensXYMetricTypes": {
"anyOf": [
{
"$ref": "#/$defs/XYLensFormulaMetric"
},
{
"$ref": "#/$defs/XYLensCountAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensSumAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensOtherAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensLastValueAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileRankAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileAggregatedMetric"
}
]
},
"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"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYLensCountAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart count metric with appearance options.\n\nExtends LensCountAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensCountAggregatedMetric",
"type": "object"
},
"XYLensFormulaMetric": {
"additionalProperties": false,
"description": "XY chart formula metric with appearance options.\n\nExtends LensFormulaMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensFormulaMetric",
"type": "object"
},
"XYLensLastValueAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart last value metric with appearance options.\n\nExtends LensLastValueAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensLastValueAggregatedMetric",
"type": "object"
},
"XYLensOtherAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart aggregated metric with appearance options.\n\nExtends LensOtherAggregatedMetric to include axis and color configuration\nfor use in XY charts. Supports min, max, median, and average aggregations.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensOtherAggregatedMetric",
"type": "object"
},
"XYLensPercentileAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile metric with appearance options.\n\nExtends LensPercentileAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileAggregatedMetric",
"type": "object"
},
"XYLensPercentileRankAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile rank metric with appearance options.\n\nExtends LensPercentileRankAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileRankAggregatedMetric",
"type": "object"
},
"XYLensSumAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart sum metric with appearance options.\n\nExtends LensSumAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensSumAggregatedMetric",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Bar chart configuration within a Lens panel.\n\nExamples:\n Simple bar chart with time series:\n ```yaml\n lens:\n type: bar\n data_view: \"logs-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n metrics:\n - aggregation: count\n ```\n\n Stacked bar chart with breakdown:\n ```yaml\n lens:\n type: bar\n mode: stacked\n data_view: \"logs-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n breakdown:\n type: values\n field: \"service.name\"\n metrics:\n - aggregation: count\n ```",
"properties": {
"data_view": {
"description": "The data view to use for the chart.",
"title": "Data View",
"type": "string"
},
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/LensDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/LensXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/LensBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional breakdown to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "bar",
"default": "bar",
"description": "The type of XY chart to display. Defaults to 'bar'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/BarChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
},
"mode": {
"default": "stacked",
"description": "The stacking mode for bar and area charts. Defaults to 'stacked'.",
"enum": [
"stacked",
"unstacked",
"percentage"
],
"title": "Mode",
"type": "string"
}
},
"required": [
"data_view",
"metrics"
],
"title": "LensBarChart",
"type": "object"
}
Lens Line Charts¶
Represents a Line chart configuration within a Lens panel.
Examples:
Simple line chart with time series:
lens:
type: line
data_view: "metrics-*"
dimension:
type: date_histogram
field: "@timestamp"
metrics:
- aggregation: average
field: response_time
Line chart with dual Y-axes:
lens:
type: line
data_view: "logs-*"
dimension:
type: date_histogram
field: "@timestamp"
metrics:
- aggregation: count
id: "request_count"
axis: left
- aggregation: average
field: "error.rate"
id: "error_rate"
axis: right
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"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"
},
"LensBreakdownTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsBreakdown"
},
{
"$ref": "#/$defs/LensMultiTermsBreakdown"
},
{
"$ref": "#/$defs/LensDateHistogramBreakdown"
},
{
"$ref": "#/$defs/LensFiltersBreakdown"
},
{
"$ref": "#/$defs/LensIntervalsBreakdown"
}
]
},
"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"
},
"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"
},
"LensDateHistogramDimension": {
"additionalProperties": false,
"description": "Represents a histogram dimension configuration within a Lens chart.\n\nDate histogram dimensions are used for aggregating data into buckets based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensDateHistogramDimension",
"type": "object"
},
"LensDateMathMinimumInterval": {
"anyOf": [
{
"const": "auto",
"type": "string"
},
{
"pattern": "^[1-9][0-9]*(ms|s|m|h|d|w|M|q|y)$",
"type": "string"
}
]
},
"LensDimensionTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsDimension"
},
{
"$ref": "#/$defs/LensMultiTermsDimension"
},
{
"$ref": "#/$defs/LensDateHistogramDimension"
},
{
"$ref": "#/$defs/LensFiltersDimension"
},
{
"$ref": "#/$defs/LensIntervalsDimension"
}
]
},
"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"
},
"LensFiltersDimension": {
"additionalProperties": false,
"description": "Represents a filters dimension configuration within a Lens chart.\n\nFilters dimensions are used for filtering data based on 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 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"
}
},
"required": [
"filters"
],
"title": "LensFiltersDimension",
"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"
},
"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"
},
"LensIntervalsDimension": {
"additionalProperties": false,
"description": "Represents an intervals dimension configuration within a Lens chart.\n\nIntervals dimensions are used for aggregating data based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensIntervalsDimension",
"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"
},
"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"
},
"LensMultiTermsDimension": {
"additionalProperties": false,
"description": "Represents a multi-field top values dimension configuration within a Lens chart.\n\nMulti-terms dimensions are used for aggregating data based on unique combinations\nof values across multiple fields.",
"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"
}
},
"required": [
"fields"
],
"title": "LensMultiTermsDimension",
"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"
},
"LensTermsDimension": {
"additionalProperties": false,
"description": "Represents a single-field top values dimension configuration within a Lens chart.\n\nTerms dimensions are used for aggregating data based on unique values of a single 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 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"
}
},
"required": [
"field"
],
"title": "LensTermsDimension",
"type": "object"
},
"LensXYMetricTypes": {
"anyOf": [
{
"$ref": "#/$defs/XYLensFormulaMetric"
},
{
"$ref": "#/$defs/XYLensCountAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensSumAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensOtherAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensLastValueAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileRankAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileAggregatedMetric"
}
]
},
"LineChartAppearance": {
"additionalProperties": false,
"description": "Represents line chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include line-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
}
},
"title": "LineChartAppearance",
"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"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYLensCountAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart count metric with appearance options.\n\nExtends LensCountAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensCountAggregatedMetric",
"type": "object"
},
"XYLensFormulaMetric": {
"additionalProperties": false,
"description": "XY chart formula metric with appearance options.\n\nExtends LensFormulaMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensFormulaMetric",
"type": "object"
},
"XYLensLastValueAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart last value metric with appearance options.\n\nExtends LensLastValueAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensLastValueAggregatedMetric",
"type": "object"
},
"XYLensOtherAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart aggregated metric with appearance options.\n\nExtends LensOtherAggregatedMetric to include axis and color configuration\nfor use in XY charts. Supports min, max, median, and average aggregations.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensOtherAggregatedMetric",
"type": "object"
},
"XYLensPercentileAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile metric with appearance options.\n\nExtends LensPercentileAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileAggregatedMetric",
"type": "object"
},
"XYLensPercentileRankAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile rank metric with appearance options.\n\nExtends LensPercentileRankAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileRankAggregatedMetric",
"type": "object"
},
"XYLensSumAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart sum metric with appearance options.\n\nExtends LensSumAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensSumAggregatedMetric",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Line chart configuration within a Lens panel.\n\nExamples:\n Simple line chart with time series:\n ```yaml\n lens:\n type: line\n data_view: \"metrics-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n metrics:\n - aggregation: average\n field: response_time\n ```\n\n Line chart with dual Y-axes:\n ```yaml\n lens:\n type: line\n data_view: \"logs-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n metrics:\n - aggregation: count\n id: \"request_count\"\n axis: left\n - aggregation: average\n field: \"error.rate\"\n id: \"error_rate\"\n axis: right\n ```",
"properties": {
"data_view": {
"description": "The data view to use for the chart.",
"title": "Data View",
"type": "string"
},
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/LensDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/LensXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/LensBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional breakdown to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "line",
"default": "line",
"description": "The type of XY chart to display. Defaults to 'line'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/LineChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
}
},
"required": [
"data_view",
"metrics"
],
"title": "LensLineChart",
"type": "object"
}
Lens Area Charts¶
Represents an Area chart configuration within a Lens panel.
Examples:
Simple area chart with time series:
lens:
type: area
data_view: "logs-*"
dimension:
type: date_histogram
field: "@timestamp"
metrics:
- aggregation: count
Stacked area chart with percentage mode:
lens:
type: area
mode: percentage
data_view: "metrics-*"
dimension:
type: date_histogram
field: "@timestamp"
breakdown:
type: values
field: "service.name"
metrics:
- aggregation: count
Show JSON schema:
{
"$defs": {
"AreaChartAppearance": {
"additionalProperties": false,
"description": "Represents area chart appearance formatting options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
},
"fill_opacity": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The fill opacity for area charts (0.0 to 1.0).",
"title": "Fill Opacity"
}
},
"title": "AreaChartAppearance",
"type": "object"
},
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"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"
},
"LensBreakdownTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsBreakdown"
},
{
"$ref": "#/$defs/LensMultiTermsBreakdown"
},
{
"$ref": "#/$defs/LensDateHistogramBreakdown"
},
{
"$ref": "#/$defs/LensFiltersBreakdown"
},
{
"$ref": "#/$defs/LensIntervalsBreakdown"
}
]
},
"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"
},
"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"
},
"LensDateHistogramDimension": {
"additionalProperties": false,
"description": "Represents a histogram dimension configuration within a Lens chart.\n\nDate histogram dimensions are used for aggregating data into buckets based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensDateHistogramDimension",
"type": "object"
},
"LensDateMathMinimumInterval": {
"anyOf": [
{
"const": "auto",
"type": "string"
},
{
"pattern": "^[1-9][0-9]*(ms|s|m|h|d|w|M|q|y)$",
"type": "string"
}
]
},
"LensDimensionTypes": {
"anyOf": [
{
"$ref": "#/$defs/LensTermsDimension"
},
{
"$ref": "#/$defs/LensMultiTermsDimension"
},
{
"$ref": "#/$defs/LensDateHistogramDimension"
},
{
"$ref": "#/$defs/LensFiltersDimension"
},
{
"$ref": "#/$defs/LensIntervalsDimension"
}
]
},
"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"
},
"LensFiltersDimension": {
"additionalProperties": false,
"description": "Represents a filters dimension configuration within a Lens chart.\n\nFilters dimensions are used for filtering data based on 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 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"
}
},
"required": [
"filters"
],
"title": "LensFiltersDimension",
"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"
},
"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"
},
"LensIntervalsDimension": {
"additionalProperties": false,
"description": "Represents an intervals dimension configuration within a Lens chart.\n\nIntervals dimensions are used for aggregating data based on numeric ranges.",
"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"
}
},
"required": [
"field"
],
"title": "LensIntervalsDimension",
"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"
},
"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"
},
"LensMultiTermsDimension": {
"additionalProperties": false,
"description": "Represents a multi-field top values dimension configuration within a Lens chart.\n\nMulti-terms dimensions are used for aggregating data based on unique combinations\nof values across multiple fields.",
"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"
}
},
"required": [
"fields"
],
"title": "LensMultiTermsDimension",
"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"
},
"LensTermsDimension": {
"additionalProperties": false,
"description": "Represents a single-field top values dimension configuration within a Lens chart.\n\nTerms dimensions are used for aggregating data based on unique values of a single 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 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"
}
},
"required": [
"field"
],
"title": "LensTermsDimension",
"type": "object"
},
"LensXYMetricTypes": {
"anyOf": [
{
"$ref": "#/$defs/XYLensFormulaMetric"
},
{
"$ref": "#/$defs/XYLensCountAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensSumAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensOtherAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensLastValueAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileRankAggregatedMetric"
},
{
"$ref": "#/$defs/XYLensPercentileAggregatedMetric"
}
]
},
"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"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYLensCountAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart count metric with appearance options.\n\nExtends LensCountAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensCountAggregatedMetric",
"type": "object"
},
"XYLensFormulaMetric": {
"additionalProperties": false,
"description": "XY chart formula metric with appearance options.\n\nExtends LensFormulaMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensFormulaMetric",
"type": "object"
},
"XYLensLastValueAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart last value metric with appearance options.\n\nExtends LensLastValueAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensLastValueAggregatedMetric",
"type": "object"
},
"XYLensOtherAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart aggregated metric with appearance options.\n\nExtends LensOtherAggregatedMetric to include axis and color configuration\nfor use in XY charts. Supports min, max, median, and average aggregations.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensOtherAggregatedMetric",
"type": "object"
},
"XYLensPercentileAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile metric with appearance options.\n\nExtends LensPercentileAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileAggregatedMetric",
"type": "object"
},
"XYLensPercentileRankAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart percentile rank metric with appearance options.\n\nExtends LensPercentileRankAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensPercentileRankAggregatedMetric",
"type": "object"
},
"XYLensSumAggregatedMetric": {
"additionalProperties": false,
"description": "XY chart sum metric with appearance options.\n\nExtends LensSumAggregatedMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYLensSumAggregatedMetric",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents an Area chart configuration within a Lens panel.\n\nExamples:\n Simple area chart with time series:\n ```yaml\n lens:\n type: area\n data_view: \"logs-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n metrics:\n - aggregation: count\n ```\n\n Stacked area chart with percentage mode:\n ```yaml\n lens:\n type: area\n mode: percentage\n data_view: \"metrics-*\"\n dimension:\n type: date_histogram\n field: \"@timestamp\"\n breakdown:\n type: values\n field: \"service.name\"\n metrics:\n - aggregation: count\n ```",
"properties": {
"data_view": {
"description": "The data view to use for the chart.",
"title": "Data View",
"type": "string"
},
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/LensDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/LensXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/LensBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional breakdown to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "area",
"default": "area",
"description": "The type of XY chart to display. Defaults to 'area'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/AreaChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance. AreaChartAppearance includes all line chart options plus fill_opacity."
},
"mode": {
"default": "stacked",
"description": "The stacking mode for bar and area charts. Defaults to 'stacked'.",
"enum": [
"stacked",
"unstacked",
"percentage"
],
"title": "Mode",
"type": "string"
}
},
"required": [
"data_view",
"metrics"
],
"title": "LensAreaChart",
"type": "object"
}
Chart Appearance Options¶
Bar Chart Appearance¶
Represents bar chart appearance formatting options.
Extends BaseXYChartAppearance to include bar-specific options.
Attributes:
| Name | Type | Description |
|---|---|---|
min_bar_height |
float | None
|
The minimum height for bars in bar charts. |
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents bar chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include bar-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"min_bar_height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum height for bars in bar charts.",
"title": "Min Bar Height"
}
},
"title": "BarChartAppearance",
"type": "object"
}
Line Chart Appearance¶
Represents line chart appearance formatting options.
Extends BaseXYChartAppearance to include line-specific options.
Attributes:
| Name | Type | Description |
|---|---|---|
missing_values |
Literal['none', 'linear', 'carry', 'lookahead', 'average', 'nearest'] | None
|
How to handle missing data points. Controls interpolation for gaps in your data. |
show_as_dotted |
bool | None
|
If |
end_values |
Literal['none', 'zero', 'nearest'] | None
|
How to handle the end of the time range in line/area charts. |
line_style |
Literal['linear', 'monotone-x', 'step-after'] | None
|
The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped). |
show_current_time_marker |
bool | None
|
Whether to show a vertical line at the current time in time series charts. |
hide_endzones |
bool | None
|
Whether to hide end zones in time series charts (areas where data is incomplete). |
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents line chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include line-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
}
},
"title": "LineChartAppearance",
"type": "object"
}
Area Chart Appearance¶
Represents area chart appearance formatting options.
Attributes:
| Name | Type | Description |
|---|---|---|
fill_opacity |
float | None
|
The fill opacity for area charts (0.0 to 1.0). |
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents area chart appearance formatting options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
},
"fill_opacity": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The fill opacity for area charts (0.0 to 1.0).",
"title": "Fill Opacity"
}
},
"title": "AreaChartAppearance",
"type": "object"
}
Value Labels¶
Use appearance.values.visible to control whether values are rendered on chart marks (for example, labels above bars).
| Value | Behavior |
|---|---|
false |
Hide value labels. |
true |
Show value labels on chart marks. |
If appearance.values.visible is omitted, Kibana defaults to hidden.
Example: Enable value labels on a Lens bar chart¶
dashboards:
- name: "Bar Chart with Value Labels"
panels:
- title: "Top Services by Request Count"
size: {w: 24, h: 15}
lens:
type: bar
data_view: "logs-*"
dimension:
field: "service.name"
type: values
metrics:
- aggregation: count
label: "Requests"
appearance:
values:
visible: true
titles_and_text.value_labels is not accepted in 0.4.0; use appearance.values.visible (or run kb-dashboard upgrade).
Axis Configuration¶
Represents configuration for a single axis in XY charts.
Attributes:
| Name | Type | Description |
|---|---|---|
title |
bool | str | None
|
Axis title mode/value: True=auto, False=hidden, string=custom title. |
scale |
Literal['linear', 'log', 'sqrt', 'time'] | None
|
Scale type for the axis. Defaults to 'linear'. |
extent |
AxisExtent | None
|
Extent/bounds configuration for the axis. |
Show JSON schema:
{
"$defs": {
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
}
Validators:
Represents axis extent (bounds) configuration for XY chart axes.
Controls the range of values displayed on an axis. Can be set to: - 'full': Use the full extent of the data - 'custom': Specify custom bounds with min/max values - 'data_bounds': Fit to the actual data bounds
Attributes:
| Name | Type | Description |
|---|---|---|
mode |
Literal['full', 'custom', 'data_bounds']
|
The extent mode for the axis. Defaults to 'full'. |
min |
float | None
|
Minimum value for the axis (only used when mode is 'custom'). |
max |
float | None
|
Maximum value for the axis (only used when mode is 'custom'). |
enforce |
bool | None
|
Whether to enforce the bounds strictly. Defaults to false. |
nice_values |
bool | None
|
Whether to use nice rounded values for bounds. Defaults to true. |
Show JSON schema:
{
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
}
Validators:
validate_custom_bounds
pydantic-validator
¶
Validate that custom mode has both min and max bounds specified.
Kibana requires both bounds to be set when using custom mode.
Axis Customization Examples¶
Customize axis titles, bounds, and scale types to better represent your data:
Hide Axis Titles¶
Use title: false to hide an axis title:
dashboards:
- name: "Hidden Axis Title"
panels:
- title: "Request Latency Over Time"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "response.time"
label: "Avg Latency"
appearance:
x_axis:
title: false
y_left_axis:
title: "Response Time (ms)"
Custom Axis Titles¶
dashboards:
- name: "Custom Axis Titles"
panels:
- title: "Request Latency Over Time"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "response.time"
label: "Avg Latency"
appearance:
x_axis:
title: "Time (UTC)"
y_left_axis:
title: "Response Time (milliseconds)"
Custom Axis Bounds¶
Set explicit minimum and maximum values for the Y-axis:
dashboards:
- name: "Custom Axis Bounds"
panels:
- title: "CPU Usage (0-100%)"
size: {w: 24, h: 15}
lens:
type: area
data_view: "metrics-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "system.cpu.usage"
label: "CPU %"
appearance:
y_left_axis:
title: "CPU Usage"
extent:
mode: custom
min: 0
max: 100
Logarithmic Scale¶
Use logarithmic scale for data with exponential growth:
dashboards:
- name: "Logarithmic Scale"
panels:
- title: "Event Count (Log Scale)"
size: {w: 24, h: 15}
lens:
type: bar
data_view: "logs-*"
dimension:
field: "service.name"
type: values
metrics:
- aggregation: count
label: "Event Count"
appearance:
y_left_axis:
title: "Count (log scale)"
scale: log
Data Bounds Mode¶
Automatically fit the axis to the actual data range:
dashboards:
- name: "Data Bounds Mode"
panels:
- title: "Response Time"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "response.time"
appearance:
y_left_axis:
extent:
mode: data_bounds # Fit to actual data
Dual Axis Charts¶
Configure different scales for left and right Y-axes:
dashboards:
- name: "Dual Axis Chart"
panels:
- title: "Requests vs Response Time"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: count
label: "Request Count"
axis: left
- aggregation: average
field: "response.time"
label: "Avg Response (ms)"
axis: right
appearance:
y_left_axis:
title: "Request Count"
extent:
mode: data_bounds
y_right_axis:
title: "Response Time (ms)"
extent:
mode: custom
min: 0
max: 1000
Legend Configuration¶
For comprehensive guidance on legend configuration, see the Legend Configuration Guide.
Represents legend formatting options for XY charts.
Attributes:
| Name | Type | Description |
|---|---|---|
show_single_series |
bool | None
|
Whether to show legend when there is only one series. Kibana defaults to false if not specified. |
truncate_labels |
int | None
|
Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 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 XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
}
Reference Lines¶
Reference lines are implemented as separate layers in multi-layer panels. This allows you to combine data visualizations with threshold lines in a single chart.
Represents a reference line layer configuration for multi-layer panels.
Reference lines display static threshold values, SLA targets, or baseline values on XY charts. They appear as horizontal or vertical lines with optional styling, labels, and icons.
Unlike data layers, reference lines don't query data - they display static values for visual context and comparison.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
Literal['reference_line']
|
The type of layer. Always 'reference_line'. |
data_view |
str
|
The data view to use for the layer (required for Kibana compatibility). |
reference_lines |
list[XYReferenceLine]
|
List of reference lines to display in this layer. |
Show JSON schema:
{
"$defs": {
"ReferenceLineIcon": {
"enum": [
"empty",
"alert",
"asterisk",
"bell",
"bolt",
"bug",
"circle",
"editor_comment",
"flag",
"heart",
"map_marker",
"pin_filled",
"star_empty",
"tag",
"triangle"
],
"type": "string"
},
"XYReferenceLine": {
"additionalProperties": false,
"description": "Configuration for a single reference line in an XY chart.\n\nInherits from BaseIdentifiableModel for automatic deterministic ID generation.",
"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": "Optional label for the reference line.",
"title": "Label"
},
"value": {
"anyOf": [
{
"$ref": "#/$defs/XYReferenceLineValue"
},
{
"type": "number"
}
],
"description": "The value for the reference line. Can be a float or XYReferenceLineValue object.",
"title": "Value"
},
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": "left",
"description": "The axis to assign the reference line to.",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The color of the reference line.",
"title": "Color"
},
"line_width": {
"anyOf": [
{
"maximum": 10,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The width of the reference line (1-10).",
"title": "Line Width"
},
"line_style": {
"anyOf": [
{
"enum": [
"solid",
"dashed",
"dotted"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The style of the reference line.",
"title": "Line Style"
},
"fill": {
"anyOf": [
{
"enum": [
"above",
"below",
"none"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Fill area above or below the line.",
"title": "Fill"
},
"icon": {
"anyOf": [
{
"$ref": "#/$defs/ReferenceLineIcon"
},
{
"type": "null"
}
],
"default": null,
"description": "Icon to display on the reference line."
},
"icon_position": {
"anyOf": [
{
"enum": [
"auto",
"left",
"right",
"above",
"below"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Position of the icon on the reference line.",
"title": "Icon Position"
}
},
"required": [
"value"
],
"title": "XYReferenceLine",
"type": "object"
},
"XYReferenceLineValue": {
"additionalProperties": false,
"description": "Defines the value for a reference line.",
"properties": {
"type": {
"const": "static",
"default": "static",
"description": "The type of value (always 'static' for now).",
"title": "Type",
"type": "string"
},
"value": {
"description": "The static value for the reference line.",
"title": "Value",
"type": "number"
}
},
"required": [
"value"
],
"title": "XYReferenceLineValue",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a reference line layer configuration for multi-layer panels.\n\nReference lines display static threshold values, SLA targets, or baseline values\non XY charts. They appear as horizontal or vertical lines with optional styling,\nlabels, and icons.\n\nUnlike data layers, reference lines don't query data - they display static values\nfor visual context and comparison.",
"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": "reference_line",
"default": "reference_line",
"description": "The type of layer. Always 'reference_line'.",
"title": "Type",
"type": "string"
},
"data_view": {
"description": "The data view to use for the layer (required for Kibana compatibility).",
"title": "Data View",
"type": "string"
},
"reference_lines": {
"description": "List of reference lines to display in this layer.",
"items": {
"$ref": "#/$defs/XYReferenceLine"
},
"title": "Reference Lines",
"type": "array"
}
},
"required": [
"data_view"
],
"title": "LensReferenceLineLayer",
"type": "object"
}
Configuration for a single reference line in an XY chart.
Inherits from BaseIdentifiableModel for automatic deterministic ID generation.
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str | None
|
Optional label for the reference line. |
value |
XYReferenceLineValue | float
|
The value for the reference line. Can be a float or XYReferenceLineValue object. |
axis |
Literal['left', 'right'] | None
|
The axis to assign the reference line to. |
color |
str | None
|
The color of the reference line. |
line_width |
int | None
|
The width of the reference line (1-10). |
line_style |
Literal['solid', 'dashed', 'dotted'] | None
|
The style of the reference line. |
fill |
Literal['above', 'below', 'none'] | None
|
Fill area above or below the line. |
icon |
ReferenceLineIcon | None
|
Icon to display on the reference line. |
icon_position |
Literal['auto', 'left', 'right', 'above', 'below'] | None
|
Position of the icon on the reference line. |
Show JSON schema:
{
"$defs": {
"ReferenceLineIcon": {
"enum": [
"empty",
"alert",
"asterisk",
"bell",
"bolt",
"bug",
"circle",
"editor_comment",
"flag",
"heart",
"map_marker",
"pin_filled",
"star_empty",
"tag",
"triangle"
],
"type": "string"
},
"XYReferenceLineValue": {
"additionalProperties": false,
"description": "Defines the value for a reference line.",
"properties": {
"type": {
"const": "static",
"default": "static",
"description": "The type of value (always 'static' for now).",
"title": "Type",
"type": "string"
},
"value": {
"description": "The static value for the reference line.",
"title": "Value",
"type": "number"
}
},
"required": [
"value"
],
"title": "XYReferenceLineValue",
"type": "object"
}
},
"additionalProperties": false,
"description": "Configuration for a single reference line in an XY chart.\n\nInherits from BaseIdentifiableModel for automatic deterministic ID generation.",
"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": "Optional label for the reference line.",
"title": "Label"
},
"value": {
"anyOf": [
{
"$ref": "#/$defs/XYReferenceLineValue"
},
{
"type": "number"
}
],
"description": "The value for the reference line. Can be a float or XYReferenceLineValue object.",
"title": "Value"
},
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": "left",
"description": "The axis to assign the reference line to.",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The color of the reference line.",
"title": "Color"
},
"line_width": {
"anyOf": [
{
"maximum": 10,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The width of the reference line (1-10).",
"title": "Line Width"
},
"line_style": {
"anyOf": [
{
"enum": [
"solid",
"dashed",
"dotted"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The style of the reference line.",
"title": "Line Style"
},
"fill": {
"anyOf": [
{
"enum": [
"above",
"below",
"none"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Fill area above or below the line.",
"title": "Fill"
},
"icon": {
"anyOf": [
{
"$ref": "#/$defs/ReferenceLineIcon"
},
{
"type": "null"
}
],
"default": null,
"description": "Icon to display on the reference line."
},
"icon_position": {
"anyOf": [
{
"enum": [
"auto",
"left",
"right",
"above",
"below"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Position of the icon on the reference line.",
"title": "Icon Position"
}
},
"required": [
"value"
],
"title": "XYReferenceLine",
"type": "object"
}
Reference Line Examples¶
Reference lines help highlight important thresholds, targets, or limits in your charts. Below are comprehensive examples showing different styling options and use cases.
Basic Reference Line¶
Add a simple horizontal line to mark a threshold:
dashboards:
- name: "Basic Reference Line"
panels:
- title: "Response Time with SLA Threshold"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "response.time"
label: "Avg Response Time"
layers:
- type: reference_line
data_view: "logs-*"
reference_lines:
- value: 500
label: "SLA Limit (500ms)"
Styled Reference Lines¶
Customize line color, width, and style:
dashboards:
- name: "Styled Reference Lines"
panels:
- title: "CPU Usage with Multiple Thresholds"
size: {w: 24, h: 15}
lens:
type: area
data_view: "metrics-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "system.cpu.usage"
label: "CPU %"
layers:
- type: reference_line
data_view: "metrics-*"
reference_lines:
# Warning threshold (yellow, dashed)
- value: 70
label: "Warning"
color: "#FFA500"
line_width: 2
line_style: dashed
# Critical threshold (red, solid)
- value: 90
label: "Critical"
color: "#BD271E"
line_width: 3
line_style: solid
# Target (green, dotted)
- value: 50
label: "Target"
color: "#00BF6F"
line_width: 2
line_style: dotted
Reference Lines with Fill¶
Fill the area above or below a reference line:
dashboards:
- name: "Reference Lines with Fill"
panels:
- title: "Error Rate with Acceptable Range"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- formula: "count(kql='log.level:error') / count() * 100"
label: "Error Rate %"
layers:
- type: reference_line
data_view: "logs-*"
reference_lines:
# Fill above this line in red (danger zone)
- value: 5
label: "Max Acceptable Error Rate"
color: "#BD271E"
line_width: 2
fill: above
# Fill below this line in green (safe zone)
- value: 1
label: "Target Error Rate"
color: "#00BF6F"
line_width: 1
fill: below
Reference Lines with Icons¶
Add icons to reference lines for visual emphasis:
dashboards:
- name: "Reference Lines with Icons"
panels:
- title: "Memory Usage with Limits"
size: {w: 24, h: 15}
lens:
type: area
data_view: "metrics-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: max
field: "system.memory.used.pct"
label: "Memory Usage %"
layers:
- type: reference_line
data_view: "metrics-*"
reference_lines:
- value: 80
label: "Warning Level"
color: "#FFA500"
line_width: 2
icon: "triangle"
icon_position: right
- value: 95
label: "Critical Level"
color: "#BD271E"
line_width: 3
icon: "alert"
icon_position: right
Multiple Metrics with Reference Lines¶
Combine multiple data series with reference lines:
dashboards:
- name: "Multi-Metric with Thresholds"
panels:
- title: "Request Metrics with SLA"
size: {w: 24, h: 15}
lens:
type: line
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: average
field: "response.time"
label: "Avg Response Time"
axis: left
- aggregation: percentile
field: "response.time"
percentile: 95
label: "P95 Response Time"
axis: left
layers:
- type: reference_line
data_view: "logs-*"
reference_lines:
- value: 500
label: "SLA: Avg < 500ms"
color: "#0077CC"
line_width: 2
line_style: solid
axis: left
- value: 1000
label: "SLA: P95 < 1000ms"
color: "#9170B8"
line_width: 2
line_style: dashed
axis: left
Dynamic Reference Lines (Formula-Based)¶
While reference lines are typically static values, you can use formulas in your metrics to create threshold-aware visualizations:
dashboards:
- name: "Threshold-Aware Visualization"
panels:
- title: "Requests Above Threshold"
size: {w: 24, h: 15}
lens:
type: bar
data_view: "logs-*"
dimension:
field: "@timestamp"
type: date_histogram
metrics:
- aggregation: count
label: "Total Requests"
- formula: "count() - 1000"
label: "Requests Above Threshold (1000)"
layers:
- type: reference_line
data_view: "logs-*"
reference_lines:
- value: 1000
label: "Threshold"
color: "#BD271E"
line_width: 2
Reference Line Best Practices¶
- Use Semantic Colors: Match colors to meaning (green = good, yellow = warning, red = critical)
- Limit the Number: Too many reference lines create visual clutter (3-4 maximum recommended)
- Clear Labels: Always label reference lines so users understand what they represent
- Appropriate Fill: Use fill sparingly and only when it adds clarity
- Consistent Styling: Use the same styling patterns across dashboards for similar thresholds
ES|QL XY Charts¶
Represents a Bar chart configuration within an ES|QL panel.
Bar charts display categorical or time-series data using vertical or horizontal bars, where bar height/length represents metric values. Ideal for comparing values across categories or showing distributions over time.
The field names used in dimension, metrics, and breakdown must correspond to
columns returned by your ES|QL query.
Examples:
ES|QL bar chart with time series:
esql:
type: bar
query: |
FROM logs-*
| STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)
dimension:
field: "@timestamp"
metrics:
- field: "count"
Stacked bar chart with breakdown:
esql:
type: bar
mode: stacked
query: |
FROM logs-*
| STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), service.name
dimension:
field: "@timestamp"
breakdown:
field: "service.name"
metrics:
- field: "count"
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"BarChartAppearance": {
"additionalProperties": false,
"description": "Represents bar chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include bar-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"min_bar_height": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum height for bars in bar charts.",
"title": "Min Bar Height"
}
},
"title": "BarChartAppearance",
"type": "object"
},
"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"
},
"ESQLDimensionTypes": {
"additionalProperties": false,
"description": "A dimension 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 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"
}
},
"required": [
"field"
],
"title": "ESQLDimension",
"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"
}
]
},
"ESQLXYMetricTypes": {
"additionalProperties": false,
"description": "XY chart ESQL metric with appearance options.\n\nExtends ESQLMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYESQLMetric",
"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"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Bar chart configuration within an ES|QL panel.\n\nBar charts display categorical or time-series data using vertical or horizontal bars,\nwhere bar height/length represents metric values. Ideal for comparing values across\ncategories or showing distributions over time.\n\nThe `field` names used in dimension, metrics, and breakdown must correspond to\ncolumns returned by your ES|QL query.\n\nExamples:\n ES|QL bar chart with time series:\n ```yaml\n esql:\n type: bar\n query: |\n FROM logs-*\n | STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)\n dimension:\n field: \"@timestamp\"\n metrics:\n - field: \"count\"\n ```\n\n Stacked bar chart with breakdown:\n ```yaml\n esql:\n type: bar\n mode: stacked\n query: |\n FROM logs-*\n | STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), service.name\n dimension:\n field: \"@timestamp\"\n breakdown:\n field: \"service.name\"\n metrics:\n - field: \"count\"\n ```",
"properties": {
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/ESQLDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/ESQLXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/ESQLBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional dimension to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "bar",
"default": "bar",
"description": "The type of XY chart to display. Defaults to 'bar'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/BarChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
},
"mode": {
"default": "stacked",
"description": "The stacking mode for bar and area charts. Defaults to 'stacked'.",
"enum": [
"stacked",
"unstacked",
"percentage"
],
"title": "Mode",
"type": "string"
}
},
"required": [
"metrics"
],
"title": "ESQLBarChart",
"type": "object"
}
Represents a Line chart configuration within an ES|QL panel.
Line charts display data points connected by lines, ideal for visualizing trends and changes over time. Supports multiple metrics and optional breakdown for comparing series.
The field names used in dimension, metrics, and breakdown must correspond to
columns returned by your ES|QL query.
Examples:
ES|QL line chart for time series:
esql:
type: line
query: |
FROM metrics-*
| STATS avg_cpu = AVG(system.cpu.total.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)
dimension:
field: "@timestamp"
metrics:
- field: "avg_cpu"
Line chart with breakdown by host:
esql:
type: line
query: |
FROM metrics-*
| STATS avg_cpu = AVG(system.cpu.total.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), host.name
dimension:
field: "@timestamp"
breakdown:
field: "host.name"
metrics:
- field: "avg_cpu"
Show JSON schema:
{
"$defs": {
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"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"
},
"ESQLDimensionTypes": {
"additionalProperties": false,
"description": "A dimension 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 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"
}
},
"required": [
"field"
],
"title": "ESQLDimension",
"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"
}
]
},
"ESQLXYMetricTypes": {
"additionalProperties": false,
"description": "XY chart ESQL metric with appearance options.\n\nExtends ESQLMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYESQLMetric",
"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"
},
"LineChartAppearance": {
"additionalProperties": false,
"description": "Represents line chart appearance formatting options.\n\nExtends BaseXYChartAppearance to include line-specific options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
}
},
"title": "LineChartAppearance",
"type": "object"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents a Line chart configuration within an ES|QL panel.\n\nLine charts display data points connected by lines, ideal for visualizing trends\nand changes over time. Supports multiple metrics and optional breakdown for\ncomparing series.\n\nThe `field` names used in dimension, metrics, and breakdown must correspond to\ncolumns returned by your ES|QL query.\n\nExamples:\n ES|QL line chart for time series:\n ```yaml\n esql:\n type: line\n query: |\n FROM metrics-*\n | STATS avg_cpu = AVG(system.cpu.total.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)\n dimension:\n field: \"@timestamp\"\n metrics:\n - field: \"avg_cpu\"\n ```\n\n Line chart with breakdown by host:\n ```yaml\n esql:\n type: line\n query: |\n FROM metrics-*\n | STATS avg_cpu = AVG(system.cpu.total.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), host.name\n dimension:\n field: \"@timestamp\"\n breakdown:\n field: \"host.name\"\n metrics:\n - field: \"avg_cpu\"\n ```",
"properties": {
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/ESQLDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/ESQLXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/ESQLBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional dimension to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "line",
"default": "line",
"description": "The type of XY chart to display. Defaults to 'line'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/LineChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance."
}
},
"required": [
"metrics"
],
"title": "ESQLLineChart",
"type": "object"
}
Represents an Area chart configuration within an ES|QL panel.
Area charts display data with filled areas beneath the lines, useful for visualizing cumulative values or showing the magnitude of trends over time. Supports stacked and percentage modes for comparing proportions.
The field names used in dimension, metrics, and breakdown must correspond to
columns returned by your ES|QL query.
Examples:
ES|QL area chart for resource usage:
esql:
type: area
query: |
FROM metrics-*
| STATS avg_mem = AVG(system.memory.used.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)
dimension:
field: "@timestamp"
metrics:
- field: "avg_mem"
Stacked area chart with percentage mode:
esql:
type: area
mode: percentage
query: |
FROM logs-*
| STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), service.name
dimension:
field: "@timestamp"
breakdown:
field: "service.name"
metrics:
- field: "count"
Show JSON schema:
{
"$defs": {
"AreaChartAppearance": {
"additionalProperties": false,
"description": "Represents area chart appearance formatting options.",
"properties": {
"x_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the X-axis."
},
"y_left_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the left Y-axis."
},
"y_right_axis": {
"anyOf": [
{
"$ref": "#/$defs/AxisConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for the right Y-axis."
},
"values": {
"anyOf": [
{
"$ref": "#/$defs/XYValuesConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for value labels on data points."
},
"missing_values": {
"anyOf": [
{
"enum": [
"none",
"linear",
"carry",
"lookahead",
"average",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle missing data points. Controls interpolation for gaps in your data.",
"title": "Missing Values"
},
"show_as_dotted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "If `true`, visually distinguish interpolated data from real data points. Defaults to `false`.",
"title": "Show As Dotted"
},
"end_values": {
"anyOf": [
{
"enum": [
"none",
"zero",
"nearest"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "How to handle the end of the time range in line/area charts.",
"title": "End Values"
},
"line_style": {
"anyOf": [
{
"enum": [
"linear",
"monotone-x",
"step-after"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The line style for line/area charts. Only 3 types are supported by Kibana: linear (straight), monotone-x (smooth), step-after (stepped).",
"title": "Line Style"
},
"show_current_time_marker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to show a vertical line at the current time in time series charts.",
"title": "Show Current Time Marker"
},
"hide_endzones": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to hide end zones in time series charts (areas where data is incomplete).",
"title": "Hide Endzones"
},
"fill_opacity": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The fill opacity for area charts (0.0 to 1.0).",
"title": "Fill Opacity"
}
},
"title": "AreaChartAppearance",
"type": "object"
},
"AxisConfig": {
"additionalProperties": false,
"description": "Represents configuration for a single axis in XY charts.",
"properties": {
"title": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Axis title mode/value: True=auto, False=hidden, string=custom title.",
"title": "Title"
},
"scale": {
"anyOf": [
{
"enum": [
"linear",
"log",
"sqrt",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Scale type for the axis. Defaults to 'linear'.",
"title": "Scale"
},
"extent": {
"anyOf": [
{
"$ref": "#/$defs/AxisExtent"
},
{
"type": "null"
}
],
"default": null,
"description": "Extent/bounds configuration for the axis."
}
},
"title": "AxisConfig",
"type": "object"
},
"AxisExtent": {
"additionalProperties": false,
"description": "Represents axis extent (bounds) configuration for XY chart axes.\n\nControls the range of values displayed on an axis. Can be set to:\n- 'full': Use the full extent of the data\n- 'custom': Specify custom bounds with min/max values\n- 'data_bounds': Fit to the actual data bounds",
"properties": {
"mode": {
"default": "full",
"description": "The extent mode for the axis. Defaults to 'full'.",
"enum": [
"full",
"custom",
"data_bounds"
],
"title": "Mode",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Minimum value for the axis (only used when mode is 'custom').",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum value for the axis (only used when mode is 'custom').",
"title": "Max"
},
"enforce": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to enforce the bounds strictly. Defaults to false.",
"title": "Enforce"
},
"nice_values": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether to use nice rounded values for bounds. Defaults to true.",
"title": "Nice Values"
}
},
"title": "AxisExtent",
"type": "object"
},
"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"
},
"ESQLDimensionTypes": {
"additionalProperties": false,
"description": "A dimension 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 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"
}
},
"required": [
"field"
],
"title": "ESQLDimension",
"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"
}
]
},
"ESQLXYMetricTypes": {
"additionalProperties": false,
"description": "XY chart ESQL metric with appearance options.\n\nExtends ESQLMetric to include axis and color configuration\nfor use in XY charts.",
"properties": {
"axis": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which Y-axis to assign this metric to ('left' or 'right').",
"title": "Axis"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom color for this metric series (hex color code, e.g., '#2196F3').",
"title": "Color"
},
"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": "XYESQLMetric",
"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"
},
"XYLegend": {
"additionalProperties": false,
"description": "Represents legend formatting options for XY 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."
},
"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"
},
"truncate_labels": {
"anyOf": [
{
"maximum": 5,
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of lines to truncate legend labels to. Set to 0 to disable truncation. Kibana defaults to 1 if not specified.",
"title": "Truncate Labels"
}
},
"title": "XYLegend",
"type": "object"
},
"XYValuesConfig": {
"additionalProperties": false,
"description": "Formatting options for value labels on data points.",
"properties": {
"visible": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Controls whether value labels are shown on data points (e.g., on top of bars). Kibana defaults to hidden if not specified.",
"title": "Visible"
}
},
"title": "XYValuesConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "Represents an Area chart configuration within an ES|QL panel.\n\nArea charts display data with filled areas beneath the lines, useful for\nvisualizing cumulative values or showing the magnitude of trends over time.\nSupports stacked and percentage modes for comparing proportions.\n\nThe `field` names used in dimension, metrics, and breakdown must correspond to\ncolumns returned by your ES|QL query.\n\nExamples:\n ES|QL area chart for resource usage:\n ```yaml\n esql:\n type: area\n query: |\n FROM metrics-*\n | STATS avg_mem = AVG(system.memory.used.pct) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend)\n dimension:\n field: \"@timestamp\"\n metrics:\n - field: \"avg_mem\"\n ```\n\n Stacked area chart with percentage mode:\n ```yaml\n esql:\n type: area\n mode: percentage\n query: |\n FROM logs-*\n | STATS count = COUNT(*) BY @timestamp = BUCKET(@timestamp, 20, ?_tstart, ?_tend), service.name\n dimension:\n field: \"@timestamp\"\n breakdown:\n field: \"service.name\"\n metrics:\n - field: \"count\"\n ```",
"properties": {
"dimension": {
"anyOf": [
{
"$ref": "#/$defs/ESQLDimensionTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the X-axis dimension for the chart. XY charts support 0 or 1 dimension."
},
"metrics": {
"description": "Defines the metrics for the chart. At least one metric is required.",
"items": {
"$ref": "#/$defs/ESQLXYMetricTypes"
},
"minItems": 1,
"title": "Metrics",
"type": "array"
},
"breakdown": {
"anyOf": [
{
"$ref": "#/$defs/ESQLBreakdownTypes"
},
{
"type": "null"
}
],
"default": null,
"description": "An optional dimension to split the series by. If provided, it will be used to break down the data into multiple series."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A unique identifier. If not provided, one will be generated automatically.",
"title": "Id"
},
"legend": {
"anyOf": [
{
"$ref": "#/$defs/XYLegend"
},
{
"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 palette."
},
"type": {
"const": "area",
"default": "area",
"description": "The type of XY chart to display. Defaults to 'area'.",
"title": "Type",
"type": "string"
},
"appearance": {
"anyOf": [
{
"$ref": "#/$defs/AreaChartAppearance"
},
{
"type": "null"
}
],
"default": null,
"description": "Formatting options for the chart appearance. AreaChartAppearance includes all line chart options plus fill_opacity."
},
"mode": {
"default": "stacked",
"description": "The stacking mode for bar and area charts. Defaults to 'stacked'.",
"enum": [
"stacked",
"unstacked",
"percentage"
],
"title": "Mode",
"type": "string"
}
},
"required": [
"metrics"
],
"title": "ESQLAreaChart",
"type": "object"
}