Java Graph

Below are some examples of graph charts generated by InetSoft's Java graph charting engine. And following is documentation on using InetSoft's JavaScript-like API for programmatically generating charts. Alternatively use InetSoft's drag-and-drop chart designer.

Java Graph screenshot
Java Graph Chart Example
Java Graph Sample
 

Documentation

LegendSpec.setBackground(value)

Specifies the legend background color.

Parameter
 value
 a java.awt.Color 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.setBackground(java.awt.Color(0xff00ff));
 frame.setLegendSpec(spec);
 elem.setColorFrame(frame);
 graph.addElement(elem);
top ranked BI
Read how InetSoft was rated #1 for user adoption in G2 Crowd's user survey-based index.

LegendSpec.setBorder(value)

Specifies the legend border style.

Parameter
 value
 a GLine 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.setBorder(GraphConstants.DASH_LINE);
 frame.setLegendSpec(spec);
 elem.setColorFrame(frame);
 graph.addElement(elem);
view demo icon
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.

LegendSpec.setBorderColor(value)

Specifies the legend border color.

Parameters
 value
 a java.awt.Color 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.setBorderColor(java.awt.Color(0xff00ff));
 frame.setLegendSpec(spec);
 elem.setColorFrame(frame);
 graph.addElement(elem);
Previous: Dashboard JavaScript