Search results

StrokeStyleModel API in Vue Diagram API component

Interface for a class StrokeStyle

Properties

fill

string

Sets the fill color of a shape/path

gradient

GradientModel | LinearGradientModel | RadialGradientModel | DiagramGradientModel

Defines the gradient of a shape/path

opacity

number

Sets the opacity of a shape/path

strokeColor

string

Sets the stroke color of a shape/path

strokeDashArray

string

Defines the pattern of dashes and spaces to stroke the path/shape

<div id='diagram'></div>
 let nodes: NodeModel[] = [{  id: 'node', width: 100, height: 100, offsetX: 100, offsetY: 100,
style: { fill: 'red', strokeColor: 'blue', strokeWidth: 5,
strokeDashArray: '2 2', opacity: 0.6 } as ShapeStyleModel,
}];
let diagram: Diagram = new Diagram({
...
  nodes: nodes,
...
});
diagram.appendTo('#diagram');

strokeWidth

number

Defines the stroke width of the path/shape