JavaScript Figure Reference: table Traces

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

Table view for detailed data viewing. The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a column-major order, ie. the grid is represented as a vector of column vectors.

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

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

  • visible
    Parent: data[type=table]
    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=table]
    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=table]
    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=table]
    Type: object containing one or more of the keys listed below.
    • font
      Parent: data[type=table].legendgrouptitle
      Type: object containing one or more of the keys listed below.

      Sets this legend group's title font.

      • color
        Parent: data[type=table].legendgrouptitle.font
        Type: color
      • family
        Parent: data[type=table].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=table].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=table].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=table].legendgrouptitle.font
        Type: number greater than or equal to 1
      • style
        Parent: data[type=table].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=table].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=table].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=table].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=table].legendgrouptitle
      Type: string
      Default: ""

      Sets the title of the legend group.

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

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

  • ids
    Parent: data[type=table]
    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.

  • columnorder
    Parent: data[type=table]
    Type: data array

    Specifies the rendered order of the data columns; for example, a value `2` at position `0` means that column index `0` in the data will be rendered as the third column, as columns have an index base of zero.

  • columnwidth
    Parent: data[type=table]
    Type: number or array of numbers

    The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths.

  • hoverinfo
    Parent: data[type=table]
    Type: flaglist string. Any combination of "x", "y", "z", "text", "name" joined with a "+" OR "all" or "none" or "skip".
    Examples: "x", "y", "x+y", "x+y+z", "all"
    Default: "all"

    Determines what trace information appears on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.

  • meta
    Parent: data[type=table]
    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=table]
    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=table]
    Type: object containing one or more of the keys listed below.
    • column
      Parent: data[type=table].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 table trace.

    • row
      Parent: data[type=table].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 table trace.

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

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

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

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

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

      Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains one or more <br> HTML tags) or if an explicit width is set to override the text width.

    • fill
      Parent: data[type=table].cells
      Type: object containing one or more of the keys listed below.
      • color
        Parent: data[type=table].cells.fill
        Type: color or array of colors
        Default: "white"

        Sets the cell fill color. It accepts either a specific color or an array of colors or a 2D array of colors.

    • font
      Parent: data[type=table].cells
      Type: object containing one or more of the keys listed below.
      • color
        Parent: data[type=table].cells.font
        Type: color or array of colors
      • family
        Parent: data[type=table].cells.font
        Type: string or array of strings

        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=table].cells.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=table].cells.font
        Type: string or array of strings
        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=table].cells.font
        Type: number or array of numbers greater than or equal to 1
      • style
        Parent: data[type=table].cells.font
        Type: enumerated or array of enumerateds , 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=table].cells.font
        Type: enumerated or array of enumerateds , 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=table].cells.font
        Type: enumerated or array of enumerateds , one of ( "normal" | "small-caps" | "all-small-caps" | "all-petite-caps" | "petite-caps" |