SpreadJS Documentation
groupSparkline Method
The sparklines to group.
Groups the sparklines.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: SparklineGroup
value = instance.groupSparkline(sparklines);
function groupSparkline( 
   sparklines : Array
) : SparklineGroup;

Parameters

sparklines
The sparklines to group.

Return Value

The sparkline group.
Example
This example groups a sparkline.
sheet.setValue(0, 0, "Data Range is A2-A9");
sheet.setValue(1, 0, 1);
sheet.setValue(2, 0, -2);
sheet.setValue(3, 0, -1);
sheet.setValue(4, 0, 6);
sheet.setValue(5, 0, 4);
sheet.setValue(6, 0, -4);
sheet.setValue(7, 0, 3);
sheet.setValue(8, 0, 8);
var data = new GcSpread.Sheets.Range(1, 0, 8, 1);
var setting = new GcSpread.Sheets.SparklineSetting();
var s1=  sheet.setSparkline(13, 0, data
        , GcSpread.Sheets.DataOrientation.Vertical
        , GcSpread.Sheets.SparklineType.line
        , setting
        );
var s2 =sheet.setSparkline(13, 3, data
        , GcSpread.Sheets.DataOrientation.Vertical
        , GcSpread.Sheets.SparklineType.column
        , setting
        );
var s3=  sheet.setSparkline(13, 6, data
        , GcSpread.Sheets.DataOrientation.Vertical
        , GcSpread.Sheets.SparklineType.winloss
        , setting
        );
var group = sheet.groupSparkline([s1,s2,s3]);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.