TDG
TDG

Reputation: 1302

EXTJS Pie chart.. display top 10 values

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

Upvotes: 2

Views: 639

Answers (2)

catalinux
catalinux

Reputation: 1452

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.

Upvotes: 1

Dawid Mazur
Dawid Mazur

Reputation: 63

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.

Upvotes: 0

Related Questions