How to configure a datagrid2 with filters as datasource for a chart

0
I'm working on a requirement to show graphs corresponding to the data in a datagrid2. As because the user can filter the data grid, the data to include for the graphs is dynamic. Ideally I would like to use something like the listen to widget datasource, but this only seems to support the individual row selected and not the entire dataset in the datagrid.   Do people have a similar challenge? And if so, is there a way to solve this?
asked
2 answers
1

I don't believe there is a direct way of handling this, however, you could attempt to achieve a similar result with using the event-handlers on the input filters:

 

image.png

 

Using these filters, you can at least synchronize the filter-action to the datasource of the graphs.

 

Alternatively, you might want to consider avoiding the input filters directly, but instead using a page-wide filter using widgets such as combobox and other non-datagrid filters. You could in theory use these to create some filters, which then apply to both the datagrid2 and chart datasources. However, be wary of implementing such a method, since this will circumvent any optimizations done in the datagrid2 widget for optimizing network calls for fetching data.

answered
0

Following your suggestion I assume I could use the filter widget events to recalculate non-persistant entities which the graphs can listen too. This coud surely work.

 

Is there a way avoid using the non-persistant entities? I mean, can I bind the graphs directly to the same entity listed and filtered in the datagrid2?

 

answered