vega-lite-api

vl.bin(field, bin)

Discretize numeric values into uniform bins.

bin Method Overview

bin API Reference

# bin.as(…value)

The output fields at which to write the start and end bin values. This can be either a string or an array of strings with two elements denoting the name for the fields for bin start and bin end respectively. If a single string (e.g., "val") is provided, the end field will be "val_end".

# bin.bin(value)

An object indicating bin properties, or simply true for using default bin parameters.

# bin.field(value)

The data field to bin.