How a user can choose which 2 attributes of an entity to display in chart?
Hello, I am quite new to Mendix and I have problems to solve this task. The situation is that I have an entity with several attributes and I want to display the data in a chart. However, I want to allow the user to choose with attribute to display in x-axis and which attribute to display in y-axis (maybe by using a dropdown?). However the main problem is with the chart. I don’t know how I can change the attributes of the chart according to the users choice. Could you give any advice on how I can achieve this? Thank you!
I would use contitional visibility based on the chosen chart. Create an enumeration with the options for the dropdown and then you can use this enumeration for the conditional visibilty to show the correct chart.
Then use MxModelreflection to retrieve all the attributes and show those in the dropdown. Use a reference selector to connect the chosen attribute. For the graph use a microflow as source and based on the chosen attribute create the graph.