TIBCO Cloud™ Spotfire® User Guide

Axes in expressions

When creating custom expressions, you might need to refer to an axis from the visualization in the expression. Below is a list of the available axes for different visualization types. Some of the axes can be useful in OVER expressions, whereas others are only used when defining rules or reference lines.

The term axis, in this context, does not only refer to the X and Y axes, but is a general term for the mapping of data to a dimension represented in the visualization: coloring is controlled by the Color axis, marker shape by the Shape axis and so on.

The syntax when referring to axes in an expression is [Axis.Axis Name]. For example, if the Axis Name is "X", the expression should refer to [Axis.X]. Note that the actual names to use may be different in two similar looking visualizations. For example, in the cross table you would refer to Axis.Columns whereas in a heat map you would use Axis.X for similarly set up visualizations.

It does not make any sense to include the axis you are creating the expression for in an OVER expression. Instead, you would probably want to use the categorization on the X-axis or the Color axis when defining an OVER expression on the Y-axis.

Axes to use in OVER expressions and other expressions

Visualization Axis (property) it represents Axis name used in expression
Cross table Columns

Rows

Columns

Rows

Sparkline Rows

X-axis

Rows*

X

Calculated value Rows Rows*
Icon Rows Rows*
Bullet graph Rows Rows*
Bar chart Category axis

Color by

X

Color

Line chart X-axis

Color by

Line by

X

Color

Line

Combination chart X-axis

Color

X

Color

Pie chart Color by Color
Scatter plot X-axis

Y-axis

Color by

Marker by

Shape by

Label by

Line by

X

Y

Color

Marker

Shape

Label

Line

3D scatter plot X-axis

Y-axis

Z-axis

Color by

Marker by

Shape by

Label by

X

Y

Z

Color

Marker

Shape

Label

KPI chart Tile by

X-axis

Tile

X

Map chart - Feature layer Color by

Geometry by

Color

Geometry

Map chart - Marker layer X-axis

Y-axis

Color by

Marker by

Shape by

Label by

Line by

X

Y

Color

Marker

Shape

Label

Line

Treemap Hierarchy Hierarchy
Heat map X-axis

Y-axis

X

Y

Parallel coordinate plot Line by

Color by

Line

Color

Waterfall chart Color by

Category axis

Color

X

Trellis Columns

Rows

Pages

Panels

Columns

Rows

Pages

Panels

* The Rows axis in a graphical table can be used in OVER expressions in dynamic item columns included in that graphical table.

Example:
Sum([Sales]) OVER (AllPrevious([Axis.X]))

See Using OVER statement to reference data slices and Node navigation for more information about OVER expressions.

Axes to use in rules and reference lines only

When defining rules (for example, for coloring, icons or calculated values) or when setting up a reference line in a visualization, you will define an expression directly using the value on that very axis. (The way to refer to the axes is slightly different in those two contexts.)

Visualization Axis (property) it represents Axis name used in expression
Sparkline Y-axis Y
Calculated value Value Value
Icon Icon Icon
Bar chart Value axis Y
Scatter plot X-axis

Y-axis

X

Y

Line chart Y-axis Y
Combination chart Y-axis Y
Waterfall chart Y-axis Y
Examples in rules:
[Axis.Color]="West"
[Axis.Value]> 10000
Example in reference line:
Avg([Y])*10