InetSoft Product Information: Chart Reference

Looking for charting tools? InetSoft provides both free and commercial chart tools. View a demo and try them out for free.

The orange Start Free button takes you to a completely free service, no credit card required. No software to install, just upload your spreadsheet or connect to popular cloud sources.

Style Scope has enterprise security and data mashup for less than Power BI. Install on premise, at any cloud service, or use InetSoft's turnkey solution.

demo
Read how InetSoft saves money and resources with deployment flexibility.

TriCoord.setScale(scale)

Specifies the scale to use for all three axes. This can also be specified as an argument to the constructor.

Parameter

scale
 a Scale object

Example (Report or Viewsheet)

importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.coord)
var arr = [["Quantity","Total","Returns"], [50,50,100],[75,100,25],[100,100,0]]; dataset = new DefaultDataSet(arr); graph = new EGraph(); var elem = new PointElement(); var qscale = new LinearScale("Quantity"); qscale.setMin(0); qscale.setMax(200); var spec = new AxisSpec(); spec.setGridStyle(GraphConstants.DOT_LINE); spec.setGridColor(java.awt.Color.red); qscale.setAxisSpec(spec); var coord = new TriCoord(); coord.setScale(qscale); elem.addDim("Quantity"); elem.addDim("Total"); elem.addVar("Returns"); graph.addElement(elem); graph.setScale("Quantity", qscale); graph.setScale("Total", qscale); graph.setScale("Returns", qscale); graph.setCoordinate(coord);

FacetCoord

The FacetCoord object contains a set of inner and outer coordinates on which multidimensional data can be represented as nested charts. To create a FacetCoord object, call the FacetCoord constructor:

var rect = new FacetCoord(outerCoord,innerCoord);

You can pass a pair of RectCoord objects (e.g., 'outerCoord', 'innerCoord', etc.) to the constructor, or specify these later using the FacetCoord.setInnerCoordinates(coord) and FacetCoord.setOuterCoordinate(coord) properties.

Example (Report or Viewsheet)

importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.coord)

var arr = [["State", "City", "Product", "Quantity"],
           ["NJ", "Piscataway", "P1", 200],
           ["NJ", "Edison", "P2", 100],
           ["NY", "NYC", "P1", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("City", "Quantity");
var state = new CategoricalScale("State");
var city = new CategoricalScale("City");
var product = new CategoricalScale("Product");
var quantity = new LinearScale("Quantity");
var inner = new RectCoord(city, quantity);
var outer = new RectCoord(state, product);
var coord = new FacetCoord(outer,inner);
graph.setCoordinate(coord);
graph.addElement(elem);

FacetCoord.setInnerCoordinates(coord)

Specifies a RectCoord object, or array of RectCoord objects, to use for the inner coordinates of the facet graph. If an array is specified, each inner coordinate set is plotted independently. The 'innerCoordinates' property can also be specified as an argument to the constructor.

Parameter

coord
 Array of RectCoord objects
Example (Report or Viewsheet)
importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.coord)
 
var arr = [["State", "City", "Product", "Quantity"],
           ["NJ", "Piscataway", "P1", 200],
           ["NJ", "Edison", "P2", 100],
           ["NY", "NYC", "P1", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("City", "Quantity");
var state = new CategoricalScale("State");
var city = new CategoricalScale("City");
var product = new CategoricalScale("Product");
var quantity = new LinearScale("Quantity");
var inner = new RectCoord(city, quantity);
var outer = new RectCoord(state, product);
var coord = new FacetCoord();
coord.setInnerCoordinates([inner]);
coord.setOuterCoordinate(outer);
graph.setCoordinate(coord);
graph.addElement(elem);

FacetCoord.setOuterCoordinate(coord)

Specifies the rectangular coordinate set to use for the outer coordinates of the facet graph. The RectCoord object used for outer coordinates generally has categorical scales on both axes. The 'outerCoordinate' can also be specified as an argument to the constructor.

Parameter

coord
 a RectCoord object

Example (Report or Viewsheet)

importPackage(inetsoft.graph)
importPackage(inetsoft.graph.data)
importPackage(inetsoft.graph.scale)
importPackage(inetsoft.graph.aesthetic)
importPackage(inetsoft.graph.element)
importPackage(inetsoft.graph.coord)
 
var arr = [["State", "City", "Product", "Quantity"],
           ["NJ", "Piscataway", "P1", 200],
           ["NJ", "Edison", "P2", 100],
           ["NY", "NYC", "P1", 300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("City", "Quantity");
var state = new CategoricalScale("State");
var city = new CategoricalScale("City");
var product = new CategoricalScale("Product");
var quantity = new LinearScale("Quantity");
var inner = new RectCoord(city, quantity);
var outer = new RectCoord(state, product);
var coord = new FacetCoord();
coord.setInnerCoordinates([inner]);
coord.setOuterCoordinate(outer);
graph.setCoordinate(coord);
graph.addElement(elem);

FacetCoord.setVertical(boolean)

Specifies whether the inner coordinates are arranged vertically or horizontally.

Parameter

Boolean
 true: stack vertically (default)
 false: stack horizontally
Read why choosing InetSoft's cloud-flexible BI provides advantages over other BI options.