Chart Component Tags

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

Tag Example Description
chart

components {

chart type="stackedcolumn" {

dimension "Created Year"

value "$(MEASURE_1)"

position {

top 10

left 10

}

size {

width 520

height 480

}

}

}

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

chart type=<type of chart> {

<position>

<size>

<style>

<click actions (optional)>

}

 

type chart type="area"

Indicates the type of chart to include in the stamp. Options are:

  • arc
  • area
  • bar
  • box
  • chord
  • column
  • combination
  • donut
  • gantt
  • heatmap-calendar
  • horizontal-box
  • line
  • multitab-area
  • multitab-bar
  • multitab-column
  • multitab-heatmap
  • multitab-line
  • multitab-sparkline
  • multitab-spline
  • multitab-spline-area
  • multitab-stackedarea
  • multitab-stackedbar
  • multitab-stackedcolumn
  • pie
  • scatter
  • sparkcolumn
  • sparkline
  • sparkstackedcolumn

  • spline
  • spline-area
  • stackedarea
  • stackedbar
  • stackedcolumn
Other attributes that might be available, depending on the chart type:
additional-values

additional-values {

additional-value "$(MEASURE_2)" {

point-style "circle"

color "rgb(0,0,255)"

}

additional-value "$(MEASURE_3)" {

time-series {

range "ytdtd"

variation "c" }

}

Defines additional values for box plot charts. Options are settings for

  • point-style

  • label

  • color

  • hide|show-in-legend

  • time-series

  • auxiliary measure

always-include-zero always-include-zero false

Indicates if zeros display. Defaults to true. Only applies to column and bar charts.

NOTE: Use of this option is not recommended for a sparkcolumn chart. As in a normal column chart, having the chart not include zero is misleading because the lowest value visually appears to be a small fraction of the largest, when in fact it could be nearly equal to it, percentage-wise. In a sparkcolumn chart the misleading nature is even worse because there are no axes.

arc-chart-options

arc-chart-options {

arc-direction "down"

forward-label "Forward Label"

}

Available in Workbench 7.2(12) and later.

This tag contains three sub-tags that set options for arc charts. Options are:

  • arc-direction—Set the direction of arcs. Options are: up, down, left, and right.

  • forward-label—Set the label for forward arcs, which appear in the chart legend.

  • backward-label—Set the label for backward arcs, which appear in the chart legend.

box-level-dimension box-level-dimension "$(DIMENSION_2)"

Used to define box plots based on a dimension, value, and level. For example:

dimension "$(DIMENSION_1)"

value "$(MEASURE_1)"

box-level-dimension "$(DIMENSION_2)"

box-values

box-values {

min "$(MEASURE_1)"

low "$(MEASURE_2)"

mid "$(MEASURE_3)"

high "$(MEASURE_4)"

max "$(MEASURE_5)"

}

Used for the legacy format of defining a box plot with min, low, mid, high, and max attributes.
colors

colors {

macro "ui_color_red"

macro "ui_color_grey"

macro " ui_color_green"

}

 

colors {

rgb 246 117 33

}

 

colors {

skin "qual:1"

skin "qual:3"

skin "qual:5"

}

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 # # # #
custom-hover custom-hover "Hover text" Applies to some area, bar, calendar, combination, sankey, finance, line, scatter plot, pie, and statistic charts. Specifies a customized tooltip that opens when a user places the pointer on a data object.
end-value

end-value "1000" {

format "$#.0"

}

Available in Workbench 7.2(12) and later.

Defines the end value for a gantt chart. The format sub-tag can be used to set the format string for the values displayed on the axis.

filter filter "<filter expression>" context="summary"

Defines an expression for a filter and the context—use summary for a window-level filter or record for a dive-level filter.

Two functions are available:

mf_value refers to a Measure Factory measure, with options to include date roll up or a time series.

value_by_id can be used if value tags have an optional id attribute that is assigned a string. The filter function can use value_by_id("id_string") to refer to columns within the same stamp component. The context of the filter must be set to "summary" because measure factory columns only exist in the summary window.

heatmap-options

heatmap-options {

show-cell-values

binned-color-scale {

colors {

"rgb(255, 0, 0)"

"rgb(0, 255, 0)"

}

bins 10

}

}

Available in Workbench 7.2(12) and later.

This tag contains multiple sub-tags with options for heatmap charts. Options are:

  • show-cell-values—Flag to display cell values.

  • blank-cell-color—This tag sets the color of blank cells.

  • [option]-color-scale—This tag sets the type of color scale that is used. The options are:

    • gradient—The color scale displays along a continuous gradient.

    • binned—The color scale is separated into a defined number of color bins.

    • threshold—The color scale is divided into two sections representing values under and over a defined threshold value.

The color scale tag has the following sub-tags available:

  • colors—List of all colors to be used in the color scale. Gradient and binned color scales require at least two colors. Threshold color scales require one color per threshold.

    use-mid—Flag to specify that the midpoint of the color scale should be marked on the legend. This flag requires at least three listed colors.

  • threshold-value—This tag sets the threshold when using the threshold-color-scale tag.

  • bins—This tag sets the number of bins when using the binned-color-scale tag.

hide-nulls hide-nulls Hides null values on bar charts when present.
scatter-plot-options

scatter-plot-options {

point-size "3"

color-value "rgb(255, 0, 0)"

}

Available in Workbench 7.2(12) and later.

This tag contains multiple sub-tags with options for scatter charts. Options are:

  • point-size—This tag sets the radius of each point on the scatter chart.

  • color-value—Sets the color of the points.

  • vary-point-size—This tag contains settings for a dynamic point size.

The vary-point-size tag has multiple sub-tags that set the parameters for varying the point size. Options are:

  • point-size-value—Numeric column that sets the size of points on the scatter chart.

  • min-size—Optional column that sets the minimum point size.

  • max-size—Optional column that sets the maximum point size.

  • point-scale-min—Optional column that sets the radius in pixels for the minimum point size.

  • point-scale-max—Optional column that sets the radius in pixels for the maximum point size.

start-value start-value "0" {

format "$#.0"

}

Available in Workbench 7.2(12) and later.

Defines the start value for a gantt chart. The format sub-tag can be used to set the format string for the values displayed on the axis.

trellis-chart-options

trellis-chart-options {

subchart-type "bar"

}

Available in Workbench 7.2(12) and later.

This tag contains multiple sub-tags with options for trellis charts. Options are:

  • subchart-type—Sets the subchart type.

The subtitle-settings tag has multiple sub-tags. Options are:

  • color

  • font

x-value x-value "$(MEASURE_1)"

Available in Workbench 7.2(12) and later.

Defines the x axis value for a scatter chart.

y-value y-value "$(MEASURE_2)"

Available in Workbench 7.2(12) and later.

Defines the y axis value for a scatter chart.

The following tags are for use with the legend visible tag set to true.

NOTE: When using multiple legend options, all must be on the same line. For example:

legend visible=true location="bottom" width=300

Tag Example Description
legend visible

legend visible=false

Indicates whether to display the legend. Defaults to true.
alternate-color-sort alternate-color-sort

Available in Workbench 7.2(12) and later.

Flag to set colors based on the original dimension data rather than the current sort settings.

legend location

legend location="top"

legend location="right" width=100

Indicates where to place the legend. Options are:

  • left
  • right
  • top
  • bottom
legend width

legend width=50

legend visible=true location="left" width=100

Indicates the integer pixel width for the legend.
legend show-percent legend show-percent=true

Available in Workbench 7.2(12) and later.

Indicates whether to show percentage values. Only available for donut and pie charts.

log-scale log-scale Flag to use a log scale instead of the default linear scale.

num-items

num-items 10 Indicates the integer number of items to which to limit the chart.
scale-format

scale-format "0"

Sets the format of the scale values.

Value Description
0 Rounds the value up or down to a whole number.
0.0 Rounds the value up or down to the hundredths place.
#,##0,.0k Abbreviates the number to the thousands with one decimal place and includes a k to indicate thousand.
#,##0,,.m Abbreviates the number to the millions and includes an m to designate million.

You can enter a customized scale_format using the following guidelines:

0 is a placeholder for a digit that always appears. If the format is 0.00 and the value is .3, 0.30 displays.

# is a placeholder for a digit that only appears if the value has a digit in that position. If the format is ##.## and the value is 3.3, 3.3 displays.

scale-max

scale-max 100

scale-max "$(MACRO $(CONCAT $(MEASURE_1) _max))"

Defines the scale maximum with a number or macro.
scale-min

scale-min 100

scale-min "$(MACRO $(CONCAT $(MEASURE_1) _min))"

Defines the scale minimum with a number or macro.
show-others show-others When used with num-items, groups the rest of the items into an others group.
show-data-labels show-data-labels Flag to show labels for each data point.
slant-labels slant-labels Specifies that horizontal axis labels are slanted.
sort sort "up" Sorts the chart based on the first value. Does not affect donut and pie charts. Options are up or down.

The following tags are for the dimension tag and its attributes.

Tag Example Description
dimension dimension "Year Created"

Indicates the dimension name. Can also be specified as:

dimension "$(DIMENSION_1)"

to indicate the first user-chosen dimension, or

dimension "$(DIMENSION_2)"

to indicate the second dimension, and so on.

category category "Class"

Indicates the category (second) dimension name. Can also be specified as:

category "$(DIMENSION_2)"

to indicate the second user-chosen dimension. This attribute applies to all of the supported multitab chart types.

NOTE: You must add the multidimension option to the stamp template to allow selecting multiple dimensions in a stamp portlet configuration.

date-rollup-span

dimension "Year Created" {

date-rollup-span "y"

date-rollup-period "m"

...

}

A dimension attribute to indicate a span of dates for a rollup. Options are:

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

TIP: The date-rollup-span attribute is intended to be used with date-rollup-period and vice versa.

date-rollup-period

dimension "Month Created" {

date-rollup-period "q"

date-rollup-span "ytd"

...

}

A dimension attribute to indicate a period for the rollup. Options are:

  • y (year)
  • q (quarter)
  • m (month)
  • d (day)
label-format

dimension "Month Created" {

date-rollup-period "m"

label-format "MM"

}

A dimension attribute that matches the date formatting within DivePort—for example: "MMMMM" for a single-letter month. This attribute is optional.
label-width label-width 100 Applies to charts with a vertical orientation. Specifies the width of the vertical axis label, in pixels.
source source "Patient Age Group"

Indicates the source dimension name. Can also be specified as:

source "$(DIMENSION_1)"

to indicate the first user-chosen dimension, or

source "$(DIMENSION_2)"

to indicate the second dimension, and so on.

Use for connection charts (arc and chord) to indicate the source dimension.

target target "Facility"

Indicates the target (second) dimension name. Can also be specified as:

target "$(DIMENSION_2)"

to indicate the second user-chosen dimension.

Use for connection charts (arc and chord) to indicate the target dimension.

The following tags are for the value tag and its attributes.

Tag Example Description
value value "GL rate" Indicates the measure name. Can also be specified as:

value "$(MEASURE_1)"

value "$(MEASURE_1)", value "$(MEASURE_2)" ...

to indicate user-chosen measures.

NOTE: Donut and Pie charts support only one value.

absolute-time-series

value "Average LOS" {

absolute-time-series {

period "q"

period-number 1

offset-period "y"

offset-number -2

}

...

}

A value attribute that defines the measure value as an absolute-time series column.

The absolute-time-series block has four required child tags:

  • period "< q or m>"—the length of time to cover.

    • q (quarter)
    • m (month)
  • period-number <#>—number of the period to choose; for example period "m" and period-number 3 would result in the time range March.
  • offset-period "<y>"—the period by which to offset the time range. Must be longer than or equal to the period. For 0 offset, choose y.

    • y (year)—for example 'offset by -2 years'
  • offset-number <#>—number of periods (see offset-period) by which to offset the time range. For no offset, use 0. Negative and positive numbers are permitted, but they might not be appropriate depending on the other settings.
aux-measure

value "GL rate {

aux-measure "run rate"

...

}

