New to Kendo UI for Angular? Start a free 30-day trial
Dynamically Configure the Series Labels in the Chart Component
Updated over 6 months ago
Environment
| Product | Progress® Kendo UI® for Angular Charts |
Description
How can I dynamically configure the series labels in the Kendo UI for Angular Charts?
Solution
-
Define a callback for a specific series labels property, such as
colororposition. Use the$any()type casting to avoid type errors. -
Evaluate the
dataItemand return the appropriate value for the label property. Keep in mind that the appropriate value could either be a specific value contained within thedataItemor a value determined by a certain condition depending on the application requirements.
The following example demonstrates how to dynamically set the color and position of a label based on a data collection that includes the required values.
Change Theme
Theme
Loading ...