This is a migrated thread and some comments may be shown as answers.

Changing custom chart legend text color onLegendItemClick

2 Answers 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rebekah
Top achievements
Rank 1
Rebekah asked on 11 Jul 2018, 06:44 PM

I have created a custom legend based on this approach, and it works well. Is it possible to change the legend text color when the item is clicked and in it's "inactive" state? So far everything I have tried ends up changing the color of all the legend items and not just the one I clicked on. 

Thanks, 

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 13 Jul 2018, 06:53 AM
Hello,

You can set the text color based on the passed options. The passed color is automatically changed based on the active state - example. There is also an active field passed with the argument that can be used to determine if the item is currently active or not.

Regards,
Daniel
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Rebekah
Top achievements
Rank 1
answered on 13 Jul 2018, 04:06 PM
Awesome, worked like a charm. Thanks!
Tags
General Discussions
Asked by
Rebekah
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Rebekah
Top achievements
Rank 1
Share this question
or