A value attribute that 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.

axis

value "Shipped Orders" {

axis "right"

}

Available in Workbench 7.2(12) and later.

A value attribute that sets which axis is used for the value. The allowed options are:

  • left

  • right

NOTE: Setting axis to right is equivalent to including the secondary-axis flag. If both axis and secondary-axis are present for a value attribute, the axis setting takes precedence.

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

}

}

percent true

}

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.

 

The percent attribute (available in Workbench 7.1(30) and later) specifies if:

  • The percent difference between the two time series is calculated (true)

  • The difference between the two time series is calculated (false)

The default is false.

date-rollup-variation

value "GL rate" {

date-rollup-variation "cvp"

}

A value attribute to indicate the date range for the value. Options are:

  • c (current)
  • p (previous)
  • cvp (current versus previous)
  • cvp-pct (current versus previous percent)

Defaults to c if omitted.

NOTE: The date-rollup-variation attribute is supported if the dimension has date rollup defined.

format

value "Total Claims" {

format ="$#,##0.00"

}

A value attribute that indicates a display format.
label

value {

label "$(MEASURE_LABEL \"GL rate\")"

}

A value attribute that provides a string or macro to label the value in the chart. This attribute is optional.
line-style

value "my-measure" {

line-style "dashed"

...

}

A value attribute that indicates the line graphic style for a line chart. Options are:

  • solid
  • thick
  • dashed
  • dotted
  • none

