SpreadJS Documentation
SparklineSetting class
Creates the sparkline settings.
Syntax
var instance = new GcSpread.Sheets.SparklineSetting(setting);
function SparklineSetting;
Example
This example creates a new set of sparkline settings using the SparklineSetting object.
var data = new GcSpread.Sheets.Range(1, 0, 8, 1);
var setting = new GcSpread.Sheets.SparklineSetting();
setting.showMarkers(true);
setting.lineWeight = 3;
setting.displayXAxis = true;
setting.showFirst(true);
setting.showLast(true);
setting.showLow(true);
setting.showHigh(true);
setting.showNegative(true);
setting.seriesColor('Text 2 1');
setting.firstMarkerColor('Text 2 3');
setting.negativeColor('Accent 2 1');
setting.markersColor('Accent 3 1');
setting.lowMarkerColor('Accent 4 1');
setting.highMarkerColor('Accent 6 1');
setting.lastMarkerColor('Accent 6 6');
setting.axisColor('Text 1 1');
sheet.addSpan(13, 0, 4, 3, null);
sheet.setSparkline(13, 0, data, GcSpread.Sheets.DataOrientation.Vertical, GcSpread.Sheets.SparklineType.line, setting);
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);
Inheritance Hierarchy

Object
   GcSpread.Sheets.SparklineSetting

Constructors
 NameDescription
public ConstructorSparklineSetting ConstructorCreates the sparkline settings.  
Top
Fields
 NameDescription
public FielddisplayEmptyCellsAsIndicates how to display the empty cells.  
public FielddisplayHiddenIndicates whether data in hidden cells is plotted for the sparklines in this sparkline group.  
public FielddisplayXAxisIndicates whether the horizontal axis is displayed for each sparkline in this sparkline group.  
public FieldgroupMaxValueGets the maximum value of the sparkline group.  
public FieldgroupMinValueGets the minimum value of the sparkline group.  
public FieldlineWeightIndicates the line weight for each sparkline in the sparkline group, where the line weight is measured in points. The weight must be greater than or equal to zero, and must be less than or equal to 3 (LineSeries only supports line weight values in the range of 0.0-3.0).  
public FieldmanualMaxIndicates the maximum for the vertical axis that is shared across all sparklines in this sparkline group. The axis is zero if maxAxisType does not equal custom.  
public FieldmanualMinIndicates the minimum for the vertical axis that is shared across all sparklines in this sparkline group. The axis is zero if minAxisType does not equal custom.  
public FieldmaxAxisTypeIndicates how the vertical axis maximum is calculated for the sparklines in this sparkline group.  
public FieldminAxisTypeIndicates how the vertical axis minimum is calculated for the sparklines in this sparkline group.  
public FieldrightToLeftIndicates whether each sparkline in the sparkline group is displayed in a right-to-left manner.  
Top
Methods
 NameDescription
public MethodaxisColorGets or sets the color of the axis.  
public MethodcloneClones sparkline settings.  
public MethodfirstMarkerColorGets or sets the color of the first data point for each sparkline in this sparkline group.  
public MethodhighMarkerColorGets or sets the color of the highest data point for each sparkline in this sparkline group.  
public MethodlastMarkerColorGets or sets the color of the last data point for each sparkline in this sparkline group.  
public MethodlowMarkerColorGets or sets the color of the lowest data point for each sparkline in this sparkline group.  
public MethodmarkersColorGets or sets a value that specifies the color of the data markers for each sparkline in this sparkline group.  
public MethodnegativeColorGets or sets a value that specifies the color of the negative data points for each sparkline in this sparkline group.  
public MethodseriesColorGets or sets a value that specifies the color for each sparkline in this sparkline group.  
public MethodshowFirstGets or sets a value that indicates whether the first data point is formatted differently for each sparkline in this sparkline group.  
public MethodshowHighGets or sets a value that specifies whether the data points with the highest value are formatted differently for each sparkline in this sparkline group.  
public MethodshowLastGets or sets a value that indicates whether the last data point is formatted differently for each sparkline in this sparkline group.  
public MethodshowLowGets or sets a value that specifies whether the data points with the lowest value are formatted differently for each sparkline in this sparkline group.  
public MethodshowMarkersGets or sets a value that specifies whether data markers are displayed for each sparkline in this sparkline group  
public MethodshowNegativeGets or sets a value that specifies whether the negative data points are formatted differently for each sparkline in this sparkline group.  
Top
See Also

Reference

GcSpread.Sheets Namespace
Understanding Sparklines

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.