How to implement multiple Pie Charts on the same page?
Hello, I need to have multiple Pie Charts on the same page (and edit values for each pie chart individually). What should be my approach? This tutorial allows me to implement exactly what I need but only with one Pie Chart per page: https://docs.mendix.com/howto7/extensibility/charts-basic-create If I need to add multiple Pie Charts on the same page, should I create individual entities for each Pie Chart? How can I pass multiple entities to the same page – should I pass only one entity and get others by associations? How those associations should be set? I would be grateful for the advice on how to implement it, and example screenshots, that would demonstrate how the domain model should look like.
You can use the same entity but I guess you want to use different objects of this entity. You can only pass a single object to a page, that is correct, but you can have multiple dataviews. They can get the object from a datasource microflow.
You could also have a second wrapper entity that is associated 1-* to your chart entity, pass this wrapper to your page and show the associated chart objects in a listview or a template grid. This would make everything pretty flexible and the amount of charts could be dynamic.