Defines the style of shape/path
boolean
Enables/disables the bold style of text
Defaults to false
string
Sets the font color of a text
Defaults to ‘black’
string
Sets the fill color of a shape/path
Defaults to ‘white’
string
Sets the font type of a text
Defaults to ‘Arial’
number
Defines the font size of a text
Defaults to 12
GradientModel
| LinearGradientModel
| RadialGradientModel
Defines the gradient of a shape/path
Defaults to null
boolean
Enables/disables the italic style of text
Defaults to false
number
Sets the opacity of a shape/path
Defaults to 1
string
Sets the stroke color of a shape/path
Defaults to ‘black’
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');
Defaults to ”
number
Defines the stroke width of the path/shape
Defaults to 1
string
Defines how the text should be aligned within its bounds
Defaults to ‘Center’
string
Defines how the text should be decorated. For example, with underline/over line
Defaults to ‘None’
string
Defines how to handle the text when it exceeds the given size.
Defaults to ‘Wrap’
string
Defines how the text should be wrapped, when the text size exceeds some specific bounds
Defaults to ‘WrapWithOverflow’
string
Defines how the white space and new line characters have to be handled
Defaults to ‘CollapseSpace’