Filtering a chart by day

0
Hi everyone!  I’m currently working on a app that shows the end-user some data in a chart, a column chart specifically and this data is previously entered by the user. The chart currently shows all of the data entered but I want the end user to be able to filter the chart by day, not the current day, but any day he wants.  What I want to achieve is that, when the user selects the day he wants, in a date picker, the graph shows the data of the selected date.  So my question is, is there any xpath constraint, for the chart, that could help me with this? Or how can I achieve this?    Thanks in advanced.  Edit: added pictures. This is my initial page, where all of the data is displayed in the chart and the button, which triggers a microflow, leads me to the page where the filtered chart will be displayed.  This is the microflow triggered by the button “Filter graph” And this is the page where the filtered graph will be displayed, the date picker has an on change event, it triggers a microflow but the microflow it’s still empty. 
asked
2 answers
1

Hi Kenya,

You could achieve it via following:

  1. Create a non persistent entity so that the user is able to select a date. Once the date is selected you might need to refresh in client
  2. Use a datasource microflow to change the input to your charts widget
  3. Add necessary logic & that’s it.

 

I have not really tried via XPath, but you could see if adding that in someway works, if not the above should work.

Hope this helps!

 

answered
0

Hi Kenya,

 

I believe there is small thing we are missing , please attach your errors and page you were working that will help to guide you. Along with you can check this points as well.

  1. Do you have already a data view in that page have data source as microflow?
  2. If no for the page you may have to pass non persistable entity and pass or need a data source flow to create your non persitable and return. Make sure you have date attribute in non persitable and enough roles for entity and microflow.
  3. Mendix will allows only 1 to * between persistable and non persistable i believe if no entity required to pass to your page then no need of association, for your chart data source microflow try to keep in input parameter of non persistable and refer that date for filter.
  4. Don’t forgot to add on change microflow on date picker and do refresh in client Yes.

    Hope this helps!
answered