Interface: PatternOptionsObject

Highcharts. PatternOptionsObject

Pattern options

Members

aspectRatio :number

For automatically calculated width and height on images, it is possible to set an aspect ratio. The image will be zoomed to fill the bounding box, maintaining the aspect ratio defined.

Type:
  • number

color :Highcharts.ColorString

Pattern color, used as default path stroke.

Type:

height :number

Analogous to pattern.width.

Type:
  • number

id :string

ID to assign to the pattern. This is automatically computed if not added, and identical patterns are reused. To refer to an existing pattern for a Highcharts color, use color: "url(#pattern-id)".

Type:
  • string

image :string

URL to an image to use as the pattern.

Type:
  • string

opacity :number

Opacity of the pattern as a float value from 0 to 1.

Type:
  • number

path :string|Highcharts.SVGAttributes

Either an SVG path as string, or an object. As an object, supply the path string in the path.d property. Other supported properties are standard SVG attributes like path.stroke and path.fill. If a path is supplied for the pattern, the image property is ignored.

Type:

width :number

Width of the pattern. For images this is automatically set to the width of the element bounding box if not supplied. For non-image patterns the default is 32px. Note that automatic resizing of image patterns to fill a bounding box dynamically is only supported for patterns with an automatically calculated ID.

Type:
  • number

x :number|undefined

Horizontal offset of the pattern. Defaults to 0.

Type:
  • number | undefined

y :number|undefined

Vertical offset of the pattern. Defaults to 0.

Type:
  • number | undefined