Interactive Charts

0
Dear Mendix Community,   I am rather new to Mendix development and I am currently exploring the apps capabilities in terms of displaying data. I have already learned how to build charts with the AnyChart module based on the plotly.js library. My question is if it is also possible to make the data more interactive in terms of adding filters to a web page that also allow making multiple selections and having the charts update on runtime.   Hope someone can help me out :)   Ruben
asked
1 answers
0

Hi Ruben, 

When you already know how to work with the anychart module, this should be easy. 

Create a non persistent helper entity with attributes that contain the filter, f.e. a string search field and a enumeration field. 

Create a dataview with the helper entity on your page surrounding the chart widget, make sure the source is microflow and create/return the helper entity there. place the attributes from the helper entity in the dataview. 

Set an on change microflow to change actions of the attributes from the helper entity, make sure you refresh the helper entity in the on change event. This will also trigger the anychart data to refresh. 

Now when the anychart microflow, that creates the json, is refreshed, you should be able to add the helper entity here as argument to this microflow and use the values here to filter data.

answered