SpreadJS 13
GC.Spread.Sheets.Shapes Namespace / ConnectorShape type / getFormula Method
The path which can accept a formula string, it could be one of "x", "y", "width", "height", "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency".
In This Topic
    getFormula Method
    In This Topic
    Gets the formula string from the shape by the path.
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.ConnectorShape(worksheet, name, connectorType, beginX, beginY, endX, endY);
    var value; // Type: string
    value = instance.getFormula(path);
    function getFormula( 
       path : string
    ) : string;

    Parameters

    path
    The path which can accept a formula string, it could be one of "x", "y", "width", "height", "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency".

    Return Value

    Returns the formula string from the shape by the path.
    Example
    sheet.name("Sheet1");
    sheet.setValue(0, 1, "red");
    var myConnector = sheet.shapes.addConnector("myConnector", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 50, 50, 200, 500);
    myConnector.setFormula("style.line.color", "=Sheet1!B1");
    myConnector.getFormula("style.line.color");//returns "=Sheet1!B1"
    See Also