React PieChart - series.label
An object defining the label configuration options.
Each series point can be accompanied by a text label that represents data related to the point. These are called series point labels. Use the label object's properties to set label options for the series.
argumentFormat
Formats the point argument before it is displayed in the point label. To format the point value, use the format option.
See Also
- format - provides a comprehensive overview of formatting capabilities.
- Data Formatting - shows how to apply formatting to various widget elements.
backgroundColor
Colors the point labels' background. The default color is inherited from the points.
This option supports the following colors:
- Hexadecimal colors
- RGB colors
- RGBA colors
- Predefined/cross-browser color names
- Predefined SVG colors
- Paint server address
You can remove the label's background by setting this option to "none". In this case, the label's text is the same color as the point.
border
Specifies border options for point labels.
Use this object to make the borders of point labels visible/invisible and set up border options such as color and width.
connector
Specifies connector options for series point labels.
A series point label can be placed separately near the represented point. To make the relationship between a label and its respective point clear, use a connector. Set the connector's visibility and appearance options using the connector object.
customizeText
Specifies a callback function that returns the text to be displayed by point labels.
Information on the series point.
The text for the label to display.
When implementing a callback function for this property, use the point value to be displayed in a label. In addition, you can use the argument of the currently displayed value. These values can be accessed using the following properties of the this object.
- value
Specifies the value of the represented point. - valueText
Specifies the value of the represented point with applied formatting if the format property is specified. - argument
Specifies the argument value of the represented point. - argumentText
Specifies the argument value of the represented point with applied formatting if the argumentFormat property is specified. - percent
Specifies the proportional value of the represented point in a floating point format. - percentText
Specifies the value of the represented point as a percentage with a precision of the format.percentPrecision option. - point.tag
Specifies the tag of the represented point.
this
keyword.See Also
position
Specifies a label position relative to the chart.
Use the PieChartLabelPosition
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Outside
, Inside
, and Columns
.
radialOffset
Specifies how to shift labels from their initial position in a radial direction in pixels.
rotationAngle
Specifies the angle used to rotate point labels from their initial position.
textOverflow
Specifies what to do with label texts that overflow the allocated space after applying wordWrap: hide, truncate them and display an ellipsis, or do nothing.
Use the VizTextOverflow
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Ellipsis
, Hide
, and None
.
wordWrap
Specifies how to wrap label texts if they do not fit into a single line.
The following modes are available:
"normal"
Text breaks only at allowed breakpoints (for example, a space between two words)."breakWord"
Words can be broken if there are no available breakpoints in the line."none"
Word wrap is disabled.
If the text overflows the container even after word wrap, the widget applies the textOverflow option.
Use the VizWordWrap
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Normal
, BreakWord
, and None
.
If you have technical questions, please create a support ticket in the DevExpress Support Center.