Charts - Label
Label is the text reference of a series or data.
Basic display
To set a series' label, you can pass in a string as a series' property label.
The provided label will be visible at different locations such as the legend, or the tooltip.
Conditional formatting
The label property also accepts a function allowing you to change the label content based on location.
The function receives location as its first argument which can have the following values:
Pie
The Pie chart behaves differently due to its nature. It has labels per slice instead of per series. It also has one more place where the label can be rendered.
Instead of receiving the label as part of the series.
It instead receives it as part of the data set inside a series.
Its location argument can have the following values:
API
See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.