CR.6.9  LinearScale

The LinearScale object contains a linear scale, i.e., a scale that linearly maps numerical values to physical attributes. To create a LinearScale object, call the LinearScale constructor.

var qscale = new LinearScale('Last Year','This Year');

You can pass the names of the fields (e.g., 'Last Year', 'This Year') 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)

dataset = [["State","Quantity"], ["NJ",200], ["NY",300]];

graph = new EGraph();

var qscale = new LinearScale();

qscale.setFields(["Quantity"]);

var elem = new IntervalElement("State", "Quantity")

graph.setScale("Quantity", qscale);

graph.addElement(elem);

Full Name

inetsoft.graph.scale.LinearScale

See Also

DataSet, to use a Data Block or query as the dataset source.

LinearScale: setIncrement, setMax, setMin, setMinorIncrement, setReversed, setScaleRange

<< Scale.setSharedRange(boolean) © 1996-2013 InetSoft Technology Corporation (v11.5) LinearScale.setIncrement(value) >>