in iccube v6 reporting, I have a Template widget called « Map » hereafter that has some code that triggers an event :
Code inside the "Map, Options, After Render
" :
self.fireEvent(vizEventType.onSelection, new viz.event.SetSelectionEvent(members));
code inside JS, On Send Event
:
function(context, $box, type, args) {
context.fireEvent("MapZoneSelected",args)
return args;
}
In the Report JS :
function consumeEvent( context, event ) {
if (event.name == 'MapZoneSelected') {
var mapZoneSelected = event.value; // Just used to debug the passed values
}
}
So, I see the MapZoneSelected
event is well triggered…
In the Destination widget, do Set Selection
is defined to MapZoneSelected
But the widget doesn’t set it’s selection according to that event… there is a reaction, but it only clears any previous selection.
I can't figure out where I'm wrong...
I've created an example report for you with the widget template that sends selection events to the chart widget. Just click on bubbles and you will see selection applied on the chart widget(multisiection supported). You could test it here: