How to refresh PIECHART on the basis of reference selector?

0
Hello All, We have one use case:   I’m working on a Mendix app where I have a dropdown bound to a non-persistent helper entity. Based on the selected value from the dropdown, a microflow returns a filtered list of data for a pie chart. The microflow is working correctly and returns the expected filtered data. However, when I change the dropdown selection, the pie chart does not refresh or update. If We have to manually refresh the page, then correct data is display in the chart, but we don't want to hard refresh page. Thank you in advance.  Monika G.
asked
2 answers
0

You can try to put the pie chart inside a dataview, and refresh that object when the dropdown is being changed (on change event)

answered
0

Hi Monika,

            When the dropdown selection changes:

  • Use an on-change nanoflow or microflow.

  • In this flow:

    • Update the helper object’s selected value.

    • Recalculate the chart data (using a sub-microflow or similar).

    • Use a "Change Object" activity on the chart’s data source object and set Refresh in Client = true.

answered