Options
All
  • Public
  • Public/Protected
  • All
Menu

builder for a ranking

Hierarchy

  • RankingBuilder

Index

Methods

aggregate

  • aggregate(): this

allColumns

  • allColumns(): this

build

  • build(data: ADataProvider): Ranking

column

group

  • group(): this

groupBy

  • groupBy(...columns: string[]): this

impose

  • impose(label: string | null, numberColumn: string, categoricalColumn: string): this
  • add an imposed column (numerical column colored by categorical column) to this ranking

    Parameters

    • label: string | null

      optional label

    • numberColumn: string

      numerical column reference

    • categoricalColumn: string

      categorical column reference

    Returns this

nested

  • nested(label: string | null, column: string, ...columns: string[]): this
  • add a nested / group composite column

    Parameters

    • label: string | null

      optional label

    • column: string

      first element of the group enforcing not empty ones

    • Rest ...columns: string[]

      additional columns

    Returns this

rank

  • rank(): this

reduce

  • reduce(label: string | null, operation: EAdvancedSortMethod, numberColumn1: string, numberColumn2: string, ...numberColumns: string[]): this
  • add reducing column (min, max, median, mean, ...)

    Parameters

    • label: string | null

      optional label

    • operation: EAdvancedSortMethod

      operation to apply (min, max, median, mean, ...)

    • numberColumn1: string

      first numerical column

    • numberColumn2: string

      second numerical column

    • Rest ...numberColumns: string[]

      additional numerical columns

    Returns this

scripted

  • scripted(label: string | null, code: string, numberColumn1: string, numberColumn2: string, ...numberColumns: string[]): this
  • add a scripted / formula column

    Parameters

    • label: string | null

      optional label

    • code: string

      the JS code see ScriptColumn for details

    • numberColumn1: string

      first numerical column

    • numberColumn2: string

      second numerical column

    • Rest ...numberColumns: string[]

      additional numerical columns

    Returns this

selection

  • selection(): this

sortBy

  • sortBy(column: string, asc?: boolean | "asc" | "desc"): this
  • specify another sorting criteria

    Parameters

    • column: string

      the column name optionally with encoded sorting separated by colon, e.g. a:desc

    • Default value asc: boolean | "asc" | "desc" = true

      ascending or descending order

    Returns this

supportTypes

  • supportTypes(): this

weightedSum

  • weightedSum(label: string | null, numberColumn1: string, weight1: number, numberColumn2: string, weight2: number, ...numberColumnAndWeights: (string | number)[]): this
  • add a weighted sum / stack column

    Parameters

    • label: string | null

      optional label

    • numberColumn1: string

      the first numerical column

    • weight1: number

      its weight (0..1)

    • numberColumn2: string

      the second numerical column

    • weight2: number

      its weight (0..1)

    • Rest ...numberColumnAndWeights: (string | number)[]

      alternating column weight references

    Returns this