EGraph.getScale(field)

Returns a handle to the Scale object specified by the field name parameter. This is useful in cases where the scale was not explicitly assigned to a variable at creation time.

Parameters

field String representing field name

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)

Bind a bar-type chart to the sample 'All Sales' query, with 'Company' (top 5) on the X-axis, and Sum(Total) on the Y-axis. Add the following script:

var scale = graph.getScale("Sum(Total)");

scale.setMin(600000);

scale.setMax(1000000);

Example (Viewsheet)

Create a Viewsheet based on the 'Sales Explore' Worksheet. Bind a bar-type chart with 'Company' (top 5) on the X-axis, and Sum(Total) on the Y-axis. Add the following script:

var scale = graph.getScale("Sum(Total)");

scale.setMin(600000);

scale.setMax(1000000);

See Also

Changing Chart Scaling, for information on setting scales.

Chart Coordinates & Scaling, for available scales.

<< EGraph.getFormCount() © 1996-2013 InetSoft Technology Corporation (v11.4) EGraph.setLegendLayout(value) >>