Skip to content

Linear Gradient Config

Configure linear gradients to be applied to series.

linearGradients is a list section: it takes an array of config objects (a single object is also accepted and treated as a one-entry array). Values shared by every entry can be set once in linearGradientDefaults; a value set on an individual entry wins over the shared one.

Every property is optional and falls back to its default. Property anchors are stable: link to any entry as #linearGradients.propertyName, and to a member of a nested property as #linearGradients.propertyName.memberName.

Properties

id

The unique identifier for the gradient so that it can be referenced for use.

  • Default: LG${index} — linear gradient index
  • Validation: should be a string; should be unique
  • Used in: Gradients · Gradients

rotation

The rotation property (in degrees) of the svg linear gradient.

  • Default: 0
  • Validation: should be a number >= to -360 and <= 360
  • Used in: Gradients

stops

The list of svg gradient stops, with offset, color and opacity properties.

  • Default: none
  • Validation: should be a non-empty array with elements that should be an object with exact properties { offset: should be a number >= to 0 and <= 1, color: should be a valid color, opacity: should be a number >= to 0 and <= 1 }
  • Used in: Gradients · Gradients

x1

The x1 property of the svg linear gradient.

x2

The x2 property of the svg linear gradient.

y1

The y1 property of the svg linear gradient.

y2

The y2 property of the svg linear gradient.

Released under the BSD-3-Clause License.