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

Pie Charts: take top 10 records; sort biggest to smallest

3 Answers 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 24 Mar 2016, 05:54 PM

I am struggling to make our pie charts look good and be useful -- here are the two issues (somewhat related):

 

  • The pie chart is connected to the same data source as a crosstab report, with the same groupings. Sometimes there are 20+ rows of data, and I want to display them all in the crosstab, but would like to only display the biggest 10 items on the pie chart, with the rest grouped under "Other." Is this possible?
  • I would like to sort the order that wedges appear in the pie chart by size. Sorting by Field.MyNumber doesn't work because I actually want to sort on Sum(Field.MyNumber), but I get an error from the designer telling me I can't order by aggregate.

 

Are there solutions to these two items?

 

3 Answers, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 28 Mar 2016, 09:19 AM
Hello Jason,


We've answered your inquiry in the support thread you've opened.

Regards,
Ivan Hristov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zach
Top achievements
Rank 1
answered on 24 Mar 2017, 12:52 PM
What was the resolution to this issue?  It'd be much more helpful to everyone else if the solution was posted publicly 
0
Jason
Top achievements
Rank 1
answered on 24 Mar 2017, 01:16 PM

Hi Zach - good point.

 

For getting "Top N + Other" in the pie chart, there were two choices:

  1. There is no out-of-the-box functionality to enable the rest of the data rows to appear as "others" group in the chart. However, this grouping can be achieved using a group expression containing a conditional function that calculates the Top N lower bound data point.
  2. Another approach is to modify the data rows before passing them to the Graph item and add some of the rows to a new "others" group. This can be achieved using the ObjectDataSource Component.

I can't remember if I tried either of these. The reports as I view them today doesn't use the Top N feature and they're ugly. Apparently I explained the investment and performance hit required to accomplish this with Telerik Reports and the customer decided what we had was good enough.

For the sorting, the resolution was straight-forward: "You have to apply the sorting on the series group you're using in your PieChart. This will allow the series to be ordered by the evaluated result of the aggregate function you use in the sorting expression."

 

Hth,

Jason

 

 

Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Zach
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Share this question
or