Wiki

Clone wiki

Tree Visualization API / setStrokeWidth

Operator.js

connectTofillorderreshaperotatescalesetStrokeColorsetStrokeWidthslicesquarifystriptranslate

Function setStrokeWidth

Sets the stroke width (border) of edges or nodes shapes.

Function definition


Recommended stage: POSTLAYOUT

setStrokeWidth(scope, width, condition)          

Parameters


scope = (NODES|EDGES)
width = line width in Pixels
condition = optional condition if operator is to be carried out. If left out, it is assumed TRUE


Example


//Make the nodes border 7px width.
POSTLAYOUT:
{
reshape(DOT);
fill("#0000FF");
}


Sample Output Figure:

StrokeWidth

//Make the nodes border 5px width.
POSTLAYOUT:
{
reshape(DOT);
fill("#0000FF");
setStrokeWidth(NODES,5);
}


Sample Output Figure:

StrokeWidth2

Updated