You are currently viewing the new Anvil Editor Docs.
Switch to the Classic Editor Docs
You are currently viewing the Classic Editor Docs.
Switch to the new Anvil Editor Docs

plotly.graph_objs.sankey Module

Functions

plotly.graph_objs.sankey.Domain([column=], [row=], [x=], [y=]) → Domain

Create a new ‘Domain’ object

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

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

  • x - Sets the horizontal domain of this sankey trace (in plot fraction).

  • y - Sets the vertical domain of this sankey trace (in plot fraction).


plotly.graph_objs.sankey.Hoverlabel([align=], [alignsrc=], [bgcolor=], [bgcolorsrc=], [bordercolor=], [bordercolorsrc=], [font=], [namelength=], [namelengthsrc=]) → Hoverlabel

Create a new ‘Hoverlabel’ object

  • align - Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines

  • alignsrc - Sets the source reference on Chart Studio Cloud for `align`.

  • bgcolor - Sets the background color of the hover labels for this trace

  • bgcolorsrc - Sets the source reference on Chart Studio Cloud for `bgcolor`.

  • bordercolor - Sets the border color of the hover labels for this trace.

  • bordercolorsrc - Sets the source reference on Chart Studio Cloud for `bordercolor`.

  • font - Sets the font used in hover labels.

  • namelength - Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.

  • namelengthsrc - Sets the source reference on Chart Studio Cloud for `namelength`.


plotly.graph_objs.sankey.Legendgrouptitle([font=], [text=]) → Legendgrouptitle

Create a new ‘Legendgrouptitle’ object

  • font - Sets this legend group's title font.

  • text - Sets the title of the legend group.


Create a new ‘Link’ object

  • arrowlen - Sets the length (in px) of the links arrow, if 0 no arrow will be drawn.

  • color - Sets the `link` color. It can be a single value, or an array for specifying color for each `link`. If `link.color` is omitted, then by default, a translucent grey link will be used.

  • colorsrc - Sets the source reference on Chart Studio Cloud for `color`.

  • customdata - Assigns extra data to each link.

  • customdatasrc - Sets the source reference on Chart Studio Cloud for `customdata`.

  • hoverinfo - Determines which trace information appear when hovering links. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.

  • hovertemplate - Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example "y: %{y}" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>". To hide the secondary box completely, use an empty tag `<extra></extra>`.

  • hovertemplatesrc - Sets the source reference on Chart Studio Cloud for `hovertemplate`.

  • label - The shown name of the link.

  • labelsrc - Sets the source reference on Chart Studio Cloud for `label`.

  • source - An integer number `[0..nodes.length - 1]` that represents the source node.

  • sourcesrc - Sets the source reference on Chart Studio Cloud for `source`.

  • target - An integer number `[0..nodes.length - 1]` that represents the target node.

  • targetsrc - Sets the source reference on Chart Studio Cloud for `target`.

  • value - A numeric value representing the flow volume value.

  • valuesrc - Sets the source reference on Chart Studio Cloud for `value`.


plotly.graph_objs.sankey.Node([color=], [colorsrc=], [customdata=], [customdatasrc=], [groups=], [hoverinfo=], [hoverlabel=], [hovertemplate=], [hovertemplatesrc=], [label=], [labelsrc=], [line=], [pad=], [thickness=], [x=], [xsrc=], [y=], [ysrc=]) → Node

Create a new ‘Node’ object

  • color - Sets the `node` color. It can be a single value, or an array for specifying color for each `node`. If `node.color` is omitted, then the default `Plotly` color palette will be cycled through to have a variety of colors. These defaults are not fully opaque, to allow some visibility of what is beneath the node.

  • colorsrc - Sets the source reference on Chart Studio Cloud for `color`.

  • customdata - Assigns extra data to each node.

  • customdatasrc - Sets the source reference on Chart Studio Cloud for `customdata`.

  • groups - Groups of nodes. Each group is defined by an array with the indices of the nodes it contains. Multiple groups can be specified.

  • hoverinfo - Determines which trace information appear when hovering nodes. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.

  • hovertemplate - Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example "y: %{y}" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `value` and `label`. Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>". To hide the secondary box completely, use an empty tag `<extra></extra>`.

  • hovertemplatesrc - Sets the source reference on Chart Studio Cloud for `hovertemplate`.

  • label - The shown name of the node.

  • labelsrc - Sets the source reference on Chart Studio Cloud for `label`.

  • pad - Sets the padding (in px) between the `nodes`.

  • thickness - Sets the thickness (in px) of the `nodes`.

  • x - The normalized horizontal position of the node.

  • xsrc - Sets the source reference on Chart Studio Cloud for `x`.

  • y - The normalized vertical position of the node.

  • ysrc - Sets the source reference on Chart Studio Cloud for `y`.


plotly.graph_objs.sankey.Stream([maxpoints=], [token=]) → Stream

Create a new ‘Stream’ object

  • maxpoints - Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.

  • token - The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details.


plotly.graph_objs.sankey.Textfont([color=], [family=], [size=]) → Textfont

Create a new ‘Textfont’ object

  • family - HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.


Globals






Do you still have questions?

Our Community Forum is full of helpful information and Anvil experts.


plotly.graph_objs.sankey