Defaults to solid if omitted.

NOTE: The line-style attribute is supported when the chart type is line, spline, multitab line, or multitab spline, and when the chart type is combination and the render type is line or spline.

more-scale-options

more-scale-options {

right-scale-min 100000

}

Available in Workbench 7.2(12) or later.

A value attribute that sets the scale minimum, scale maximum, and scale format of the second axis. This attribute is optional. Options are:

  • right-scale-min

  • right-scale-max

  • right-scale-format

  • top-scale-min

  • top-scale-max

  • top-scale-format

Format options are:

Value Description
0 Rounds the value up or down to a whole number.
0.0 Rounds the value up or down to the hundredths place.
#,##0,.0k Abbreviates the number to the thousands with one decimal place and includes a k to indicate thousand.
#,##0,,.m Abbreviates the number to the millions and includes an m to designate million.

You can enter a customized top/right-scale-format using the following guidelines:

0 is a placeholder for a digit that always appears. If the format is 0.00 and the value is .3, 0.30 displays.

# is a placeholder for a digit that only appears if the value has a digit in that position. If the format is ##.## and the value is 3.3, 3.3 displays.

point-style

value "my-measure" {

point-style "diamond"

...

}

 

value "$(MEASURE_1)" {

time-series {

range "cd"

variation "p"

}

point-style "circle"

}

