Histogram

Use a histogram to show how raw values are distributed across generated numeric bins.

query.bins controls the number of generated bins. An optional query.domain.minimum/query.domain.maximum fixes the numeric domain while preserving the same null-policy and approximation contract; omitted bounds use the observed domain.

Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.

Basic distribution

Select one numeric field and a bin count so LeapView can count observations in each interval.

Key fields
visuals:
  delivery_histogram:
    title: Delivery days histogram
    description: Buckets order volume by delivery duration.
    type: histogram
    presentation:
      type: cartesian
    query:
      type: histogram
      field: delivery_days
      bins: 16
      nullPolicy: omit
      approximation: exact

Custom bins

Change the numeric field to revenue and adjust query.bins to balance distribution detail against the available chart width.

Key fields
visuals:
  revenue_histogram:
    title: Revenue histogram
    type: histogram
    presentation:
      type: cartesian
    query:
      type: histogram
      field: revenue
      bins: 18
      nullPolicy: omit
      approximation: exact

Labeled bins

Use fewer bins for the bounded review scale and an automatic label policy so useful bin counts remain visible without uncontrolled overlap.

Key fields
visuals:
  review_histogram:
    title: Review score histogram
    type: histogram
    presentation:
      type: cartesian
      labels:
        density: automatic
        priority:
        - selected
        - anomaly
        - threshold
        maxCharacters: 12
        minimumSpacing: 6
        tooltipFallback: true
    query:
      type: histogram
      field: review_score
      bins: 10
      nullPolicy: omit
      approximation: exact

API reference

Kind: chart. Renderer: echarts. Supported result shapes: histogram_bins.

FieldTypeDefaultAllowed valuesDescription
query.fieldfield referenceSelects the governed metric used by a histogram or distribution query.
presentation.labelslabel policyhiddenhidden automatic dense alwaysControls deterministic label density, priority, truncation, and tooltip fallback.

Accessibility. Use a descriptive title and unit, and do not rely on color alone to distinguish series or values.