CR.6.12 TimeScale
The TimeScale object contains a time scale, i.e., a scale that linearly maps date and time data values to physical attributes. To create a TimeScale object, call the TimeScale constructor with the fields for which the scale should be generated.
var qscale = new TimeScale('Date');
You can pass the names of the fields (e.g., 'Date') for which the scale should be generated to the constructor, or specify these later using the inherited Scale.setFields(field) property.
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);

Full Name
inetsoft.graph.scale.TimeScale
TimeScale: setIncrement, setMax, setMin, setType
Inherits from
See Also
DataSet, to use a Data Block or query as the dataset source.
| << PowerScale.setExponent(value) | © 1996-2013 InetSoft Technology Corporation (v11.4) | TimeScale.setIncrement(value) >> |