shapelets.apps.DataApp.bar_chart#

DataApp.bar_chart(data: Optional[Union[DataFrame, DataSet]] = None, x: Optional[Union[List[Any], List[array]]] = None, y: Optional[Union[List[Any], List[array]]] = None, y_axis_orientation: Literal['right', 'left'] = 'left', x_name: Optional[str] = None, y_name: Optional[str] = None, title: Optional[str] = None, legend: Optional[Union[Any, List[Any]]] = None, **additional)#

Produces a Bar Chart figure for your dataApp.

Parameters:
data: sh.Dataset or pd.DataFrame, optional

Import your data from Shapelets Dataset or a pandas dataframe.

x: List of any, including a numpy array, optional

Set the values for the x-axis.

y: List of any, including a numpy array, optional

Set the values for the y-axis.

y_axis_orientation: {‘left’, ‘right’}, default ‘left’

Set the orientation of the y-axis.

x_name: str, optional

Set the name of the x-axis.

y_name: str, optional

Set the name of the y-axis.

title: str, optional

String with the BarChart title. It will be placed on top of the BarChart.

legend: List of any, optional

Set the legend names for the BarChart.

Returns:
BarChart

Examples

Vertical Bar Chart >>> legend = [“Spain”, “Italy”, “France”] >>> y_axis = [[20, 15, 10], [10, 7, 5], [3, 2, 1]] >>> bar = app.bar_chart(x=[“Dogs”, “Cats”, “Mouse”], y=y_axis, title=”Triple BarChart”, x_name=”Pets”, y_name=”Millions”, legend=legend) Horizontal Bar Chart >>> x = [[20, 15, 10], [10, 7, 5], [3, 2, 1]] >>> bar = app.bar_chart(y=[“Dogs”, “Cats”, “Mouse”], x=x, title=”Horizontal BarChart”, x_name=”Millions”, y_name=”Pets”, legend=legend)

Bind compatibility

You can bind this widget with this: