Chart Reference Line Component

Chart Reference Line

Function: a!chartReferenceLine()

Contains the reference line value for each threshold that is defined on a column, bar, or line chart.

See also: Bar Chart, Column Chart, Line Chart

Parameters

Name Keyword Type Description
Label label Text Text to display on top of the reference line.
Value value Decimal The numeric value at which the reference line will be drawn.
Visibility showWhen Boolean Determines whether the reference line is displayed on the interface. When set to false, the reference line is hidden and is not evaluated. Default: true.
Color color Text Color for the reference line. Valid values: Any valid hex color or "ACCENT", "BLUEGRAY", "GREEN", "GOLD", "ORANGE", "PURPLE", "RED", "SKYBLUE", "LIMEGREEN", "YELLOW", "AMBER", "PINK", "VIOLETRED".
Style style Text Style of the reference line. Valid values are: "SOLID", "DOT", "DASH" (default), "DASHDOT", "SHORTDASH".

Examples

Copy and paste an example into the INTERFACE DEFINITION in EXPRESSION MODE to see it displayed.

Single series column chart with reference lines

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
a!localVariables(
  local!data:{
    {quarter: "2015-Q1", spent: 15804},
    {quarter: "2015-Q2", spent: 13432},
    {quarter: "2015-Q3", spent: 23400},
    {quarter: "2015-Q4", spent: 15900},
    {quarter: "2016-Q1", spent: 12004},
    {quarter: "2016-Q2", spent: 13901},
    {quarter: "2016-Q3", spent: 14142},
    {quarter: "2016-Q4", spent: 17980},
    {quarter: "2017-Q1", spent: 13822},
    {quarter: "2017-Q2", spent: 11053},
    {quarter: "2017-Q3", spent: 16607},
    {quarter: "2017-Q4", spent: 15449}
  },
  a!lineChartField(
    label: "Money Spent per Quarter",
    categories: local!data.quarter,
    series: a!chartSeries(
      data: local!data.spent
    ),
    colorScheme: "CLASSIC",
    xAxisTitle: "Quarter",
    yAxisTitle: "Amount Spent (in $)",
    referenceLines: {
      a!chartReferenceLine(
        label: "100% Budget",
        value: 18000,
        color: "ORANGE"
      ),
      a!chartReferenceLine(
        label: "125% Budget",
        value: 22500,
        color: "RED",
        style: "DASH"
      )
    },
    showLegend: false
  )
)

Displays the following:

The following patterns include usage of the Chart Reference Line Component.

Open in Github Built: Fri, Jun 03, 2022 (01:08:29 PM)

On This Page

FEEDBACK