DiagramItem.brush Property
See Also

Gets or sets an object specifying how to fill the interior of this item.

Namespace: MindFusion.Diagramming
Package: DiagramItem.js


JavaScript  Copy Code

get brush() {}
set brush(value) {}

 Property Value


A color string or an object literal specifying gradient.


This property can be set to a color string to specify solid fill:

JavaScript  Copy Code

node.brush = "white";

It also accepts objects that specify the type of brush and additional information:

JavaScript  Copy Code

node1.brush =
    { type: 'SolidBrush', color: '#e0e9e9' };
node2.brush =
    { type: 'LinearGradientBrush', color1: '#e0e9e9', color2: '#616a7f', angle: 90 };

 See Also