Styles: Writing-Mode and Glyph-Orientation-Vertical

Learn how to apply the writing-mode and glyph-orientation-vertical styles to your D3 elements.

We'll cover the following

writing-mode

The writing-mode style changes the orientation of the text so that it prints out top to bottom. It has a single option "tb" that accomplishes this. It is relatively limited in scope compared to the equivalent for CSS. But for the purposes of generating some text, it has a definite use.

The following code snippet creates a line of text that is now printed from top to bottom instead of left to right.

Get hands-on with 1400+ tech skills courses.