Skip to main content

Date

Statistics

LineUp-lite computes the following statistics for a date attribute:

/**
* on which granularity level is the histogram computed
*/
export declare type DateHistGranularity = 'year' | 'month' | 'day' | 'decade';

export interface IDateStats extends INumericStats<Date> {
/**
* the granularity in which the histogram is computed
*/
readonly histGranularity: DateHistGranularity;
}

see IDateStats API Docs

Generator Function

The stats generator function has the following signature. It returns a function that can be used to compute statistics for a given array.

export function dateStatsGenerator(options: DateStatsOptions = {}): (arr: readonly (Date | null)[]) => IDateStats;

see dateStatsGenerator API Docs

Example

Live Editor
Result
Loading...

Visualization

Cell

DateLabel React component

Live Editor
Result
Loading...

Aggregation

Histogram React component

Live Editor
Result
Loading...

Interactive Summary

FilterRangeHistogram React component

Live Editor
Result
Loading...