Skip to content
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.

Demos

Import

import { ChartsText } from '@mui/x-charts/ChartsText';
// or
import { ChartsText } from '@mui/x-charts';
// or
import { ChartsText } from '@mui/x-charts-pro';

Learn about the difference by reading this guide on minimizing bundle size.



Helper component to manage multiline text in SVG

Props

NameTypeDefaultDescription
text*string-

Text displayed.

lineHeightnumber-

Height of a text line (in em).

needsComputationboolfalse

If true, the line width is computed.

styleobject-

Style applied to text elements.

The component cannot hold a ref.

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.