SpreadJS 13
GC.Spread.Sheets.Charts Namespace / ChartCollection type / all Method
In This Topic
    all Method
    In This Topic
    Gets all of the charts in the sheet.
    Syntax
    var instance = new GC.Spread.Sheets.Charts.ChartCollection(sheet);
    var value; // Type: any
    value = instance.all();
    function all() : any;
    Example
    var dataRange = "A1:D4";
    activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 180, dataRange);
    var dataRange2 = "A20:D24";
    activeSheet.charts.add('Chart2', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 220, 600, 180, dataRange2);
    var charts = activeSheet.charts.all();
    for (var i = 0; i < charts.length; i++) {
        alert("Name of chart " + i + " is:  " + charts[i].name())
    }
    See Also