Skip to content

Update plotly.js to 2.24.1 and add docs for new features #4210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
392f9fc
update to plotly.js 2.23.0
LiamConnors May 15, 2023
f2447a4
Update CHANGELOG.md
LiamConnors May 15, 2023
942d9c1
Update legend.md
LiamConnors May 15, 2023
7d91cb7
Update colorscales.md
LiamConnors May 17, 2023
c90fd1d
Update Plotly.js version to 2.23.1
LiamConnors May 17, 2023
ff43b73
Update legend.md
LiamConnors May 17, 2023
ff0a454
Update CHANGELOG.md
LiamConnors May 17, 2023
6cb115c
Update doc/python/colorscales.md
LiamConnors May 17, 2023
e496849
Merge branch 'master' into update-plotly-js
LiamConnors Jun 3, 2023
f578cbc
Update Plotly.js version to 2.24.0
LiamConnors Jun 6, 2023
507b25f
Update pie-charts.md
LiamConnors Jun 6, 2023
f2473db
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
04f682d
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
96a9430
Merge branch 'master' into update-plotly-js
LiamConnors Jun 6, 2023
30a55a3
Update CHANGELOG.md
LiamConnors Jun 6, 2023
c26af7b
Update funnel-charts.md
LiamConnors Jun 6, 2023
c24c060
Update pattern-hatching-texture.md
LiamConnors Jun 6, 2023
253fa4e
Update sunburst-charts.md
LiamConnors Jun 6, 2023
7570bbf
Update treemaps.md
LiamConnors Jun 7, 2023
a97b2b4
Update icicle-charts.md
LiamConnors Jun 7, 2023
96ae271
formatting
LiamConnors Jun 7, 2023
d92676c
Update icicle-charts.md
LiamConnors Jun 7, 2023
a2a2bf3
Update CHANGELOG.md
LiamConnors Jun 7, 2023
16e663a
update plotly.js to 2.24.1
LiamConnors Jun 7, 2023
a28a1c4
Update config.yml
LiamConnors Jun 7, 2023
4367763
Update CHANGELOG.md
LiamConnors Jun 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 29 additions & 3 deletions doc/python/pie-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.14.1
jupytext_version: 1.14.6
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
language_info:
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.8.8
version: 3.10.11
plotly:
description: How to make Pie Charts.
display_as: basic
Expand Down Expand Up @@ -300,6 +300,32 @@ fig.update_layout(title_text='World GDP')
fig.show()
```

### Pattern Fills

*New in 5.15*

Pie charts support [patterns](/python/pattern-hatching-texture/) (also known as hatching or texture) in addition to color.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have similar minimal examples for funnelarea, icicle, sunburst and treemap.
Thank you!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added


```python
import plotly.graph_objects as go

labels = ["Oxygen", "Hydrogen", "Carbon_Dioxide", "Nitrogen"]
values = [4500, 2500, 1053, 500]
colors = ["gold", "mediumturquoise", "darkorange", "lightgreen"]
fig = go.Figure(
data=[
go.Pie(
labels=labels,
values=values,
textfont_size=20,
marker={"colors": colors, "pattern": {"shape": [".", "x", "+", "-"]}},
)
]
)
fig.show()

```

### See Also: Sunburst charts

For multilevel pie charts representing hierarchical data, you can use the `Sunburst` chart. A simple example is given below, for more information see the [tutorial on Sunburst charts](/python/sunburst-charts/).
Expand Down
Loading