Skip to content

ChartsText API

API reference docs for the React ChartsText component. Learn about the props, CSS, and other APIs of this exported module.

Component demos

Import

import { ChartsText } from '@mui/x-charts/ChartsText';
// or
import { ChartsText } from '@mui/x-charts';
Learn about the difference by reading this guide on minimizing bundle size.

Helper component to manage multiline text in SVG

Props

textRequired

Text displayed.

Type:string


lineHeight

Height of a text line (in em).

Type:number


needsComputation

If true, the line width is computed.

Type:bool


style

Style applied to text elements.

Type:object


The component cannot hold a ref.