SpreadJS 13
GC.Spread.Sheets.Shapes Namespace / ConnectorShape type / style Method
The connector shape style.
In This Topic
    style Method
    In This Topic
    Gets or sets the style of the connector shape.
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.ConnectorShape(worksheet, name, connectorType, beginX, beginY, endX, endY);
    var returnValue; // Type: any
    returnValue = instance.style(value);
    function style( 
       value : ShapeStyle
    ) : any;

    Parameters

    value
    The connector shape style.
    Example
    //This sample sets style for the connector shape.
    var shape = sheet.shapes.addConnector("Shape1", GC.Spread.Sheets.Shapes.ConnectorType.straight, 100, 60, 200, 160);
    var oldStyle = shape.style();
    oldStyle.line.color = "red";
    oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.dashDot;
    oldStyle.line.width = 5;
    oldStyle.line.capType = GC.Spread.Sheets.Shapes.LineCapStyle.square;
    oldStyle.line.joinType = GC.Spread.Sheets.Shapes.LineJoinStyle.miter;
    oldStyle.line.transparency = 0.5;
    oldStyle.line.beginArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.triangle;
    oldStyle.line.beginArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.narrow;
    oldStyle.line.beginArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.short;
    oldStyle.line.endArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.diamond;
    oldStyle.line.endArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.wide;
    oldStyle.line.endArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.long;
    shape.style(oldStyle);
    See Also