1
votes

I'm working on a Mendix app, and I need to display two or more Pie Charts on the page. The problem is, that in Mendix I can pass only one entity object to the page.

So if I want to show multiple Pie Charts, I have to create a "Wrapper" entity, associated with the Pie Chart entities, pass the Wrapper to the page, and access Pie Chart entities by association.

Sounds simple and it works perfectly with Data Grids! But the Pie Chart widgets remain empty, and I can't understand why.

What I have:

I have two entities for the two Pie Charts and a Wrapper entity associated with them. I pass this entity to the page in order to access associated entities by association.

enter image description here

I created some pages using which I can create new objects for the Pie Chart entities and save them in the database.

enter image description here

On the page where I want to display the Pie Charts, I added 2 Data View widgets and passed the Wrapper object to them using a microflow. Inside of each Data View, I added a second Data View and linked it with the corresponding Pie Chart entity by association. Inside of the second Data View widgets, I added the Pie Chart widgets.

enter image description here

The microflow:

enter image description here

One Pie Chart Widget settings (the second one is the same just linked to another Pie Chart entity):

enter image description here enter image description here

I also added Data Grid widgets for testing purposes. As you can see, Data Grid can access the data I entered, but the Pie Chart widgets remain empty. 

enter image description here

Why is it happening and how can I fix it?

1
@halfer Sorry, thank you for editing. Still, it is quite an urgent question though :)Rumata

1 Answers

0
votes

You are retrieving data from database, but from what I see in the microflow, you are creating the entity but not committing it into the database. Consider also using a microflow instead of retrieving from database, if you want. Passing the external object to the microflow and let it go out as a tunnel is enough to show your data inside the pie chart :)