2
votes

In EXTJS PIE Chart i want to sort top 10 values and display in Descending order.

Currently it gets all records from store and displays. I need only top 10.

Can anyone guide me to solve this issue?

Thanks

2

2 Answers

1
votes

I do not think it's' pie charts' job to show top 10 values. you should provide a process that will transofrm the original store in what you really need. A plugin that replaces the original store might be an ideea.

0
votes

You can try sorting and filtering the store. I manipulated example code in ExtJS docs and figured, that data is displayed by given order. Maybe if you apply sorter to store you might get desired effect. As for filtering: find min value of top ten values and apply filter that leaves only values above it. Might work, but I haven't tried it.