Filter on multiple fields with embedding SDK.
I think this is important for charts to tell an adequate story. With the dashboard 2 or more filters can be applied but when the chart is embedded only one filter can be applied. When using an authenticated login I need the possibility to restrict users on more than one condition without having multiple dashboards. For viewers on web app its also necessary to comb through the data easier.
-
johan commented
Hi Tom. So to explain our whole scenario. We do analytics for sporting events. So the events on the fields occur on specific areas on the field.
All the data per game is stored in an individual document.
When I embed the chart I give the coach the option to see his stats per game with the filter or with no filter it shows his average stats for the season.
After he selects a certain game he must have the option toe select certain areas on the field as well that will show him his scoring accuracy per game per area of the field. So although I know i can filter this out in the aggregation , that will mean i have to create a chart for each area that is then filterable by game , but then lets say I want to add a another filter to show the game , the scoring accuracy per area and then drill it down then to a specific players scoring accuracy for a specific game from a specific area of the field , you can see how it would become tedious and crowded on the page if the filtering was done beforehand in the aggregation for each of those scenarios. -
AdminTom (Product Manager, MongoDB) commented
Hi Johan - while you can only have a single filter document on an embedded chart, the document can be as complex a filter as you want, e.g:
{ foo: 1, bar: 'x', baz: { $gt: 4 } }
....or even
{ $or: [ { foo: 1 }, { bar: 'x', baz: { $gt: 4 } } ] }
Can you explain a scenario where this doesn't give you the required flexibility?