A value attribute that indicates the point graphic style for line charts. Options are:

  • none
  • circle
  • square
  • x
  • diamond
  • triangle-up
  • triangle-down

Defaults to none.

NOTE: The point-style attribute is supported when the chart type is line, spline, multitab line, or multitab spline, and when the chart type is combination and the render type is line or spline.

relative-time-series

value "In-patients" {

relative-time-series {

period "y"

number-of-periods 1

offset-period "y"

offset-number -2

}

...

}

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

The relative-time-series block has four required child tags:

  • period "<y, q, m, w, or d>"—the length of time to cover

    • y (year)
    • q (quarter)
    • m (month)
    • w (week)
    • d (day)
  • number-of-periods <#>—a positive number of periods
  • offset-period "<y, q, m, w, or d>"—the period by which to offset the time range. Must be longer than or equal to the period. For 0 offset, choose "y".

    • "y" (year)—for example 'offset by -2 years'
    • "q" (quarter)—available when period is quarter, month, week, or day
    • "m" (month)—available when period is month, week, or day
    • "w" (week)—available when period is week or day
    • "d" (day)—available only when period is day
  • offset-number <#>—number of periods (see offset-period) by which to offset the time range. For no offset, use 0. Negative and positive numbers are permitted, but they might not be appropriate depending on the other settings.

