Hi there, I have an app with several visualizations, and I’m not using an interaction manager at all, because in this case I don’t need to interact with visualizations and filters. I have a Text Search and what I’m needing is that when a search is performed, this one only applies for the RDT visualization. Any guidance?
Text Search - apply the text filter only for RDT
wrulh88
#2
Hi @developer_tree I think that could be useful if you take a look to the Events section in the chartfactor documentation, there is a textfilter
event for the Text Search visualization.
Hi @developer_tree, In this case as @wrulh88 said you can use the textfilter
event to achieve this. I think that the piece of code below could help you with your issue.
let ts = cf.provider('Provider_Name')
.source('source')
.graph('Text Search')
.on('textfilter', function(event){
var expression = event.data;
// Get all the visuals
var charts = cf.getAllVisualizations();
// Apply the expression to them.
// Here we can add any validation we want like sources, chart names...
charts.forEach(function(c){
if (c._chartType === 'Raw Data Table')
c.textfilter(expression).execute();
})
})
.element('v1')
.execute()
Hope this could help you.