InetSoft Product Information: Visualize Graph

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)
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 var arr = [["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]];
 dataset = new DefaultDataSet(arr);
 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);
demo
Read how InetSoft saves money and resources with deployment flexibility.

Drag the Chart handles to a make the chart smaller. Note how the contents of the legend are abridged.

Specifies the position of the legend's bottom-left corner (in pixels or proportion) for cases when “in place” layout is used. (Positive values specify distance from left/bottom. Negative values specify distance from right/top.)

Type
 value
 a subclass of java.awt.geom.Point2D
 e.g.,
 java.awt.Point for pixels
 java.awt.geom.Point2D.Double for proportion
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ",200], ["NY",300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new CategoricalColorFrame();
 frame.setField("State");
 var spec = new LegendSpec();
 spec.setPosition(java.awt.Point(50,245)); // in pixels
 frame.setLegendSpec(spec);
 elem.setColorFrame(frame);
 graph.setLegendLayout(GraphConstants.IN_PLACE);
 graph.addElement(elem);

LegendSpec.setPreferredSize(value)

Specifies the legend size (pixels) for cases when EGraph.setLegendLayout(value) is set to GraphConstants.IN_PLACE.

Parameter
 value
 a java.awt.Dimension object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ",200], ["NY",300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new CategoricalColorFrame();
 frame.setField("State");
 var spec = new LegendSpec();
 spec.setPosition(java.awt.Point(50,245)); // in pixels
 spec.setPreferredSize(java.awt.Dimension(100,40));
 frame.setLegendSpec(spec);
 elem.setColorFrame(frame);
 graph.setLegendLayout(GraphConstants.IN_PLACE);
 graph.addElement(elem);

LegendSpec.setTextFrame(frame)

Specifies the TextFrame containing a mapping between legend values and replacement text.

Parameter
 frame
 a TextFrame object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ",200], ["NY",300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var frame = new CategoricalColorFrame();
 var tf = new DefaultTextFrame();
 frame.setField("State");
 tf.setText('NJ','New Jersey');
 tf.setText('NY','New York');
 var spec = new LegendSpec();
 spec.setTextFrame(tf);
 frame.setLegendSpec(spec);
 elem.colorFrame = frame;
 graph.addElement(elem);

InetSoft Viewpoint

Visualization software is the perfect tool for sifting through multi-dimensional data to spot trends and outliers or slice and dice data with simple point-and-click methods. If you are looking for a way to visually explore and present data that standard office charting software cannot handle, Visualize Free is a great option. It’s also a good way for people to evaluate some of the capabilities of InetSoft’s commercial business intelligence software, before requiring the involvement of technical resources.

Read the top 10 reasons for selecting InetSoft as your BI partner.