Interface LegendThresholdProps<T>

Type Parameters

  • T

Hierarchy

Properties

borderRadius?: number

Border radius of the thermometer.

Default

6 (vertical orientation)

Default

10 (horizontal orientation)

getItemColor: ((item: T, itemIndex: number) => string)

Type declaration

    • (item: T, itemIndex: number): string
    • Function that returns the legend item's color.

      Returns

      The item color.

      Parameters

      • item: T

        The legend item.

      • itemIndex: number

        Index of the legend item.

      Returns string

getItemLabel?: ((item: T, itemIndex: number) => string)

Type declaration

    • (item: T, itemIndex: number): string
    • Function that returns the legend item's label.

      Returns

      The item label.

      Parameters

      • item: T

        The legend item.

      • itemIndex: number

        Index of the legend item.

      Returns string

getItemShowIndicator?: ((item: T, itemIndex: number) => undefined | boolean)

Type declaration

    • (item: T, itemIndex: number): undefined | boolean
    • Function that returns whether or not to show an indicator of the current value.

      Returns

      Whether or not to show the indicator.

      Parameters

      • item: T

        The legend item.

      • itemIndex: number

        Index of the legend item.

      Returns undefined | boolean

getItemSublabel?: ((item: T, itemIndex: number) => string)

Type declaration

    • (item: T, itemIndex: number): string
    • Function that returns the legend item's sublabel.

      Returns

      The item sublabel.

      Parameters

      • item: T

        The legend item.

      • itemIndex: number

        Index of the legend item.

      Returns string

height?: number

Height of the thermometer.

Default

265 (vertical orientation)

Default

20 (horizontal orientation)

items: T[]

Array of legend items, containing properties about each section of the legend.

orientation: "horizontal" | "vertical"

Orientation of the legend.

showLabels?: boolean

Show the labels of each legend item.

Default

true

width?: number

Width of the thermometer.

Default

12 (vertical orientation)

Default

300 (horizontal orientation)

Generated using TypeDoc