Working with graphs and charts - Mendix Forum

Working with graphs and charts

0

I am working on an app where I am plotting Pie chart and other few graphs. Pie chart is kept in a dataview which listens to a grid. So each time new data is added/deleted, grid gets updated and so the charts.

Now I have added few search filters on grid. After clicking on search buttons, grid gets refreshed depending on the search input data. 

However, as Pie chart is reading data from database directly, it is not getting refreshed as database has actual data. Is there any way by which I can show the filtered data ?

asked
1 answers
0

I’ve had a similar problem when using some map widgets, where I wanted to display a non-committed list with locations on a map BEFORE committing, but the map required an XPath.

It could be worth making a duplicate “staging” table, in your domain model, where your pie chart reads from, and every time you refresh in your data grid, you commit the changes to your staging table. Then have a cleanup process (Like a leave action, or some kind of delete process when you enter the page) so you’re not just storing redundant duplicate data.

It’s not a perfect solution, and might not be ideal if you’re handling a massive amount of data, but this kind of solution has worked for me before, where I know the amount of data being handled is relatively low (no more than 200 rows).

answered