Valid filters for source


#1

Hi, I’m working on creating an app with the chartfactor toolkit and I’m using multiple sources, some of the filters are applied to 2 or 3 sources at the same time due to the label settings, so it’s okay, but I have a chart custom that is not receiving filters from the interaction manager, I need to manually apply all the filters for the source of this chart, so is there a way to apply the filters by source? Or should I take the filters from the graphs filtered with the same source?


#2

Hey Actually, yes there is a way to do that, you can use the Interaction manager api to get the filters applied in a specific source, the function is called getFiltersAppliedToSource, you have to send your source name and provider name then you can use it like this:

const im = cf.getIManager();
const api = im.get('api');

api.getFiltersAppliedToSource('ticket_sales', 'Elastic Local').then(filtersAppliedToSource => {
    // do something with the filters
});

#3

I tried, and works good for me, thanks a lot, it really helps me