Angular Working with Sparklines

    The Infragistics Excel Library has support for adding sparklines to an Excel Worksheet. These can be used to show simple visual representations of data trends across a region of cells of data in your worksheet. For example, if you wanted to see your Excel data across a particular cell region visualized as a simple column or line sparkline chart, this feature can help you to achieve that.

    Demo

    Supported Sparklines

    The following is a list of the supported predefined sparkline types.

    • Line
    • Column
    • Stacked (Win/Loss)

    The following code demonstrates how to programmatically add Sparklines to a Worksheet via the sparklineGroups collection:

    var workbook: Workbook;
    var sheet1 = workbook.worksheets().add("Sparklines");
    var sheet2 = workbook.worksheets().add("Data");
    sheet1.sparklineGroups().add(SparklineType.Line, "Sparklines!A1:A1", "Data!A2:A11");
    sheet1.sparklineGroups().add(SparklineType.Column, "Sparklines!B1:B1", "Data!A2:A11");
    workbook.save(workbook, "Sparklines.xlsx");