# Interface Theme

GoJS® Diagramming Components
version 3.0.7
by Northwoods Software®

An interface describing a theme.

The various optional properties this interface provides are the default object names used to lookup some binding target properties. For example, Panel.padding is looked up in the margins object and Shape.strokeWidth and GraphObject.opacity are looked up in the numbers object.

While the indexer can be used for other arbitrary objects, we suggest using the optional named properties here for their respective purposes.

`since`

3.0

#### Indexable

[index: string]: ThemeValues<any> | undefined

The string index, allowing for any other ThemeValues object

#####
Index

### Properties

arrowheads?
colors?
fonts?
margins?
numbers?
points?
rects?
sizes?
spots?
targetPropertyMap?

## Properties

### `Optional` arrowheads
: ThemeValues<string>

The arrowheads used for Link shapes. Values should correspond with valid arrowhead names for Shape.fromArrow and Shape.toArrow.

Built-in themes provide a `toArrow` value for the default link template.

### `Optional` colors
: ThemeColors

The colors used by the theme. See ThemeColors.

### `Optional` fonts
: ThemeValues<string>

The fonts used by the theme.

Built-in themes provide values for `normal` and `bold` fonts.

### `Optional` margins
: ThemeValues<Margin>

The Margins used by the theme.

Built-in themes provide a `group` value for the default Group template's Placeholder.padding.

### `Optional` numbers
: ThemeValues<number>

The numbers used by the theme, most commonly specifying stroke widths.

Built-in themes provide values for `group` and `selection` stroke widths.

### `Optional` points
: ThemeValues<Point>

The Points used by the theme.

### `Optional` rects
: ThemeValues<Rect>

The Rects used by the theme.

### `Optional` sizes
: ThemeValues<Size>

The Sizes used by the theme.

### `Optional` spots
: ThemeValues<Spot>

The Spots used by the theme.

### `Optional` targetPropertyMap
: Map<string, string>

A map of GraphObject target properties to Theme objects. This determines where a lookup will occur for a given property. For example, one might map Shape.fill to the colors object via "fill" -> "colors".

If not defined, or a target property is missing, some sensible defaults are provided.

Copyright © 1998-2024 by Northwoods Software Corporation.