Get series color in seriesClick event

1 Answer 60 Views
Charts
CC
Top achievements
Rank 1
CC asked on 17 Jun 2022, 05:57 PM

Hi,

I used a pie chart and when click different series would call seriesClick event. How to get color of the series I click? The pie color is default and I did not set color for the chart. Thank you.

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 21 Jun 2022, 11:57 PM

Hi Yu,

In order to get the series color on seriesClick event in the Kendo UI Pie Chart, check the options value of the Series Point. For example:

public seriesClick(e) {
  console.log(e.point.options.color);
}

In this StackBlitz example, you can get the default series color on seriesClick event in the Pie Chart.

I hope this information helps.

Regards,
Hetali
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

CC
Top achievements
Rank 1
commented on 22 Jun 2022, 01:21 PM

This works! Thank you!
Tags
Charts
Asked by
CC
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or