LegendSpec.setPartial(boolean)
Specifies whether legend items can be ignored when there is insufficient space.
Type
boolean true: ignore items exceeding legend size
false: compress items to fit (default)
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"], ["New Jersey",200],
["New
York",300], ["Pennsylvania",120],
["Connecticut",450],
["New Mexico",200],
["Colorado",300],
["Oregon",200],
["Kentucky",300],
["California",100],
["Alaska",350],
["Alabama",200], ["Kansas",500],
["Texas",200],
["North Dakota",300],
["Maryland",200],
["Delaware",250],
["Washington",200],
["Vermont",75]];
graph = new EGraph();
var elem = new IntervalElement("State", "Quantity");
var frame = new CategoricalColorFrame();
frame.setField("State");
var spec = new LegendSpec();
spec.setPartial(true);
frame.setLegendSpec(spec);
elem.setColorFrame(frame);
graph.addElement(elem);

Drag the Chart handles to a make the chart smaller. Note how the contents of the legend are abridged.
See Also
DataSet, to use a Data Block or query as the dataset source.
| << LegendSpec.setBorderColor(value) | © 1996-2013 InetSoft Technology Corporation (v11.4) | LegendSpec.setPosition(value) >> |