Type definition of an Glow Effect Configuration_.

A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components. Whether this effect is drawn above a particular component can be configured using the setEffect method.

Theme effect is configured with effect property.

Hierarchy

  • GlowEffectRecord
    • GlowEffect

Implements

Constructors

  • Constructor for a GlowEffect object.

    All parameters are optional, and when omitted fallback to default values.

     // Example, define an GlowEffect object
    const glowEffect = new GlowEffect({
    color: ColorRGBA(100, 0, 0, 150),
    blur: 5,
    })

    For details of the available properties, see GlowEffectProperties

    Parameters

    • Optional props: Partial<GlowEffectProperties>

    Returns GlowEffect

Properties

blur: number

Blur distance as pixels.

Max value 10.

color: Color

Glow color.

Assign using ColorRGBA or any other color factory. Glow intensity can be controlled with color alpha channel.

 // Example, red glow color.
color: ColorRGBA(255, 0, 0, 255)
offset: Point

Offset as pixels.

spread: number

Spread distance as pixels.

Max value 10.

type: "glow" = 'glow'

Methods

  • Get Glow blur distance as pixels.

    Returns

    Blur distance as pixels.

    Returns number

  • Get Glow color.

    Returns

    Color.

    Returns Color

  • Get Glow offset distance as pixels.

    Returns

    Offset distance as pixels.

    Returns Point

  • Get Glow spread distance as pixels.

    Returns

    Spread distance as pixels.

    Returns number

  • Construct a new GlowEffect object based on this one, but with modified blur distance.

     // Example
    const glow2 = glow1.setBlur(10)

    Returns

    New GlowEffect object

    Parameters

    • blur: number | ImmutableMutator<number, number>

      Blur distance as pixels. Max value is 10.

    Returns GlowEffect

  • Construct a new GlowEffect object based on this one, but with modified spread distance.

     // Example
    const glow2 = glow1.setSpread(10)

    Returns

    New GlowEffect object

    Parameters

    • spread: number | ImmutableMutator<number, number>

      Spread distance as pixels. Max value is 10.

    Returns GlowEffect