SpreadJS Documentation
displayDateAxis Method
Whether to display the date axis.
Gets or sets a value that indicates whether to display the date axis.
Syntax
var instance = new GcSpread.Sheets.Sparkline(row, column, dataReference, dataOrientation, type, setting);
var returnValue; // Type: boolean
returnValue = instance.displayDateAxis(value);
function displayDateAxis( 
   value : boolean
) : boolean;

Parameters

value
Whether to display the date axis.

Return Value

true if the date axis is displayed; otherwise, false.
Example
This example uses the vertical data and the date range to create the sparkline.
var setting = new GcSpread.Sheets.SparklineSetting();
setting.showMarkers(true);
setting.displayXAxis = true;

activeSheet.isPaintSuspended(true);
activeSheet.setValue(1, 0, 10);
activeSheet.setValue(2, 0, 0);
activeSheet.setValue(3, 0, -3);
activeSheet.setValue(4, 0, -5);
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(0, 1, 2);
activeSheet.setValue(0, 2, 4);
activeSheet.setValue(0, 3, 8);
activeSheet.setValue(0, 4, 6);
activeSheet.setValue(0, 5, new Date(2014, 1, 1));
activeSheet.setValue(1, 5, new Date(2014, 9, 1));
activeSheet.setValue(2, 5, new Date(2014, 7, 1));
activeSheet.setValue(3, 5, new Date(2014, 5, 1));
activeSheet.setValue(4, 5, new Date(2014, 3, 1));
var sparkline = activeSheet.setSparkline(5, 0, new GcSpread.Sheets.Range(0, 0, 5, 5), GcSpread.Sheets.DataOrientation.Horizontal, GcSpread.Sheets.SparklineType.line, setting, new GcSpread.Sheets.Range(0, 5, 5, 1), GcSpread.Sheets.DataOrientation.Vertical);
sparkline.dataOrientation(GcSpread.Sheets.DataOrientation.Vertical);
sparkline.displayDateAxis(true); 
activeSheet.isPaintSuspended(false);

activeSheet.addSpan(5, 0, 4, 3, null);
See Also

Reference

Sparkline class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.