Example of Accumulation Legend Template in React Chart Component

/
/
AccumulationLegendTemplate

This sample demonstrates custom legend templates in a pie chart visualizing the world's top 5 oil-producing countries — United States, Saudi Arabia, Russia, Canada, and China. Each pie segment reflects the percentage share of production, and the legend displays country flags and daily output in millions of barrels.

More Details...

Loading....
Description

This sample uses the template property of legendSettings to fully customize legend items. The legendRender event dynamically injects country-specific data — including flag images, color-matched labels, and production volumes — into the legend template at render time.

Injecting Module

Accumulation Chart component features are segregated into individual feature-wise modules. To use the legend and tooltip, inject AccumulationLegend and AccumulationTooltip into services.

More information on legend customization in accumulation charts can be found in the documentation.