Skip to main content
November 7, 2023
Question

Drillable pie chart with datasubset data

  • November 7, 2023
  • 3 replies
  • 0 views

Hello there!

I have some date as a data subset form and I need to create a pie chart which show which contract are overdue and which not .This pie chart need to be drilldown to a grid  which list only the contract on the selected category.

The data are these:

local!contrat: todatasubset({
a!map(id: 1,name: "Contract A",,deadline: today()-6,status: "Decline"),
a!map(id: 2,name: "Contract B",,deadline: today()-20,status: "Open"),
a!map(id: 3,name: "Contract C",,deadline: today()-2,status: "Draft"),
a!map(id: 4,name: "Contract D",,deadline: today()+28,status: "Open"),
a!map(id: 5,name: "Contract E",,deadline: today()-30,status: "Complete"),

},

How can I do the grouping with this format of data?

Thank you in advance

3 replies

mikes0011
Brainy
November 7, 2023

I'm not really clear what the pie char is for with this example data - what would it show?

For the drillablle - you can make each slice of the pie execute a SaveInto, relative to the data populating that slice.  It can push a value into a local variable, and then you can display pretty much anything you want elsewhere on the form when that local variable contains a value.  Have you tried this already?

November 8, 2023

Yes I do understand the drillable part, but I do not understand how to aggregate those data, for example where the deadline is earlier than today it measn that is overdue (today-deadline) otherwise the contract is on time. How to group with these data? Is there any way?

mikes0011
Brainy
November 9, 2023
I do not understand how to aggregate those data

I really have no clue as to the shape of your data or what aggregations you're hoping to accomplish.  My only advice there is to play around with running a!queryEntity with various aggregation options in the Expression Rule editor and see if you can come up with a query result that's sensible.  That is a whole separate issue from the meta-topic of "drillable pie chart" though - i assume you'll need to solve that first and then try to plug it into the pie chart. 

If you look around the documentation I would assume you can find various recipes showing different Query Aggregation techniques.