values and include the primitive types of point, cir-
cle, line, oval, rectangle, polygon, polar segment, and
labels. Scales are used for mapping data values to
their visual representations and are graphically repre-
sented by axes and legends. A scale is associated with
a coordinate system object and defines a transforma-
tion from the default layout canvas to a frame of type
twodcart or twodpolar (at this time).
In addition to a unique identifier, each object type
has predefined attributes, with conditions expressed
as constraints on these attributes. Constraints can
be of type equality (‘=’) or approximate equality
(‘˜’). Constraints enforcing visual organization fea-
tures (Kosak et al., 1994) such as non-overlap, align-
ment, or symmetry, can be applied to a set of graphi-
cal objects. These types of constraints are particularly
useful in specifying network diagrams (Ryall et al.,
1997). While such constraints can be specified in the
language, our current implementation only supports
constraints in the form of equalities.
All of the generic objects have a color attribute
and at least one location attribute, represented by a
coordinate. For 2-D objects, a Boolean fill attribute
defaults to true, indicating that the interior of that
object be filled in with the specified color. This at-
tribute also applies to line objects, which have start
and end widths. When widths are specified, lines are
rendered as four-sided polygons with rounded ends.
Each type of scale object has its own set of at-
tributes. A coordinate system object’s parent at-
tribute can reference another coordinate system object
or the canvas itself. The mapping from data values to
graphical values can be specified by conditions on its
origin and unit attributes. Alternatively, a condi-
tion can be applied to its map attribute in the form of
a user-defined mapping function that denotes both the
parent object and the scale. Thus, a twodcart object
whose parent is Canvas, origin is (5, 10), and unit
is (30, 40) can be defined by the mapping function:
Canvas.map(30x + 5, 40y + 10).
Axes are defined in terms of their origin, ll
(lower left) and ur (upper right) coordinates, and
tick marks. Legends can be used to graphically as-
sociate a color gradient with a range of data values by
assigning a color scale object to the scale attribute
and a coordinate to the location attribute. Discrete
colors can also be associated with data values, as in
the Minard Graph example, where tan represents “Ad-
vance” and black represents “Retreat.”
Attributes can also be defined by the user within
a make statement. For example, it is often helpful to
declare temporary variables for storing data retrieved
from a database. These user-defined attributes are ig-
nored when the specified visualization is rendered.
Another construct for an objspec is the type state-
ment. This is used for defining a new object type
that satisfies a set of conditions. These conditions
are either constraints on attribute properties or other
objspecs. An example of the former would be a con-
dition requiring that the color attribute for a new chart
type be “blue.” An example of the latter is to require
that a chart include a 2-D Cartesian coordinate frame
for use in rendering its display and that this frame con-
tain a set of lines and points corresponding to data re-
trieved from a database.
A third type of objspec is a set of objects, a set-
spec. This takes the form of either a query string or
a set of objspecs to be instantiated for each record re-
trieved by a query string. These two constructs are
often used in conjunction with one another to asso-
ciate data with generic graph objects. For example,
a setspec may define a query that retrieves two val-
ues, x and y, from a database table. A second setspec
can then specify a make command for rendering a set
of points located at the x and y values retrieved by
the query. Alternatively, the query can be contained
within the make statement itself, as shown in the code
for the scatter plots in Section 2.
It is often useful to associate a variable name
with an objspec so that it can be referenced
later. This is accomplished with the let state-
ment, which provides access to that variable within
the body of the statement. Because this construct
is commonly used in conjunction with a make or
type statement, two shorthand expressions have
been provided. The first of these is an abbre-
viated form of the let statement in which the
make clause is not explicitly stated, with: let
var:type with conditions in body corre-
sponding to let var = make var:type with
conditions in body. Similarly, the define
statement associates a new object definition with
a variable name, where: define var:type with
conditions in body expands to let var =
type var:type with conditions in body.
Figure 5 demonstrates the usage of the above ob-
jspec constructs for defining a new type of object
called a netplot. The code specifies the creation
of a set of circles, referred to as nodes, with radius
of 5, color of “black,” and center locations corre-
sponding to x and y values queried from a database
and mapped to a frame. (Data values were estimated
from a depiction of the ARPAnet circa 1971 avail-
able at http://www.cybergeography.org/atlas/
historical.html.) A set of red lines are also speci-
fied, with the endpoint locations of the lines equal to
the centers of the circles.
The output generated from this specification is
ICSOFT 2007 - International Conference on Software and Data Technologies
10