ShapesOptions
Options for a shape library, for use with a Surface or Paper component.
| Name | Type | Description |
|---|---|---|
| categoryParameter? | string | The property to use to map an object's category (ie which shape set to use). Defaults to "category". |
| defaultColor? | string | Optional default for text color. If not provided, text is set to #000000. |
| defaultFillColor? | string | Optional default for fill color. If not provided, fill is set to #FFFFFF. |
| defaultOutlineColor? | string | Optional default for outline color. If not provided, outline is set to #000000. |
| font? | FontSpec | Optional spec for font size/style to apply to all shapes. Shapes that have their own font spec will override this. |
| labelAttribute? | string | The attribute containing each vertex's label. Defaults to 'label' |
| labelBackground? | boolean | LabelBackgroundOptions | Options for label background. Use for defaults, or supply your own values (which will be merged on top of the defaults) |
| labelFillRatio? | number | How much of the width of a shape a multiline label will take up before wrapping. Defaults to 0.8. You can set this to a number greater than 1, if you like, but that will allow the label to overflow. |
| labelPosition? | LabelPosition | Position for labels. Defaults to "center". |
| library? | ShapeLibrary<ObjectData> | The shape library to use. You must provide either this or . |
| multilineLabels? | boolean | Defaults to true - labels are split across multiple lines to fit inside their shape. Set this to false if you want labels to always be a single line. |
| sets? | ShapeSet | Array<ShapeSet> | List of shape sets - or a single set - to support. Provide this or . If you provide and this, will take precedence. |
| showLabels? | boolean | Whether or not to show labels. Defaults to true. |
| strokeWidth? | number | Stroke width to use when drawing svg shapes. |
| tagName? | string | The name of the tag to make available to node/group renderers. Defaults to . Only used with certain advanced usages of Vanilla VisuallyJs. If you're using an integration there's a dedicated shape component you will use instead. |
| typeParameter? | string | The property to use to map an object's type. Defaults to "type". |