You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/text-and-annotations.md
+105Lines changed: 105 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -446,6 +446,111 @@ fig.show()
446
446
[scattergl](https://plotly.com/python/reference/scattergl) traces do not support all numeric font weights. Font weights up to 500 are mapped to the keyword font weight "normal", while weights above 500 are mapped to "bold".
447
447
448
448
449
+
## Text Case
450
+
451
+
**New in 5.23**
452
+
453
+
You can configure text case using the `textfont.textcase` property. In this example, we set `textfont.textcase="upper"` to transform the text on all bars to uppercase.
# Set to lower" for lowercase text, or "word caps" to capitalize the first letter of each word
474
+
textcase="upper"
475
+
476
+
)
477
+
),
478
+
layout=go.Layout(
479
+
title_text='Country with Highest Life Expectancy per Continent, 2007',
480
+
yaxis=dict(showticklabels=False)
481
+
)
482
+
)
483
+
484
+
fig.show()
485
+
```
486
+
487
+
## Text Lines
488
+
489
+
**New in 5.23**
490
+
491
+
You can add decoration lines to text using the `textfont.lineposition` property. This property accepts `"under"`, `"over"`, and `"through"`, or a combination of these separated by a `+`.
lineposition="under"# combine different line positions with a "+" to add more than one: "under+over"
510
+
)
511
+
),
512
+
layout=go.Layout(
513
+
title_text='Country with Highest Life Expectancy per Continent, 2002',
514
+
yaxis=dict(showticklabels=False)
515
+
)
516
+
)
517
+
518
+
fig.show()
519
+
```
520
+
521
+
## Text Shadow
522
+
523
+
**New in 5.23**
524
+
525
+
You can apply a shadow effect to text using the `textfont.shadow` property. This property accepts shadow specifications in the same format as the [text-shadow CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow).
0 commit comments