# Funnel chart

A funnel chart helps you visualize a linear process that has sequential connected stages. Each funnel stage (that is a horizontal bar) can be used to represent a percentage of the total, or the effective number for that stage.

## The Method To Use <a href="#the-method-to-use" id="the-method-to-use"></a>

The method is `s.plt.funnel()`

It must contain the following input variables:

```python
order: int
names: str
values: str
data: Union[str, DataFrame, List[Dict]]
```

And accepts the following input variables as optional:

```python
title: Optional[str]
rows_size: Optional[int] 
cols_size: Optional[int]
padding: Optional[List[int]]
option_modifications: Optional[Dict]
```

#### Video demonstration of the Funnel chart <a href="#video-demonstration-of-the-funnel-chart" id="video-demonstration-of-the-funnel-chart"></a>

{% embed url="<https://www.loom.com/share/4b31d99c038f4b23a43e592e2cc856e2?sharedAppSource=team_library>" %}

The Funnel chart setting and usage.

## Examples <a href="#examples" id="examples"></a>

### 1. Default Configuration <a href="#id-1.-default-configuration" id="id-1.-default-configuration"></a>

```python
data = [
    {
        "value": 60,
        "name": "Third"
    },
    {
        "value": 40,
        "name": "Fourth"
    },
    {
        "value": 20,
        "name": "Fifth"
    },
    {
        "value": 80,
        "name": "Second"
    },
    {
        "value": 100,
        "name": "First"
    }
]

s.plt.funnel(
    data=data, names='name', values='value', order=0,
)
```

![The funnel chart is in the default configuration.](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FugUXu3blGeceXpaPINy0%2FFunnel\(2\).png?alt=media\&token=eeb77671-c886-4c9c-82f7-e462f5bdf9f0)

### 2. Customization And Context <a href="#id-2.-title-for-the-chart-and-changing-data" id="id-2.-title-for-the-chart-and-changing-data"></a>

```python
data = [
    {
        "value": 50,
        "name": "Clicked"
    },
    {
        "value": 30,
        "name": "Analysis"
    },
    {
        "value": 60,
        "name": "Negotiations"
    },
    {
        "value": 90,
        "name": "Viewed"
    },
    {
        "value": 100,
        "name": "Prospected"
    },
    {
        "value": 10,
        "name": "Closed Sales"
    },
]

s.plt.funnel(
    data=data, order=0,
    names='name', values='value',
    rows_size=2, cols_size=7,
    padding='0,0,0,2', title='Stage',
)
```

![Note the space before the component using padding='0,0,0,2', and its size with  cols\_size=7.](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F7X1V2pfNO1OzHJUOudaF%2FFunnel%20Configured.png?alt=media\&token=f1cb268f-9062-4b0d-a550-2e7924f3bcf8)

{% hint style="info" %}

### Featured Content

[changing-the-menu-path](https://docs.shimoku.com/dev/building-web-app/menu/changing-the-menu-path "mention")\
The `menu_path` can be modified.<br>

[using-the-grid](https://docs.shimoku.com/dev/building-web-app/grid/using-the-grid "mention")

It is possible to use any number of rows.
{% endhint %}
