Summary Line

This design seamlessly integrates a line chart with a numerical indicator, all housed within a Bento box. The line chart provides a visual depiction of data trends over a specified period, enabling users to trace fluctuations or patterns. Adjacently placed below, the numerical indicator gives a metric or value, normally used for aggregates of the data shown in the line chart. The combination of these elements ensures that users get both an overarching view and specific insights, making this chart format particularly suited for dashboards or concise reports.

The Method To Use

The method is s.plt.top_bottom_line().

It must contain the following input variables:

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

Accepts the following input variables as optional:

y: Optional[Union[str, List[str]]] = None
description: str = ''
value: Union[str, float, int] = ''
rows_size: int = 2
cols_size: int = 2


The following code:

summary_data = [
    {'date': '28 days', 'x': 5},
    {'date': '21 days', 'x': 6},
    {'date': '14 days', 'x': 4},
    {'date': '7 days', 'x': 7},
    {'date': 'today', 'x': 3},
    data=summary_data, order=4, x='date', y='x',
    title='Total', description='Today', value=7.94

Last updated