6
6
extension : .md
7
7
format_name : markdown
8
8
format_version : ' 1.1'
9
- jupytext_version : 1.1.7
9
+ jupytext_version : 1.2.1
10
10
kernelspec :
11
11
display_name : Python 3
12
12
language : python
@@ -20,7 +20,7 @@ jupyter:
20
20
name : python
21
21
nbconvert_exporter : python
22
22
pygments_lexer : ipython3
23
- version : 3.6.5
23
+ version : 3.7.3
24
24
plotly :
25
25
description : How to add text labels and annotations to plots in python.
26
26
display_as : file_settings
@@ -522,9 +522,9 @@ This template string can include `variables` in %{variable} format, `numbers` in
522
522
import plotly.graph_objects as go
523
523
524
524
fig = go.Figure(go.Pie(
525
- values = [2 , 5 , 3 , 2.5 ],
526
- labels = [" R " , " Python " , " Java Script " , " Matlab " ],
527
- texttemplate = " %{label} : %{value} (%{percent} )" ,
525
+ values = [40000000 , 20000000 , 30000000 , 10000000 ],
526
+ labels = [" Sales " , " Profit " , " Income " , " Expenses " ],
527
+ texttemplate = " %{label} : %{value: $,s} <br> (%{percent} )" ,
528
528
textposition = " inside" ))
529
529
530
530
fig.show()
@@ -565,7 +565,7 @@ fig.add_trace(go.Funnel(
565
565
y = [" 2018-01-01" , " 2018-07-01" , " 2019-01-01" , " 2020-01-01" ],
566
566
x = [100 , 60 , 40 , 20 ],
567
567
textposition = " inside" ,
568
- texttemplate = " %{label } " ))
568
+ texttemplate = " %{y| %a . %_d %b %Y }" ))
569
569
570
570
fig.add_trace(go.Funnel(
571
571
name = ' Vancouver' ,
0 commit comments