Line and Bar

This hybrid chart fuses the visual appeal of both line and bar graphs. While the line graph depicts the trend or continuous data, the bars offer a clear representation of discrete data points. The dual y-axis design facilitates the comparison of two related but differently scaled sets of data. This configuration is especially helpful when one wants to showcase a correlation or interaction between two distinct yet interconnected data sets.

The Method To Use

The method is s.plt.line_and_bar_charts()

It must contain the following input variables:

order: int
x: str
data: Union[str, DataFrame, List[Dict]]

And accepts the following input variables as optional:

bar_names: Optional[List[str]] = None
line_names: Optional[List[str]] = None
x_axis_name: Optional[str] = None
bar_axis_name: Optional[str] = None
bar_suffix: Optional[str] = None,
line_axis_name: Optional[str] = None
line_suffix: Optional[str] = None
title: Optional[str] = None
rows_size: Optional[int] = None
cols_size: Optional[int] = None
padding: Optional[List[int]] = None
option_modifications: Optional[Dict] = None
variant: Optional[str] = None

Examples

The following code:

Variants

By setting the parameter variant to the following values the appearance of the chart can be changed:

variant="clean"

Last updated

Was this helpful?