Skip to content

Commit c26af7b

Browse files
committed
Update funnel-charts.md
1 parent 30a55a3 commit c26af7b

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

doc/python/funnel-charts.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.2'
9-
jupytext_version: 1.3.0
8+
format_version: '1.3'
9+
jupytext_version: 1.14.6
1010
kernelspec:
11-
display_name: Python 3
11+
display_name: Python 3 (ipykernel)
1212
language: python
1313
name: python3
1414
plotly:
@@ -200,6 +200,26 @@ fig.update_layout(
200200
fig.show()
201201
```
202202

203+
### Pattern Fills
204+
205+
*New in 5.15*
206+
207+
Funnel area charts support [patterns](/python/pattern-hatching-texture/) (also known as hatching or texture) in addition to color. In this example, we add a pattern to the second stage of the funnel.
208+
209+
```python
210+
from plotly import graph_objects as go
211+
212+
colors = ["gold", "gold", "lightgreen", "lavender"]
213+
214+
fig = go.Figure(go.Funnelarea(
215+
labels = ["Interview 1","Interview 2", "Test", "Final Stage"],
216+
values = [100, 70, 40, 20],
217+
textfont_size=20,
218+
marker={"colors":colors, "pattern": {"shape": ["", "/", "", ""]}},
219+
))
220+
fig.show()
221+
```
222+
203223
#### Reference
204224

205225
See [function reference for `px.(funnel)`](https://plotly.com/python-api-reference/generated/plotly.express.funnel) or https://plotly.com/python/reference/funnel/ and https://plotly.com/python/reference/funnelarea/ for more information and chart attribute options!

0 commit comments

Comments
 (0)