Unplanned
Last Updated: 04 Aug 2023 09:21 by Raphael
Raphael
Created on: 07 Jul 2023 02:42
Category: UI for ASP.NET AJAX
Type: Feature Request
0
RadHtmlChart preserve full view percentage

Right now when hiding individual entries in RadHtmlChart the percentage will change so that the visible items always add up to 100%.

For the data we're displaying, we need to have an option for the percentage to still be the original percentage.

For example. if there are five items that are 20% each, if I hide one I want the other four to remain at 20% and the total to now only add up to 80%.

The current behaviour would instead change these all to 25% each with the total being 100%, which for our purposes is displaying inaccurate data to the user.

8 comments
Raphael
Posted on: 04 Aug 2023 09:21

I've just worked out that I can use dataItem to access other fields and precalculate the percentage myself, or provide the total and calculate the percent in the client template.

As an example, 

#=kendo.format(\'{0:P2}\', value / dataItem.TOTAL_COUNT)#

 

For now this serves my purposes, although it would still be nice if there was support without needing to code this.

ADMIN
Attila Antal
Posted on: 03 Aug 2023 11:34

Raphael,

Fair enough. I was totally thinking that you use some APIs to hide individual series items within the same Series. 

Alright, thank you for the clarification. I think we have enough information on this.

Thank you!

Regards,
Attila Antal
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.
Raphael
Posted on: 03 Aug 2023 11:02
What I'm doing is clicking in the legend area which toggles a field on/off in the chart.
ADMIN
Attila Antal
Posted on: 03 Aug 2023 10:14

Raphael,

I understand there is no custom code. I just want clarification on the following statement "For example. if there are five items that are 20% each, if I hide one I want the other four to remain at 20% and the total to now only add up to 80%.".

More specifically, "if I hide one I want the other four to remain at 20%". -> I would like to know the steps you take here.

Regards,
Attila Antal
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.
Raphael
Posted on: 03 Aug 2023 10:04
Again, I have no custom code here. This is the RadHtmlChart behaviour when Stack100 is set.
ADMIN
Attila Antal
Posted on: 03 Aug 2023 10:00

Hi Raphael,

Thanks for the additional clarification. This gives us a better understanding, but to be able to see the large picture we would also need to see the code you have for hiding/showing items.

I look forward to hearing from you.

Regards,
Attila Antal
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.
Raphael
Posted on: 03 Aug 2023 09:37

What do you mean by the current calculations? At the moment I am performing no calculations, just binding data to the RadHtmlChart and it calculates the percentanges.

 

Am I correct that only "value" and "percentage" can be used in the display? If there are ways to access other fields in the datasource then I could easily perform the calculations myself and that would solve the issue.

ADMIN
Attila Antal
Posted on: 13 Jul 2023 12:20

Hi Raphael,

To better understand the case, can you please show us an example code that already does the calculations? We would like to see how the current implementation is done and based on that we will be able to share our feedback.

I look forward to hearing from you.

Regards,
Attila Antal
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.