Matrix Component Tags

Use the following tags to define a matrix component for a stamp portlet.

Tag Example Description
matrix

matrix {

position {...

size { ...

click-actions { ...

measure-column label =" "

group label="MTD"

column type= "time-series" { ...

column type= "time-series" { ...

column type= "time-series" { ...

column type= "time-series" { ...

end-group

}

Defines the block for a matrix component. The block and possible attributes:

matrix {

<position>

<size>

<style>

<click actions (optional)>

<measure-column>

<column>

<group>

<end-group>

}

A matrix component automatically uses all measures selected by the user. Whether it shows categories is determined by the measure-categories flag—see Stamp Template Tags.

Any column can be assigned an ID, which should be a string unique to that column.

measure-column measure-column label=" "

Required attribute—the column that lists the measure:

measure-column

Optional attributes:

measure-column label="<label for the measure column>" id="<id for the measure column>" {

width <integer pixel width for column>

}

column

column type="time-series" {

label " "

display-type "alert"

shape "triangle"

time-series {

range "mtd"

variation "c"

}

colors {

macro "ui_color_red"

macro "ui_color_grey"

macro "ui_color_green"

}

threshold -5

threshold 5

}

Other matrix columns can be added. The type options are:

  • time-series
  • comparison
  • cross

The general structure for a matrix column definition is:

column type="<type>" id="<id>" {

aux-measure "<name>"

label "<label for this column>"

display-type "<type of indicator>"

width <integer pixels>

shape "<circle, square, or triangle>"

justification "<left, right, or center>"

colors {

< lines describing colors>

}

threshold <first threshold>

threshold <second threshold>

...

}

Details can be found in the following table entries.

time-series

column type="time-series" {

label "{MMM}-{YYYY}"

display-type "text"

time-series {

range "mtd"

variation "c"

}

Defines the matrix column as a basic time series column.

range can be:

  • ytdtd (year to date)
  • ytd (year to complete month)
  • qtd (quarter to date)
  • mtd (month to date)
  • wtd (week to date)
  • cy (complete year)
  • cq (complete quarter)
  • cm (complete month)
  • cw (complete week)
  • cd (complete day)
  • rm12 (rolling 12 months, also known as rolling year by month)
  • y (partial year)
  • fm (future months)
  • qv (a time range determined by the Time Range QuickView)

variation can be:

  • c (current)
  • p (previous)
  • py (previous year)
  • cvp (current versus previous)
  • cvpy (current versus previous year)
  • cvp-pct (current versus previous percent)
  • cvpy-pct (current versus previous year percent)
absolute-time-series

column type="time-series" {

label "{MMM}-{YYYY}"

display-type "text"

absolute-time-series {

period "q"

period-number 1

offset-period "y"

offset-number -2

}

...

}

Defines the matrix column as an advanced time series column that uses the specified time range and offset values.

relative-time-series

column type="time-series" {

label "{MMM}-{YYYY}"

display-type "text"

relative-time-series {

period "y"

number-of-periods 1

offset-period "y"

offset-number -2

}

...

}

Defines the matrix column as an advanced time series column that uses the specified time range and offset values.

to-date-time-series

column type="time-series" {

label "{MMM}-{YYYY}"

display-type "text"

to-date-time-series {

period "y"

to-period "d"

offset-period "y"

offset-number -2

}

...

}

Defines the matrix column as an advanced time series column that uses the specified time range and offset values.

comparison-time-series

value "Shipped Orders" {

comparison-time-series {

from {

relative-time-series {

number-of-periods 1

period "m"

offset-period "m"

offset-number -1

}

}

to {

relative-time-series {

number-of-periods 1

period "m"

offset-period "m"

offset-number 0

}

}

}

A value attribute that defines the measure value as a comparison-time series column.

A comparison-time-series takes two other (non-comparison) time series as its arguments and calculates the difference between them.

NOTE: Typically, the from and to time series are the same type, but that is not a requirement.

type

column type="comparison" {

comparison-current "nnn"

comparison-previous "bbb"

}

Defines the matrix column as a comparison column. Use these attributes:

  • comparison-current "<ID of column to use as current>"
  • comparison-previous "<ID of column to use as previous>"
  • use-percent-comparison format="<optional string to format the percent>" [optional, include this line to make it a percent column]
type

column type="cross" {

dimension "Review Year" {

date-rollup-span "ytd"

date-rollup-period "q"

}

}

Defines the matrix column as a cross column.

date-rollup-span can be:

  • all (all)
  • y (full year)
  • ytd (year to date)
  • ytcm (year to complete month)
  • m ( month)
  • w (week)
  • rm12 (rolling 12 months)
  • rd7 (rolling 7 days)

date-rollup-period can be:

  • y (year)
  • q (quarter)
  • m (month)
  • d (day)

Optionally, you can add a label-format "<date format string>" that matches date formatting within DivePort.

group

end-group

group label="MTD"

column ...

column ...

...

end-group

Defines a labeled grouping of measures in the stamp.
General Column Attributes for a Matrix Column:
id id="mymeasure"

Assigns an ID to a column. Any column can be assigned an ID. This attribute is optional.

Column IDs are used to reference those columns in other, comparison-type columns. See the type="comparison" attribute.

aux-measure aux-measure "Avg LOS"

Names an auxiliary measure to use for this column. This attribute is optional. If omitted, an ordinary measure value is used.

NOTE: If aux-measure is used in a stamp template and a measure is specified that lacks that auxiliary measure in the factory configuration, the values for the auxiliary measure are all null (--) in the portal.

label label "Items to watch" Provides a label for this column. This attribute is optional.
display-type display-type "vertical-plusminus"

Names the indicator type. Options are:

  • horizontal-bullet
  • plusminus
  • vertical-plusminus
  • vertical-slider
  • racetrack
  • alert
  • rectangle
  • slope
  • slider
  • slider-light
  • text
width width 100 Specifies the width for the column in pixels. Must be an integer number. This attribute is optional.
wrap-text wrap-text hanging-indent=false

Controls the overflow behavior on text columns. The wrap-text tag is optional. It has an optional attribute, hanging-indent=true, which defaults to false if omitted.

For example:

measures {

...

column "$(MEASURE_1)" { //wrap text with hanging indent

...

width 100

wrap-text hanging-indent=true

}

column "$(MEASURE_2)" { //wrap text without hanging indent

...

width 100

wrap-text

}

column "$(MEASURE_3)" { //ellipsis truncation (default when width is set)

...

width 100

}

column "$(MEASURE_4)" { //automatic column sizing (no truncation)

... //no width set

}

}

shape shape "triangle"

Specifies the indicator shape for display type alert. Options are:

  • circle
  • square
  • triangle
justification justification "center"

Defines the justification for a text indicator. Options are:

  • left
  • right
  • center
colors

colors {

macro "ui_color_red"

macro " ui_color_green"

}

 

colors {

rgb 0 173 62

rgb 253 181 119

}

 

colors {

hex "F00"

hex "0F0"

}

 

colors {

hex "#fa3b1d"

hex "#2bb32e"

}

Specifies any number of lines describing colors, in the order in which they are to be used. The options to define color can be mixed and matched.

CSS Color Syntax to use
"#XXX" hex "XXX"
"#XXXXXX" hex "XXXXXX"
"skin:X" skin "X"
value of macro $(MACRO "X") as evaluated at render time macro "X"

"rgb(#,#,#)"

[0-255]

rgb # # #

"rgba(#,#,#,#)"

[last number, alpha, should be 0-1]

rgba # # # #
threshold

threshold -5

threshold 5

List of thresholds. This attribute is optional.

TIP: You cannot mix-and-match threshold types: if one threshold is a constant (number), they all must be constants; if one is a macro string, they must all be macro strings.

See Stamp Component Tags for attributes common to all the component types used in a stamp.