chart class
Displays data sets in a chart or a group of charts.
Methods¶
__init__() ¶
__init__(
data=None,
type="scatter",
mode="lines+markers",
x=None,
y=None,
z=None,
lon=None,
lat=None,
r=None,
theta=None,
high=None,
low=None,
open=None,
close=None,
measure=None,
locations=None,
values=None,
labels=None,
parents=None,
text=None,
base=None,
title=None,
render=True,
on_range_change=None,
columns=None, # All columns
label=None,
name=None,
selected=None,
color=None,
selected_color=None,
marker=None,
line=None,
selected_marker=None,
layout=None,
plot_config=None,
options=None,
orientation=None,
text_anchor=None,
xaxis=None,
yaxis=None,
width="100%",
height=None,
template=None,
decimator=None,
rebuild=False,
figure=None,
on_click=None,
on_change=None,
propagate=None, # App config
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new chart
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Any
|
The data object bound to this chart control. |
None
|
type |
str
|
Chart type. |
scatter
|
mode |
str
|
Chart mode. |
lines+markers
|
x |
str
|
Column name for the x axis. |
None
|
y |
str
|
Column name for the y axis. |
None
|
z |
str
|
Column name for the z axis. |
None
|
lon |
str
|
Column name for the longitude value, for 'scattergeo' charts. See Plotly Map traces. |
None
|
lat |
str
|
Column name for the latitude value, for 'scattergeo' charts. See Plotly Map traces. |
None
|
r |
str
|
Column name for the r value, for 'scatterpolar' charts. See Plotly Polar charts. |
None
|
theta |
str
|
Column name for the theta value, for 'scatterpolar' charts. See Plotly Polar charts. |
None
|
high |
str
|
Column name for the high value, for 'candlestick' charts. See Plotly Candlestick charts. |
None
|
low |
str
|
Column name for the low value, for 'candlestick' charts. See Ploty Candlestick charts. |
None
|
open |
str
|
Column name for the open value, for 'candlestick' charts. See Plotly Candlestick charts. |
None
|
close |
str
|
Column name for the close value, for 'candlestick' charts. See Plotly Candlestick charts. |
None
|
measure |
str
|
Column name for the measure value, for 'waterfall' charts. See Plotly Waterfall charts. |
None
|
locations |
str
|
Column name for the locations value. See Plotly Choropleth maps. |
None
|
values |
str
|
Column name for the values value. See Plotly Pie charts or Plotly Funnel Area charts. |
None
|
labels |
str
|
Column name for the labels value. See Plotly Pie charts. |
None
|
parents |
str
|
Column name for the parents value. See Plotly Treemap charts. |
None
|
text |
str
|
Column name for the text associated to the point for the indicated trace. |
None
|
base |
str
|
Column name for the base value. Used in bar charts only. |
None
|
title |
str
|
The title of this chart control. |
None
|
render |
bool
|
If True, this chart is visible on the page. |
True
|
on_range_change |
Union[str, Callable]
|
A function or the name of a function that is triggered when the visible part of the x axis changes. |
None
|
columns |
Union[str, list[str], dict[str, dict[str, str]]]
|
The list of column names to represent.
If columns is omitted or set to None, all columns of data are represented. |
All columns
|
label |
str
|
The label for the indicated trace. |
None
|
name |
str
|
The name of the indicated trace. |
None
|
selected |
Union[list[int],str]
|
The list of the selected point indices . |
None
|
color |
str
|
The color of the indicated trace (or a column name for scattered). |
None
|
selected_color |
str
|
The color of the selected points for the indicated trace. |
None
|
marker |
dict[str, Any]
|
The type of markers used for the indicated trace. |
None
|
line |
Union[str,dict[str,Any]]
|
The configuration of the line used for the indicated trace. |
None
|
selected_marker |
dict[str, Any]
|
The type of markers used for selected points in the indicated trace. |
None
|
layout |
dict[str, Any]
|
The plotly.js compatible layout object. |
None
|
plot_config |
dict[str, Any]
|
The plotly.js compatible configuration options object. |
None
|
options |
dict[str, Any]
|
The plotly.js compatible data object where dynamic data will be overridden.. |
None
|
orientation |
str
|
The orientation of the indicated trace. |
None
|
text_anchor |
str
|
Position of the text relative to the point. |
None
|
xaxis |
str
|
The x axis identifier for the indicated trace. |
None
|
yaxis |
str
|
The y axis identifier for the indicated trace. |
None
|
width |
Union[str, int, float]
|
The width of this chart, in CSS units. |
100%
|
height |
Union[str, int, float]
|
The height of this chart, in CSS units. |
None
|
template |
dict
|
The Plotly layout template. |
None
|
decimator |
taipy.gui.data.Decimator
|
A decimator instance for the indicated trace that reduces the volume of the data being sent back and forth. |
None
|
rebuild |
bool
|
Allows dynamic config refresh if set to True. |
False
|
figure |
plotly.graph_objects.Figure
|
A figure as produced by Plotly. |
None
|
on_click |
Union[str, Callable]
|
A function or the name of a function that is triggered when the user clicks in the chart background.
|
None
|
on_change |
Union[str, Callable]
|
A function or the name of a function that is triggered when the value is updated.
|
None
|
propagate |
bool
|
Allows the control's main value to be automatically propagated. |
App config
|
active |
bool
|
Indicates if this component is active. |
True
|
id |
str
|
The identifier that is assigned to the rendered HTML component. |
None
|
properties |
dict[str, Any]
|
Bound to a dictionary that contains additional properties for this element. |
None
|
class_name |
str
|
The list of CSS class names that are associated with the generated HTML Element. |
None
|
hover_text |
str
|
The information that is displayed when the user hovers over this element. |
None
|