How is your experience with the OutSystems Community?
16
Views
5
Comments
Solved
How to create a doughnut chart for leave balance in OutSystems?

Hi everyone,

I am working on a leave management application in OutSystems. I have attached a sample OML containing the following entities:

  • Employee
  • LeaveType
  • LeaveBalance

I want to create a doughnut chart to display an employee's leave balance.

The doughnut chart should represent the total allocated leaves by showing:

  • Available Leaves
  • Consumed Leaves

I also want to display the available leave balance inside the doughnut chart.

I have attached my sample OML for reference.

employeeleave.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

also,

take a bit more care in your setup, there's a lot of typo's in the naming, and remaining and consumed are text ??

2021-09-06 15-09-53
Dorine Boudry
 
MVP

ok,

so what is the question you have?  What problem are you running into ?

2026-04-02 09-27-10
shanath vemula

I want to know how to create a doughnut chart in OutSystems that shows Available Leaves and Consumed Leaves from my LeaveBalance entity. I'm not sure how to implement this. 

2021-09-06 15-09-53
Dorine Boudry
 
MVP

also,

not sure why you do the count in the aggregate, it looks like that entity holds the grand total of total / used / remaining leave for a given employee per leave type, right.  So what are you counting ?

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

also,

take a bit more care in your setup, there's a lot of typo's in the naming, and remaining and consumed are text ??

2024-10-12 12-11-20
Kerollos Adel
Champion

Dear @shanath vemula  ,

I believe the issue is that the Aggregate is returning empty data, which is why the chart isn't displaying anything.

I modified your sample OML and attached an updated version. I only made a few changes so I could populate it with sample data and verify the solution.


To make it work in your application, you just need to:

1. Change the Employee dropdown to select the desired employee.

2. Replace that logic by binding it to the current logged-in user in your application.


After that, the Aggregate should return data correctly, and the doughnut chart will display the Available and Consumed leaves as expected.I hope this helps!

employeeleave.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.