SpreadJS Documentation
SparklineAxisMinMax Enumeration
An enumeration that specifies information about how the vertical axis minimum or maximum is computed for this sparkline group.
Members
MemberDescription
customSpecifies that the vertical axis minimum or maximum for each sparkline in this sparkline group is specified by the manualMin attribute or the manualMax attribute of the sparkline group.
groupSpecifies that the vertical axis minimum or maximum is shared across all sparklines in this sparkline group and is calculated automatically such that the data point with the minimum or maximum value can be displayed in the plot area.
individualSpecifies that the vertical axis minimum or maximum for each sparkline in this sparkline group is calculated automatically such that the data point with the minimum or maximum value can be displayed in the plot area.
Example
This example uses the SparklineAxisMinMax enumeration.
activeSheet.setValue(0, 0, "Data Range is A2-A9");
activeSheet.setValue(1, 0, 1);
activeSheet.setValue(2, 0, -2);
activeSheet.setValue(3, 0, -1);
activeSheet.setValue(4, 0, 6);
activeSheet.setValue(5, 0, 4);
activeSheet.setValue(6, 0, -4);
activeSheet.setValue(7, 0, 3);
activeSheet.setValue(8, 0, 8);

var data = new GcSpread.Sheets.Range(1, 0, 8, 1);
var setting = new GcSpread.Sheets.SparklineSetting();
setting.minAxisType = GcSpread.Sheets.SparklineAxisMinMax.custom;
setting.manualMin = -2;
setting.maxAxisType = GcSpread.Sheets.SparklineAxisMinMax.custom;
setting.manualMax = 10;
var s1=  activeSheet.setSparkline(11, 0, data, GcSpread.Sheets.DataOrientation.Vertical, GcSpread.Sheets.SparklineType.line, setting);
var s2 =activeSheet.setSparkline(11, 3, data, GcSpread.Sheets.DataOrientation.Vertical, GcSpread.Sheets.SparklineType.column, setting);
var s3=  activeSheet.setSparkline(11, 6, data, GcSpread.Sheets.DataOrientation.Vertical, GcSpread.Sheets.SparklineType.winloss, setting);
var group = activeSheet.groupSparkline([s1,s2,s3]);
Inheritance Hierarchy

Object
   GcSpread.Sheets.SparklineAxisMinMax

See Also

Reference

GcSpread.Sheets Namespace
Understanding Sparklines

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.