TimeScale.setMax(value)
Specifies the latest date on the scale.
Parameter
value a Date object
Note: Script that modifies 'graph' should be placed at the element level. See Adding Element-Level Script in Report Scripting and Adding Component Script in Dashboard Scripting for more information.
Example (Report or Viewsheet)
var date1 = new Date();
var date2 = new Date();
var maxDate = new Date();
date1.setFullYear(2008,0,1);
date2.setFullYear(2009,0,1);
maxDate.setFullYear(2011,0,1);
dataset = [["Date", "Quantity"], [date1,200], [date2,300]];
graph = new EGraph();
var elem = new IntervalElement("Date","Quantity")
var tscale = new TimeScale();
tscale.setFields(["Date"]);
tscale.setMax(maxDate);
graph.setScale("Date", tscale);
graph.addElement(elem);

If you set the maximum scale value smaller than the largest data value (so as to crop the data), you should also set elem.setInPlot(false). Otherwise, the chart will force the data to appear in its entirety, resulting in a partially unlabeled axis.
Inherits from
See Also
DataSet, to use a Data Block or query as the dataset source.
| << TimeScale.setIncrement(value) | © 1996-2013 InetSoft Technology Corporation (v11.4) | TimeScale.setMin(value) >> |