For example, period "y" and number-of-periods 5 and offset-number -1 and offset-period "y" gives 5 complete years ending with the year before the last complete year.

render-type

value "$(MEASURE_1)"{

date-rollup-variation "c"

render-type ="column"

}

A value attribute that indicates how to render the data in the chart. Options are:

  • area

  • column

  • line

  • spline-area

  • spline

Defaults to line if omitted.

secondary-axis

value "Total Admissions" {

secondary-axis

}

A value attribute that plots the value on the right axis instead of the left, for multivalue chart types with horizontal major axes (for example, column or line). For multivalue chart types with vertical major axes (for example, bar), this attribute plots the value on the top axis instead of the bottom.

NOTE: Only use secondary-axis with chart types where multiple axes are supported in a DivePort Chart Portlet: area, spline area, bar, column, combination, line, and spline.

show-mean

value "Total Admissions" {

show-mean {

color "rgb(242,16, 16)"

line-style "dashed"

label

}

}

A value attribute that causes a line to appear on the chart for the mean of that value. As of Workbench 7.2(12), the following style options are available for the mean line:

  • color—Sets the mean line color.

  • line-style—Sets the line style (all line styles from the line-style value tag above are available).

  • label—Flag to display the mean as a label

show-median

value "Total Admissions" {

show-median {

color "rgb(242,16, 16)"

line-style "dashed"

label

}

}

A value attribute that causes a line to appear on the chart for the median of that value. As of Workbench 7.2(12), the following style options are available for the median line:

  • color—Sets the median line color.

  • line-style—Sets the line style (all line styles from the line-style value tag above are available).

  • label—Flag to display the median as a label

time-series

value "GL Rate" {

time-series {

range "ytdtd"

variation "c"

}

...

}

 

value "$(MEASURE_1)" {

time-series {

range "cd"

variation "c"

}

point-style "circle"

}

A value attribute that defines the measure value 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)
to-date-time-series

value "Shipped Orders" {

to-date-time-series {

period "y"

to-period "d"

offset-period "y"

offset-number -2

}

...

}

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

The to-date-time-series block has four required child tags:

  • period "<y, q, m, or w>"—the length of time to cover

    • y (year)
    • q (quarter)
    • m (month)
    • w (week)
  • to-period "<q, m, or d>"—complete the phrase: "<period> to complete <to-period>"; for example period "y" and to-period "m" would result in the time range 'year to complete month.' The options "q" and "m" (quarter and month) are only available for a period of "y" (year). If period is quarter, month, or week, only "d" (day) can be used as the to-period.
  • offset-period "<y, q, m, or w>"—the period by which to offset the time range. Must be longer than or equal to the period. For 0 offset, choose "y".

    • "y" (year)—for example: 'offset by -2 years'
    • "q" (quarter)—available when period is quarter, month, week, or day, that is, not year
    • "m" (month)—available when period is month, week, or day
    • "w" (week)—available when period is week or day
  • offset-number <#>—number of periods (see offset-period) by which to offset the time range. For no offset, use 0. Negative and positive numbers are permitted, but they might not be appropriate depending on the other settings.

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