Scale.setScaleOption(value)
Specifies a scaling option for the default scaling. The Scale.TICKS and Scale.ZERO options determine the maximum and minimum values that are used to calculate the scale range.
The Scale.TICKS option uses the maximum and minimum tick values (i.e., rounded numbers) rather than the maximum and minimum data values. The Scale.ZERO option uses zero as the minimum rather than the minimum data value (if positive). To combine multiple options, use the pipe (“or”) operator:
qscale.setScaleOption(Scale.ZERO | Scale.TICKS);
Parameter
value Scale.RAW (no modification)
Scale.NO_NULL (remove NULL-data gaps in scale)
Scale.TICKS (use ticks in scale range calculation)
Scale.ZERO (use zero in scale range)
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 elem = new IntervalElement("State", "Quantity");
var sscale = new CategoricalScale("State");
var qscale = new LinearScale("Quantity");
var coord = new RectCoord(sscale,qscale);
qscale.setScaleOption(Scale.ZERO);
graph.setCoordinate(coord);
graph.addElement(elem);
See Also
DataSet, to use a Data Block or query as the dataset source.
| << Scale.setFields(field) | © 1996-2013 InetSoft Technology Corporation (v11.4) | Scale.setSharedRange(boolean) >> |