plotly.graph_objects
.Sankey¶
-
class
plotly.graph_objects.
Sankey
(arg=None, arrangement=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, link=None, meta=None, metasrc=None, name=None, node=None, orientation=None, selectedpoints=None, stream=None, textfont=None, uid=None, uirevision=None, valueformat=None, valuesuffix=None, visible=None, **kwargs)¶ -
__init__
(arg=None, arrangement=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, link=None, meta=None, metasrc=None, name=None, node=None, orientation=None, selectedpoints=None, stream=None, textfont=None, uid=None, uirevision=None, valueformat=None, valuesuffix=None, visible=None, **kwargs)¶ Construct a new Sankey object
Sankey plots for network flow data analysis. The nodes are specified in
nodes
and the links between sources and targets inlinks
. The colors are set innodes[i].color
andlinks[i].color
, otherwise defaults are used.- Parameters
arg â dict of properties compatible with this constructor or an instance of
plotly.graph_objects.Sankey
arrangement â If value is
snap
(the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified vianodepad
. If value isperpendicular
, the nodes can only move along a line perpendicular to the flow. If value isfreeform
, the nodes can freely move on the plane. If value isfixed
, the nodes are stationary.customdata â 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
customdatasrc â Sets the source reference on Chart Studio Cloud for
customdata
.domain â
plotly.graph_objects.sankey.Domain
instance or dict with compatible propertieshoverinfo â Determines which trace information appear on hover. If
none
orskip
are set, no information is displayed upon hovering. But, ifnone
is set, click and hover events are still fired. Note that this attribute is superseded bynode.hoverinfo
andnode.hoverinfo
for nodes and links respectively.hoverlabel â
plotly.graph_objects.sankey.Hoverlabel
instance or dict with compatible propertiesids â 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.
idssrc â Sets the source reference on Chart Studio Cloud for
ids
.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.legendgrouptitle â
plotly.graph_objects.sankey.Legendgrouptitle
instance or dict with compatible propertieslegendrank â 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.legendwidth â Sets the width (in px or fraction) of the legend for this trace.
link â The links of the Sankey plot.
meta â Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name
, graph, axis and colorbartitle.text
, annotationtext
rangeselector
,updatemenues
andsliders
label
text all supportmeta
. To access the tracemeta
values in an attribute in the same trace, simply use%{meta[i]}
wherei
is the index or key of themeta
item in question. To access tracemeta
in layout attributes, use%{data[n[.meta[i]}
wherei
is the index or key of themeta
andn
is the trace index.metasrc â Sets the source reference on Chart Studio Cloud for
meta
.name â Sets the trace name. The trace name appears as the legend item and on hover.
node â The nodes of the Sankey plot.
orientation â Sets the orientation of the Sankey diagram.
selectedpoints â Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselected
are turned on for all points, whereas, any other non-array values means no selection all where theselected
andunselected
styles have no effect.stream â
plotly.graph_objects.sankey.Stream
instance or dict with compatible propertiestextfont â Sets the font for node labels
uid â Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision â Controls persistence of some user-driven changes to the trace:
constraintrange
inparcoords
traces, as well as someeditable: true
modifications such asname
andcolorbar.title
. Defaults tolayout.uirevision
. Note that other user-driven trace attribute changes are controlled bylayout
attributes:trace.visible
is controlled bylayout.legend.uirevision
,selectedpoints
is controlled bylayout.selectionrevision
, andcolorbar.(x|y)
(accessible withconfig: {editable: true}
) is controlled bylayout.editrevision
. Trace changes are tracked byuid
, which only falls back on trace index if nouid
is provided. So if your app can add/remove traces before the end of thedata
array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auid
that stays with it as it moves.valueformat â Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
valuesuffix â Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value.
visible â 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).
- Returns
- Return type
-
plotly.graph_objects
.sankey¶
-
class
plotly.graph_objects.sankey.
Domain
(arg=None, column=None, row=None, x=None, y=None, **kwargs)¶ -
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, showarrow=None, **kwargs)¶ -
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: see https://plotly.com/python/css-colors/ for a list
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: see https://plotly.com/python/css-colors/ for a list
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
- 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
namelengthsrc
¶ Sets the source reference on Chart Studio Cloud for
namelength
.The ânamelengthsrcâ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
-
class
plotly.graph_objects.sankey.
Legendgrouptitle
(arg=None, font=None, text=None, **kwargs)¶ -
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
- 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)¶ -
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: see https://plotly.com/python/css-colors/ for a list
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
- 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
- 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: see https://plotly.com/python/css-colors/ for a list
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
- 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
- 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)¶ -
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: see https://plotly.com/python/css-colors/ for a list
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
- 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
- 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)¶ -
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)¶ -
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: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
family
¶ 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.
- 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