Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Lasso and Reverse Lasso are important workarounds in SAP BusinessObjects Design Studio. Using the Lasso selection functionality allows you to select a particular chart area and zoom into it. Reverse lasso is unique because allows you to remove a particular selection from the chart.  Learn more about them from:

Lasso – http://scn.sap.com/community/businessobjects-design-studio/blog/2014/12/12/design-studio-14-chart-en...
Reverse Lasso – http://visualbi.com/blogs/design-studio/general/reverse-lasso-in-sap-businessobjects-design-studio/

We have already seen that Lasso and Reverse Lasso can be implemented separately. However, we had a requirement to implement both of them at the same time. i.e one after the other. One of the limitations we encountered was that the selection on a chart is retained once we lasso and unless we do a clearSelection(), but clearSelection() triggers the onClick() of the chart component, thus clearing the lasso filters.

One approach was to use multiple charts and toggle visibility, but since the application had performance issues due to the number of components, we had to find a workaround while using a single chart to implement the required functionality.

Since we have previous blogs on how to implement lasso and reverse lasso, this blog will focus on how to integrate lasso and reverse lasso together in a single chart component. The logic is to append the Lasso elements with the Reverse Lasso elements and pass on the combined elements as a filter to get the expected outcome.

var members = CHART_1.getSelectedMembers(“ZR_STOKY__ZR_STKEY”);           //Getting selected members of the chart
if ( RADIOBUTTONGROUP_1.getSelectedValue()==”Lasso”) //Lasso or reverse lasso selection
{
lasso = “”;                                              //String to store the elements to global variable lasso
members.forEach(function(element, index) {
if (Convert.indexOf(lasso, element.internalKey)==-1)             //To add an element to the Lasso string if its not present, else omit it
{
lasso = lasso + element.internalKey+”;”; //If multiple entries of same element are present , it throws error when filtered
}
});
if (lasso!=””)  //Clear Selection triggers onSelect to prevent the clearing of filters
{
DS_1.setFilterExt(“ZR_STOKY__ZR_STKEY”, lasso+revlasso);   //Set filter on the dimension that include the lasso and Reverse lasso elements
}
}
else
{
members.forEach(function(element, index) {
if (Convert.indexOf(revlasso, element.internalKey)==-1)    //To add an element to the Reverse lasso global variable string if it’s not present, else omit it
{
revlasso = revlasso + “!”+element.internalKey+”;”;
}
});
DS_1.setFilterExt(“ZR_STOKY__ZR_STKEY”, revlasso+DS_1.getFilterExt(“ZR_STOKY__ZR_STKEY”)); //Set filter on the dimension that include the lasso and Reverse lasso elements
}
CHART_1.clearSelection(); //Clears the selection on the chart

Let’s consider a simple scenario :-

In the initial view we have sales for all the states.

Lasso is selected from the radio button and few members are selected for Lasso

The Selected members are filtered out and zoomed.

Now selected Reverse Lasso and selected all but 2 members on the chart to remove them.

We get the elements that were not selected now zoomed in.

This procedure can be done infinite times as per the user requirement.

To reset the selections a button to clear the filter on the particular dimension can be provided.

Source : http://visualbi.com/blogs/design-studio/general/continuous-lasso-reverse-lasso-sap-businessobjects-d...

Labels in this area