dev_docs/lens/breakdown.mdx
breakdownThe breakdown configuration within the Lens Config Builder API allows developers to define how data should be segmented or aggregated in their visualizations.
The breakdown configuration in case of using ES|QL or Datatable as a datasource just takes in the field name to use as a breakdown.
When using index as a datasource, breakdown can still be a field name, in which case lens will try to choose the most appropriate option, or it could be one of the following:
LensBreakdownTopValuesConfig):field (the field to break down by) and size (the number of top values to display).LensBreakdownDateHistogramConfig):field (the date field for the histogram), and minimumInterval (the smallest interval to use, e.g., 1M for monthly).LensBreakdownIntervalsConfig):field (the numeric field to create intervals from) and granularity (the interval size).LensBreakdownFiltersConfig):filters, each with a label (optional) and a filter string defining the filter query.