Function: applyTextCase()
ts
function applyTextCase(text, textcase): string;Experimental
Apply a Plotly font.textcase: upper / lower (locale-independent toUpperCase / toLowerCase), word caps (the first letter of each word is uppercased, the rest left as is, like CSS capitalize), or normal / unset (unchanged).
Parameters
| Parameter | Type |
|---|---|
text | string |
textcase | TextFontTextCase | undefined |
Returns
string
Example
ts
applyTextCase('élan vital', 'word caps'); // 'Élan Vital'