Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
gmocontreras
Contributor II
Contributor II

Refresh filters when clicking on a graphic in the mashup

Hello friends,
I come to you for help. I have 3 select elements (filters) in my mashup which shows a list of countries and cities.
I also have 2 bar graphs where it shows me the countries and cities.

What I need to do is capture the click event of the city chart and call the method that fills the select elements (filters).

I have been reading but the only one I found was the changed event, the problem is that if I click on the cities graph the event is executed for the 2 graphs and therefore I am calling 2 times the method that fills the country filters and cities.

As a summary, whenever I click on any of the graphs, it always calls the 2 changed events

app.getObject("QV07","WhLUKF").then(function(genericObject) {
  genericObject.on("changed", function() {
    loadFilters();
  });
});
app.getObject("QV02","jjAdHe").then(function(genericObject1) {
  genericObject1.on("changed", function() {
    loadFilters();
  });
});

I appreciate your help.

Labels (4)
0 Replies