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
  • 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
  • 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

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.
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.

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 should 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.
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.

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.

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.

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.

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.
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)
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.
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.

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.
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.

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.

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 if omitted.

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.

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.

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

}

A value attribute that causes a line to appear on the chart for the mean of that value.
show-median

value "Total Admissions" {

show-median

}

A value attribute that causes a line to appear on the chart for the median of that value.
format

value "Total Claims" {

format ="$#,##0.00"

}

A value attribute that indicates a display format.
Additional optional chart 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 # # # #

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

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

legend visible

legend visible=false

Indicates whether to display the legend. Defaults to true.
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.

num-items

num-items 10 Indicates the integer number of items to which to limit the chart.
show-others show-others When used with num-items, groups the rest of the items into an others group.
hide-nulls hide-nulls Hides null values on bar charts when present.
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.

sort sort "up" Sorts the chart based on the first value. Does not affect donut and pie charts. Options are up or down.
scale-min

scale-min 100

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

Defines the scale minimum with a number or macro.
scale-max

scale-max 100

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

Defines the scale maximum with a number or macro.
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.

slant-labels slant-labels Specifies that horizontal axis labels are slanted.
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.

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