Hello, I am filtering certain content as if it were a search but not what I still do not achieve is to highlight those elements that coincide. My code is as follows:
BubbleChart.prototype.buscar = function(filterText) {
//filteredData = data;
element = d3.select(this);
filterText = filterText.toLowerCase();
if (filterText !== ""){
console.log("entro al IF");
//this.circles.filter(function(d) { return d.Nombre.toLowerCase().indexOf(filterText) === 0 }).style("fill",'#FFFFFF');
var test = this.data.filter(function(d) { return d.Nombre.toLowerCase().indexOf(filterText) === 0 });
//element.style("fill", "#red").style("stroke-width", 2.0).style("stroke", "#555");
console.log(test);
}
};
This is an example of the search I want to achieve: