plotly.graph_objects.sankey package¶
-
class
plotly.graph_objects.sankey.
Domain
(arg=None, column=None, row=None, x=None, y=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
column
¶ If there is a layout grid, use the domain for this column in the grid for this sankey trace .
- The ‘column’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
row
¶ If there is a layout grid, use the domain for this row in the grid for this sankey trace .
- The ‘row’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
x
¶ - Sets the horizontal domain of this sankey trace (in plot
fraction).
The ‘x’ property is an info array that may be specified as:
a list or tuple of 2 elements where:
- The ‘x[0]’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- The ‘x[1]’ property is a number and may be specified as:
An int or float in the interval [0, 1]
list
-
property
y
¶ - Sets the vertical domain of this sankey trace (in plot
fraction).
The ‘y’ property is an info array that may be specified as:
a list or tuple of 2 elements where:
- The ‘y[0]’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- The ‘y[1]’ property is a number and may be specified as:
An int or float in the interval [0, 1]
list
-
property
-
class
plotly.graph_objects.sankey.
Hoverlabel
(arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
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
- The ‘align’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘left’, ‘right’, ‘auto’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
alignsrc
¶ Sets the source reference on Chart Studio Cloud for
align
.The ‘alignsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
bgcolor
¶ Sets the background color of the hover labels for this trace
- The ‘bgcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
- Returns
- Return type
str|numpy.ndarray
-
property
bgcolorsrc
¶ Sets the source reference on Chart Studio Cloud for
bgcolor
.The ‘bgcolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
bordercolor
¶ Sets the border color of the hover labels for this trace.
- The ‘bordercolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
- Returns
- Return type
str|numpy.ndarray
-
property
bordercolorsrc
¶ Sets the source reference on Chart Studio Cloud for
bordercolor
.The ‘bordercolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
font
¶ Sets the font used in hover labels.
The ‘font’ property is an instance of Font that may be specified as:
An instance of
plotly.graph_objects.sankey.hoverlabel.Font
A dict of string/value properties that will be passed to the Font constructor
Supported dict properties:
color
- colorsrc
Sets the source reference on Chart Studio Cloud for
color
.- 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”.
- familysrc
Sets the source reference on Chart Studio Cloud for
family
.- lineposition
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.
- linepositionsrc
Sets the source reference on Chart Studio Cloud for
lineposition
.- shadow
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.
- shadowsrc
Sets the source reference on Chart Studio Cloud for
shadow
.
size
- sizesrc
Sets the source reference on Chart Studio Cloud for
size
.- style
Sets whether a font should be styled with a normal or italic face from its family.
- stylesrc
Sets the source reference on Chart Studio Cloud for
style
.- textcase
Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized.
- textcasesrc
Sets the source reference on Chart Studio Cloud for
textcase
.- variant
Sets the variant of the font.
- variantsrc
Sets the source reference on Chart Studio Cloud for
variant
.- weight
Sets the weight (or boldness) of the font.
- weightsrc
Sets the source reference on Chart Studio Cloud for
weight
.
- Returns
- Return type
-
property
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.- The ‘namelength’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|numpy.ndarray
-
property
-
class
plotly.graph_objects.sankey.
Legendgrouptitle
(arg=None, font=None, text=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
font
¶ Sets this legend group’s title font.
The ‘font’ property is an instance of Font that may be specified as:
An instance of
plotly.graph_objects.sankey.legendgrouptitle.Font
A dict of string/value properties that will be passed to the Font constructor
Supported dict properties:
color
- 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”.
- lineposition
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
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
- style
Sets whether a font should be styled with a normal or italic face from its family.
- textcase
Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized.
- variant
Sets the variant of the font.
- weight
Sets the weight (or boldness) of the font.
- Returns
- Return type
-
property
-
class
plotly.graph_objects.sankey.
Link
(arg=None, arrowlen=None, color=None, colorscales=None, colorscaledefaults=None, colorsrc=None, customdata=None, customdatasrc=None, hovercolor=None, hovercolorsrc=None, hoverinfo=None, hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, label=None, labelsrc=None, line=None, source=None, sourcesrc=None, target=None, targetsrc=None, value=None, valuesrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
arrowlen
¶ Sets the length (in px) of the links arrow, if 0 no arrow will be drawn.
- The ‘arrowlen’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
color
¶ Sets the
link
color. It can be a single value, or an array for specifying color for eachlink
. Iflink.color
is omitted, then by default, a translucent grey link will be used.- The ‘color’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
- Returns
- Return type
str|numpy.ndarray
-
property
colorscaledefaults
¶ When used in a template (as layout.template.data.sankey.link.colorscaledefaults), sets the default property values to use for elements of sankey.link.colorscales
The ‘colorscaledefaults’ property is an instance of Colorscale that may be specified as:
An instance of
plotly.graph_objects.sankey.link.Colorscale
A dict of string/value properties that will be passed to the Colorscale constructor
Supported dict properties:
- Returns
- Return type
-
property
colorscales
¶ The ‘colorscales’ property is a tuple of instances of Colorscale that may be specified as:
A list or tuple of instances of plotly.graph_objects.sankey.link.Colorscale
A list or tuple of dicts of string/value properties that will be passed to the Colorscale constructor
Supported dict properties:
- cmax
Sets the upper bound of the color domain.
- cmin
Sets the lower bound of the color domain.
- colorscale
Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]
. To control the bounds of the colorscale in color space, usecmin
andcmax
. Alternatively,colorscale
may be a palette name string of the following list: Blac kbody,Bluered,Blues,Cividis,Earth,Electric,Gree ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R eds,Viridis,YlGnBu,YlOrRd.- label
The label of the links to color based on their concentration within a flow.
- name
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemname
matching thisname
alongside your modifications (includingvisible: false
orenabled: false
to hide it). Has no effect outside of a template.- templateitemname
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemname
matching itsname
, alongside your modifications (includingvisible: false
orenabled: false
to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true
.
- Returns
- Return type
-
property
colorsrc
¶ Sets the source reference on Chart Studio Cloud for
color
.The ‘colorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata
¶ Assigns extra data to each link.
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc
¶ Sets the source reference on Chart Studio Cloud for
customdata
.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovercolor
¶ Sets the
link
hover color. It can be a single value, or an array for specifying hover colors for eachlink
. Iflink.hovercolor
is omitted, then by default, links will become slightly more opaque when hovered over.- The ‘hovercolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovercolorsrc
¶ Sets the source reference on Chart Studio Cloud for
hovercolor
.The ‘hovercolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo
¶ Determines which trace information appear when hovering links. If
none
orskip
are set, no information is displayed upon hovering. But, ifnone
is set, click and hover events are still fired.- The ‘hoverinfo’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘all’, ‘none’, ‘skip’]
- Returns
- Return type
Any
-
property
hoverlabel
¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.sankey.link.Hoverlabel
A dict of string/value properties that will be passed to the Hoverlabel constructor
Supported dict properties:
- 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
.
- Returns
- Return type
-
property
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 inhovertemplate
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 arearrayOk: true
) are available. Variablessource
andtarget
are node objects.Finally, the template string has access to variablesvalue
andlabel
. 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>
.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatesrc
¶ Sets the source reference on Chart Studio Cloud for
hovertemplate
.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
label
¶ The shown name of the link.
The ‘label’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelsrc
¶ Sets the source reference on Chart Studio Cloud for
label
.The ‘labelsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
line
¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.sankey.link.Line
A dict of string/value properties that will be passed to the Line constructor
Supported dict properties:
- color
Sets the color of the
line
around eachlink
.- colorsrc
Sets the source reference on Chart Studio Cloud for
color
.- width
Sets the width (in px) of the
line
around eachlink
.- widthsrc
Sets the source reference on Chart Studio Cloud for
width
.
- Returns
- Return type
-
property
source
¶ An integer number
[0..nodes.length - 1]
that represents the source node.The ‘source’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
sourcesrc
¶ Sets the source reference on Chart Studio Cloud for
source
.The ‘sourcesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
target
¶ An integer number
[0..nodes.length - 1]
that represents the target node.The ‘target’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
targetsrc
¶ Sets the source reference on Chart Studio Cloud for
target
.The ‘targetsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
value
¶ A numeric value representing the flow volume value.
The ‘value’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
-
class
plotly.graph_objects.sankey.
Node
(arg=None, align=None, color=None, colorsrc=None, customdata=None, customdatasrc=None, groups=None, hoverinfo=None, hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, label=None, labelsrc=None, line=None, pad=None, thickness=None, x=None, xsrc=None, y=None, ysrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
align
¶ Sets the alignment method used to position the nodes along the horizontal axis.
- The ‘align’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘justify’, ‘left’, ‘right’, ‘center’]
- Returns
- Return type
Any
-
property
color
¶ Sets the
node
color. It can be a single value, or an array for specifying color for eachnode
. Ifnode.color
is omitted, then the defaultPlotly
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.- The ‘color’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
- Returns
- Return type
str|numpy.ndarray
-
property
colorsrc
¶ Sets the source reference on Chart Studio Cloud for
color
.The ‘colorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata
¶ Assigns extra data to each node.
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc
¶ Sets the source reference on Chart Studio Cloud for
customdata
.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
groups
¶ Groups of nodes. Each group is defined by an array with the indices of the nodes it contains. Multiple groups can be specified.
The ‘groups’ property is an info array that may be specified as: * a 2D list where:
The ‘groups[i][j]’ property is a number and may be specified as: - An int or float
- Returns
- Return type
-
property
hoverinfo
¶ Determines which trace information appear when hovering nodes. If
none
orskip
are set, no information is displayed upon hovering. But, ifnone
is set, click and hover events are still fired.- The ‘hoverinfo’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘all’, ‘none’, ‘skip’]
- Returns
- Return type
Any
-
property
hoverlabel
¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.sankey.node.Hoverlabel
A dict of string/value properties that will be passed to the Hoverlabel constructor
Supported dict properties:
- 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
.
- Returns
- Return type
-
property
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 inhovertemplate
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 arearrayOk: true
) are available. VariablessourceLinks
andtargetLinks
are arrays of link objects.Finally, the template string has access to variablesvalue
andlabel
. 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>
.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatesrc
¶ Sets the source reference on Chart Studio Cloud for
hovertemplate
.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
label
¶ The shown name of the node.
The ‘label’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelsrc
¶ Sets the source reference on Chart Studio Cloud for
label
.The ‘labelsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
line
¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.sankey.node.Line
A dict of string/value properties that will be passed to the Line constructor
Supported dict properties:
- color
Sets the color of the
line
around eachnode
.- colorsrc
Sets the source reference on Chart Studio Cloud for
color
.- width
Sets the width (in px) of the
line
around eachnode
.- widthsrc
Sets the source reference on Chart Studio Cloud for
width
.
- Returns
- Return type
-
property
pad
¶ Sets the padding (in px) between the
nodes
.- The ‘pad’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
thickness
¶ Sets the thickness (in px) of the
nodes
.- The ‘thickness’ property is a number and may be specified as:
An int or float in the interval [1, inf]
- Returns
- Return type
int|float
-
property
x
¶ The normalized horizontal position of the node.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xsrc
¶ Sets the source reference on Chart Studio Cloud for
x
.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y
¶ The normalized vertical position of the node.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
-
class
plotly.graph_objects.sankey.
Stream
(arg=None, maxpoints=None, token=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
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.- The ‘maxpoints’ property is a number and may be specified as:
An int or float in the interval [0, 10000]
- Returns
- Return type
int|float
-
property
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.
- The ‘token’ property is a string and must be specified as:
A non-empty string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.sankey.
Textfont
(arg=None, color=None, family=None, lineposition=None, shadow=None, size=None, style=None, textcase=None, variant=None, weight=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceHierarchyType
-
property
color
¶ - The ‘color’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
- Returns
- Return type
-
property
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”.
- The ‘family’ property is a string and must be specified as:
A non-empty string
- Returns
- Return type
-
property
lineposition
¶ 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.
The ‘lineposition’ property is a flaglist and may be specified as a string containing:
Any combination of [‘under’, ‘over’, ‘through’] joined with ‘+’ characters (e.g. ‘under+over’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
shadow
¶ 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.
- The ‘shadow’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
size
¶ - The ‘size’ property is a number and may be specified as:
An int or float in the interval [1, inf]
- Returns
- Return type
int|float
-
property
style
¶ Sets whether a font should be styled with a normal or italic face from its family.
- The ‘style’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘normal’, ‘italic’]
- Returns
- Return type
Any
-
property
textcase
¶ Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- The ‘textcase’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘normal’, ‘word caps’, ‘upper’, ‘lower’]
- Returns
- Return type
Any
-
property
variant
¶ Sets the variant of the font.
- The ‘variant’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘normal’, ‘small-caps’, ‘all-small-caps’, ‘all-petite-caps’, ‘petite-caps’, ‘unicase’]
- Returns
- Return type
Any
-
property