- Home
- Forum
- Angular - EJ 2
- Accumulation chart
Accumulation chart
Dear sir,
Attachment: semipie_7c776f77.zip
I tried accumulation control for creating semi pie chart working fine.but in legend settings property xName value is showing.I want Country name should visible in legend settings at same time in tooltip property xName,yName values should bind properly. Please give the instructions how to show country name in legend settings.
Regards,
Karthikeyan p
Attachment: semipie_7c776f77.zip
SIGN IN To post a reply.
5 Replies
SM
Srihari Muthukaruppan
Syncfusion Team
February 28, 2020 11:15 AM UTC
Hi Karthikeyan,
We have analyzed your query. From that, we would like to let you know that we can achieve your requirement using “legendRender” event in the chart. Based on your requirement we have also prepared the sample for your reference. Please find the below sample, code snippet and screenshot.
Code Snippet:
|
// add additional code here
public count = 0;
public legendRender(args: IAccLegendRenderEventArgs): void {
args.text = this.data[this.count]["x"];
this.count++;
}
// add additional code here |
Screenshot:
Let us know if you need further assistance.
Regards,
Srihari M
KA
Karthikeyan
February 28, 2020 01:20 PM UTC
Dear team,
Attachment: screenshots_cf04dd18.zip
Thanks for your response, I ran your code working fine as i expected but only thing is when i refresh the page or tried to inspect the page,legend names are changing in sample as well as in my code.
suggest me not to change legend names when page refresh.
Regards,
karthikeyan p
Attachment: screenshots_cf04dd18.zip
DG
Durga Gopalakrishnan
Syncfusion Team
March 2, 2020 12:06 PM UTC
Hi Karthikeyan,
We have analyzed your query. Since, count value is higher than chart data point length, x value is not accessible on chart resize and legend names are changes. We have reset the count value in legendRender event and modified the sample. Please check with the below code snippet and sample.
Code Snippet
|
public legendRender(args: IAccLegendRenderEventArgs): void {
if(this.count == this.data.length)
this.count = 0;
args.text = this.data[this.count]["x"];
this.count++;
} |
Sample
Kindly revert us, if you have any concerns.
Regards,
Durga G
KA
Karthikeyan
March 2, 2020 12:33 PM UTC
Dear team,
Thanks for your response, I ran your code working fine as i expected.
Regards,
karthikeyan p
BP
Baby Palanidurai
Syncfusion Team
March 3, 2020 05:20 AM UTC
Hi Karthikeyan,
Most welcome. Please revert us, if you have any concerns. We are always happy to assist you.
Regards,
Baby.
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
KA Karthikeyan
- Feb 27, 2020 10:41 AM UTC
- Mar 3, 2020 05:20 AM UTC