Skip to main content

Text

Text attributes are string attributes that have mostly uniquely different values, such as names or locations.

Statistics​

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

export interface ITextStats extends ICommonStats {
/**
* number of unique text items
*/
readonly unique: number;
/**
* top 10 most frequent text items sorted descending by count
*/
readonly mostFrequent: readonly { value: string; count: number }[];
/**
* converts a given string to a label
*/
format: (v: string) => string;
}

see ITextStats 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 textStatsGenerator(options: TextStatsOptions = {}): (arr: readonly string[]) => ITextStats;

see textStatsGenerator API Docs

Example​

Live Editor
Result
Loading...

Visualization​

Cell​

TextLabel React component

Live Editor
Result
Loading...

Aggregation​

Histogram React component

Live Editor
Result
Loading...

Interactive Summary​

TextSummary React component

Live Editor
Result
Loading...