JavaScript Figure Reference: indicator Traces

A indicator trace is an object with the key "type" equal to "indicator" (i.e. {"type": "indicator"}) and any of the keys listed below.

An indicator is used to visualize a single `value` along with some contextual information such as `steps` or a `threshold`, using a combination of three visual elements: a number, a delta, and/or a gauge. Deltas are taken with respect to a `reference`. Gauges can be either angular or bullet (aka linear) gauges.

  • type
    Parent: data[type=indicator]
    Type: "indicator"
  • name
    Parent: data[type=indicator]
    Type: string

    Sets the trace name. The trace name appears as the legend item and on hover.

  • title
    Parent: data[type=indicator]
    Type: object containing one or more of the keys listed below.
    • align
      Parent: data[type=indicator].title
      Type: enumerated , one of ( "left" | "center" | "right" )

      Sets the horizontal alignment of the title. It defaults to `center` except for bullet charts for which it defaults to right.

    • font
      Parent: data[type=indicator].title
      Type: object containing one or more of the keys listed below.

      Set the font used to display the title

      • color
        Parent: data[type=indicator].title.font
        Type: color
      • family
        Parent: data[type=indicator].title.font
        Type: string

        HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.

      • lineposition
        Parent: data[type=indicator].title.font
        Type: flaglist string. Any combination of "under", "over", "through" joined with a "+" OR "none".
        Examples: "under", "over", "under+over", "under+over+through", "none"
        Default: "none"

        Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc.

      • shadow
        Parent: data[type=indicator].title.font
        Type: string
        Default: "none"

        Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.

      • size
        Parent: data[type=indicator].title.font
        Type: number greater than or equal to 1
      • style
        Parent: data[type=indicator].title.font
        Type: enumerated , one of ( "normal" | "italic" )
        Default: "normal"

        Sets whether a font should be styled with a normal or italic face from its family.

      • textcase
        Parent: data[type=indicator].title.font
        Type: enumerated , one of ( "normal" | "word caps" | "upper" | "lower" )
        Default: "normal"

        Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

      • variant
        Parent: data[type=indicator].title.font
        Type: enumerated , one of ( "normal" | "small-caps" | "all-small-caps" | "all-petite-caps" | "petite-caps" | "unicase" )
        Default: "normal"

        Sets the variant of the font.

      • weight
        Parent: data[type=indicator].title.font
        Type: integer between or equal to 1 and 1000
        Default: normal

        Sets the weight (or boldness) of the font.

    • text
      Parent: data[type=indicator].title
      Type: string

      Sets the title of this indicator.

  • visible
    Parent: data[type=indicator]
    Type: enumerated , one of ( true | false | "legendonly" )
    Default: true

    Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).

  • legend
    Parent: data[type=indicator]
    Type: subplotid
    Default: legend

    Sets the reference to a legend to show this trace in. References to these legends are "legend", "legend2", "legend3", etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.

  • legendrank
    Parent: data[type=indicator]
    Type: number
    Default: 1000

    Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with "reversed" `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.

  • legendgrouptitle
    Parent: data[type=indicator]
    Type: object containing one or more of the keys listed below.
    • font
      Parent: data[type=indicator].legendgrouptitle
      Type: object containing one or more of the keys listed below.

      Sets this legend group's title font.

      • color
        Parent: data[type=indicator].legendgrouptitle.font
        Type: color
      • family
        Parent: data[type=indicator].legendgrouptitle.font
        Type: string

        HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.

      • lineposition
        Parent: data[type=indicator].legendgrouptitle.font
        Type: flaglist string. Any combination of "under", "over", "through" joined with a "+" OR "none".
        Examples: "under", "over", "under+over", "under+over+through", "none"
        Default: "none"

        Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc.

      • shadow
        Parent: data[type=indicator].legendgrouptitle.font
        Type: string
        Default: "none"

        Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.

      • size
        Parent: data[type=indicator].legendgrouptitle.font
        Type: number greater than or equal to 1
      • style
        Parent: data[type=indicator].legendgrouptitle.font
        Type: enumerated , one of ( "normal" | "italic" )
        Default: "normal"

        Sets whether a font should be styled with a normal or italic face from its family.

      • textcase
        Parent: data[type=indicator].legendgrouptitle.font
        Type: enumerated , one of ( "normal" | "word caps" | "upper" | "lower" )
        Default: "normal"

        Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

      • variant
        Parent: data[type=indicator].legendgrouptitle.font
        Type: enumerated , one of ( "normal" | "small-caps" | "all-small-caps" | "all-petite-caps" | "petite-caps" | "unicase" )
        Default: "normal"

        Sets the variant of the font.

      • weight
        Parent: data[type=indicator].legendgrouptitle.font
        Type: integer between or equal to 1 and 1000
        Default: normal

        Sets the weight (or boldness) of the font.

    • text
      Parent: data[type=indicator].legendgrouptitle
      Type: string
      Default: ""

      Sets the title of the legend group.

  • legendwidth
    Parent: data[type=indicator]
    Type: number greater than or equal to 0

    Sets the width (in px or fraction) of the legend for this trace.

  • mode
    Parent: data[type=indicator]
    Type: flaglist string. Any combination of "number", "delta", "gauge" joined with a "+"
    Examples: "number", "delta", "number+delta", "number+delta+gauge"
    Default: "number"

    Determines how the value is displayed on the graph. `number` displays the value numerically in text. `delta` displays the difference to a reference value in text. Finally, `gauge` displays the value graphically on an axis.

  • ids
    Parent: data[type=indicator]
    Type: data array

    Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.

  • value
    Parent: data[type=indicator]
    Type: number

    Sets the number to be displayed.

  • meta
    Parent: data[type=indicator]
    Type: number or categorical coordinate string

    Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.

  • customdata
    Parent: data[type=indicator]
    Type: data array

    Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements

  • domain
    Parent: data[type=indicator]
    Type: object containing one or more of the keys listed below.
    • column
      Parent: data[type=indicator].domain
      Type: integer greater than or equal to 0
      Default: 0

      If there is a layout grid, use the domain for this column in the grid for this indicator trace.

    • row
      Parent: data[type=indicator].domain
      Type: integer greater than or equal to 0
      Default: 0

      If there is a layout grid, use the domain for this row in the grid for this indicator trace.

    • x
      Parent: data[type=indicator].domain
      Type: array
      Default: [0, 1]

      Sets the horizontal domain of this indicator trace (in plot fraction).

    • y
      Parent: data[type=indicator].domain
      Type: array
      Default: [0, 1]

      Sets the vertical domain of this indicator trace (in plot fraction).

  • align
    Parent: data[type=indicator]
    Type: enumerated , one of ( "left" | "center" | "right" )

    Sets the horizontal alignment of the `text` within the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centered

  • delta
    Parent: data[type=indicator]
    Type: object containing one or more of the keys listed below.
    • decreasing
      Parent: data[type=indicator].delta
      Type: object containing one or more of the keys listed below.
      • color
        Parent: data[type=indicator].delta.decreasing
        Type: color
        Default: "#FF4136"

        Sets the color for increasing value.

      • symbol
        Parent: data[type=indicator].delta.decreasing
        Type: string
        Default: "▼"

        Sets the symbol to display for increasing value

    • font
      Parent: data[type=indicator].delta
      Type: object containing one or more of the keys listed below.

      Set the font used to display the delta

      • color
        Parent: data[type=indicator].delta.font
        Type: color
      • family
        Parent: data[type=indicator].delta.font
        Type: string

        HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.

      • lineposition
        Parent: data[type=indicator].delta.font
        Type: flaglist string. Any combination of "under", "over", "through" joined with a "+" OR "none".
        Examples: "under", "over", "under+over", "under+over+through", "none"
        Default: "none"

        Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc.

      • shadow
        Parent: data[type=indicator].delta.font
        Type: string
        Default: "none"

        Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.

      • size
        Parent: data[type=indicator].delta.font
        Type: number greater than or equal to 1
      • style
        Parent: data[type=indicator].delta.font
        Type: enumerated , one of ( "normal" | "italic" )
        Default: "normal"

        Sets whether a font should be styled with a normal or italic face from its family.

      • textcase
        Parent: data[type=indicator].delta.font
        Type: enumerated , one of ( "normal" | "word caps" | "upper" | "lower" )
        Default: "normal"

        Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

      • variant
        Parent: data[type=indicator].delta.font
        Type: enumerated , one of ( "normal" | "small-caps" | "all-small-caps" | "all-petite-caps" | "petite-caps" | "unicase" )
        Default: "normal"

        Sets the variant of the font.

      • weight
        Parent: data[type=indicator].delta.font
        Type: integer between or equal to 1 and 1000
        Default: normal

        Sets the weight (or boldness) of the font.

    • increasing
      Parent: data[type=indicator].delta
      Type: object containing one or more of the keys listed below.
      • color
        Parent: data[type=indicator].delta.increasing
        Type: color
        Default: "#3D9970"

        Sets the color for increasing value.

      • symbol
        Parent: data[type=indicator].delta.increasing
        Type: string
        Default: "▲"

        Sets the symbol to display for increasing value

    • position
      Parent: data[type=indicator].delta
      Type: enumerated , one of ( "top" | "bottom" | "left" | "right" )
      Default: "bottom"

      Sets the position of delta with respect to the number.

    • prefix
      Parent: data[type=indicator].delta
      Type: string
      Default: ""

      Sets a prefix appearing before the delta.

    • reference
      Parent: data[type=indicator].delta
      Type: number

      Sets the reference value to compute the delta. By default, it is set to the current value.

    • relative