CR.6.13 CategoricalScale
The CategoricalScale object contains a nominal scale, i.e., a scale that logically maps nominal values to physical attributes. To create a CategoricalScale object, call the CategoricalScale constructor with the fields for which the scale should be generated.
var qscale = new CategoricalScale('State');
You can pass the names of the fields (e.g., 'State') 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 elem = new IntervalElement("State", "Quantity");
var sscale = new CategoricalScale("State");
var qscale = new LinearScale("Quantity");
var coord = new RectCoord(sscale, qscale);
coord.transpose();
graph.setCoordinate(coord);
graph.addElement(elem);
Full Name
inetsoft.graph.scale.CategoricalScale
CategoricalScale: setValues, setFill
Inherits from
See Also
DataSet, to use a Data Block or query as the dataset source.
| << TimeScale.setType(type) | © 1996-2013 InetSoft Technology Corporation (v11.5) | CategoricalScale.setFill(Boolean) >> |