The React Chart supports titles and legends. You can use the related plugins to display these chart elements.
Title plugin includes only the
text property that accepts the chart’s title.
Legend plugin contains a list of legend items. Each item specifies a marker and label. The marker has the same color as the corresponding series, and the item label stores the series name.
Import the plugins listed above to set up a Chart with a legend and title.
You can customize a legend marker and title as demonstrated in the following example: