getRange
A Range model is a data model that represents a range (min and max) for a numerical column. It is suitable for displaying certain headline or scorecard visualizations, but it also makes it way easier to build a UI-based range slider for filtering.
Usage
const formula = await dataSource.getRange({
column: 'column_A',
// + base options...
});
Options
The getRange
model inherits all options from the base options, plus:
export interface RangeRequestOptions extends BaseRequestOptions {
column: string;
}
column: the name of the column that you will request the range for. Must be a numerical column.
Response
A rows
list containing a single data object with two values: the min
and max
values for the requested column.
type RangeModelResponse = {min: number; max: number};
/* example response
{min: -1, max: 1300},
*/
The response can be then mapped to any HTML element such as a range slider for filtering.

Last updated
Was this helpful?