Interface for a class StrokeStyle
string
Sets the fill color of a shape/path
GradientModel
| LinearGradientModel
| RadialGradientModel
| DiagramGradientModel
Defines the gradient of a shape/path
number
Sets the opacity of a shape/path
string
Sets the stroke color of a shape/path
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');
number
Defines the stroke width of the path/shape