In addition to the standard
roles, such as Time, X, or Category, you can add the following roles
by clicking
Add Role on the
Role
Definitions tab. The roles that are available depend
on the type of graph element.
-
The Group role specifies a data
column that is used to group the data. The graph elements for each
unique group value are automatically distinguished by different visual
attributes, such as color, line style, and so on. The Group role can
be a Category or a Datetime data type.
-
The Color role specifies a data
column that is used to color the data.
The following example
shows the heights of a group of students. A student’s gender
is specified for the Color role.
The Color role can
be any data type. In this example, the Color role is assigned a Category
data type.
Note: When you add the Color role
to a graph element in a data-driven lattice, the Measure data type
is not always available. The Measure data type is not available for
a bar chart, a waterfall chart, or a scatter plot.
In some graph elements,
such as a bar chart, the Group role also colors the graph based on
the values of the group variable. In those graph elements, the Color
role is used to color the data across a color gradient as shown in
the following example. In this case, the Color role must be a Measure
data type.
In
this example, the color gradient indicates the age range of the students.
-
The
Data Tip role specifies a data column that is used for data tips.
The Data Tip role must be numeric.