Class ColorStops

Color stops as received by a continuous palette.

Hierarchy

  • ColorStops

Index

Properties

aligned

aligned: ColorStop[]

The list of aligned color stops in this collection. The aligned stops always match the data domain.

interpolate

interpolate: boolean

Flag to indicate whether stops should be interpolated.

stops

stops: ColorStop[]

The list of color stops in this collection.

Methods

getColor

  • getColor(_value: number): Color
  • Retrieves a color given a value.

    Parameters

    • _value: number

      The value to get the color for.

    Returns Color

    The color of the value.

getFillColor

  • Determine the fill color for a data point. The fill follows the 'selected' state of a data point. If the data set has selected data points, then the ones that are selected get the normal color as fill color and the ones that are not selected get a 60% transparent color.

    Parameters

    • _dp: DataPoint

      The data point to determine the color for.

    Returns string

    The color of the data point as a string.

getOutlineColor

  • getOutlineColor(_dp: DataPoint): string | null
  • Determine the outline color for a data point. The outline color depends on both the 'highlight' state and the 'selected' state. If the point is neither highlighted or selected, null is returned to indicate that no outline needs to be rendered. If the point is highlighted or part of a selection, then the returned color is a darker version of the actual data point color.

    Parameters

    • _dp: DataPoint

      The data point to determine the color for.

    Returns string | null

    The color of the data point as a string or null if no outline is needed.