InetSoft Product Information: Graph Programs

Looking for a graph program? InetSoft offers both free and commercial graph programs. View a demo and try them out for free.

Visualize Free is a free business graph application. No software to install, just upload your spreadsheet.

Style Scope Agile is a free interactive graphing tool that you can download and use for your departmental graphing and dashboard needs.

BI Demo
Register
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

TimeScale.setMin(value)

Specifies the earliest date on the scale.

Parameter

value
 a Date 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 date1 = new Date();
var date2 = new Date();
var minDate = new Date();
date1.setFullYear(2108,0,1);
date2.setFullYear(2109,0,1);
minDate.setFullYear(2005,0,1);
var arr = [["Date", "Quantity"], [date1,200], [date2,300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var elem = new IntervalElement("Date","Quantity")
var tscale = new TimeScale("Date");
tscale.setMin(minDate);
graph.setScale("Date", tscale);
graph.addElement(elem);

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.

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","Quantity"], ["NJ",200], ["NY",300]];
dataset = new DefaultDataSet(arr);
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);

Specifies the maximum value of the scale.

Parameter

value
 Number specifying the maximum scale value
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", "Quantity"], ["NJ",200], ["NY",300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var qscale = new LinearScale("Quantity");
var elem = new IntervalElement("State", "Quantity")
qscale.setMin(150);
qscale.setMax(450);
graph.setScale("Quantity", qscale);
graph.addElement(elem);

CategoricalScale.setValues(value)

Specifies the categorical values in the scale, and their order.

Parameter

value
 Array of String

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", "Quantity"], ["NJ", 200], ["NY", 300]];
dataset = new DefaultDataSet(arr);
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);
sscale.setValues(["NY","NJ"]);
coord.transpose();
graph.setCoordinate(coord);
graph.addElement(elem);

ScaleRange

The ScaleRange object contains the calculation strategy for finding the scale range.

ScaleRange.setAbsoluteValue(boolean)

Specifies whether negative quantities should be represented against the positive axis or against the negative axis (default).

Parameter

Boolean
 true: show neg values on pos axis
 false: show neg values on neg axis

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", "Quantity"], ["NJ",200], ["NY",-300]];
dataset = new DefaultDataSet(arr);
graph = new EGraph();
var qscale = new LinearScale("Quantity");
var elem = new IntervalElement("State", "Quantity");
var frame = new DefaultTextFrame();
frame.setField("Quantity")
elem.setTextFrame(frame)
var range = new LinearRange();
range.setAbsoluteValue(true);
qscale.setScaleRange(range);
graph.setScale("Quantity", qscale);
graph.addElement(elem);

StackRange

The StackRange object computes the range by “stacking” the data values. To create a StackRange object, call the StackRange constructor.

var
 range = new StackRange();

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", "Quantity"], ["NJ",200], ["NY",300]];
data = new DefaultDataSet(arr);
graph = new EGraph();
var qscale = new LinearScale("Quantity");
var elem = new IntervalElement("State", "Quantity")
qscale.setScaleRange(new StackRange());  // adds 200+300
graph.setScale("Quantity", qscale);
graph.addElement(elem);
Previous: Data Graphing