Hello, I have a somewhat complex situation, I need to apply a filter and intercept it before it is applied to the visualizations and thus be able to change its value according to a certain criteria, is it possible? 
1 Like
Hey @dani yes it is, yo have to use some event in theInteraction manager, just let me show you an example:
if you donβt wnat to apply that filter you just have to use this:
const im = cf.getIManager();
im.on('filter:before-add', (data) => {
const myFilter = data.filters.find(
(f) => f._sender.type === 'Slicer'
);
if (myFilter) {
im.get('api').stopExecution();
}
}
but if you want to change something and apply your own filter you can do this:
const im = cf.getIManager();
im.on('filter:before-add', (data) => {
const slicerFilter = data.filters.find(
(f) => f._sender.type === 'Slicer'
);
if (slicerFilter && slicerFilter._values.includes('myCriteria')) {
// do something
}
}
1 Like
this is one of the reasons why i love chartfactor, thank you so much it really helps me
1 Like
Great!, that ssounds really good, and actually we are working on some new stuff each moth, so you are goint to se more interesting things