Plotly¶
Simple example:
# Define data. This can also be generated with the plotly Python library
data = [{'type': 'bar',
'x': ['giraffes', 'orangutans', 'monkeys'],
'y': [20, 14, 23]}]
# Show
p = ui.PlotlyWidget(data=data)
Also see examples: plotly_gdp.py.
-
class
flexx.ui.
PlotlyWidget
(*init_args, **kwargs)¶ Inherits from:
Widget
A widget that shows a Plotly visualization.
properties: config, data, layout
actions: set_config, set_data, set_layout
-
config
¶ DictProp – The config for the plot.
-
data
¶ ListProp – The data (list of dicts) that describes the plot. This can e.g. be the output of the Python plotly API call.
-
layout
¶ DictProp – The layout dict to style the plot.
-
set_config
(*val)¶ action – Setter for the ‘config’ property.
-
set_data
(*val)¶ action – Setter for the ‘data’ property.
-
set_layout
(*val)¶ action – Setter for the ‘layout’ property.
-