Skip to main content
Skip to main content

sparkbar

The function plots a frequency histogram for values x and the repetition rate y of these values over the interval [min_x, max_x]. Repetitions for all x falling into the same bucket are averaged, so data should be pre-aggregated. Negative repetitions are ignored.

If no interval is specified, then the minimum x is used as the interval start, and the maximum x — as the interval end. Otherwise, values outside the interval are ignored.

Syntax

Parameters

  • buckets — The number of segments. Type: Integer.
  • min_x — The interval start. Optional parameter.
  • max_x — The interval end. Optional parameter.

Arguments

  • x — The field with values.
  • y — The field with the frequency of values.

Returned value

  • The frequency histogram.

Example

Query:

Result:

The alias for this function is sparkBar.