cancel
Showing results for 
Search instead for 
Did you mean: 

DS 1.6 InfoChart .setDataSelection function doesn't work for InfoChart

Former Member
0 Kudos

Hello all,

The function .setDataSelection which originally was applied to Chart objects has been set up for InfoChart objects. But it is not working and no error is thrown.

Yes I am aware the syntax has been changed. The new syntax works for charts but not for InforChart.

The codes behind the buttons are:

INFOCHART_1.setDataSelection({"(MEASURES_DIMENSION)":["_SZZ3sH8FEeWtfaOvVorKIg",,"_SZaewH8FEeWtfaOvVorKIg"]});

CHART_1.setDataSelection({"(MEASURES_DIMENSION)":["_SZZ3sH8FEeWtfaOvVorKIg","_SZaewH8FEeWtfaOvVorKIg"]});

After clicking both I get this result:

Feel free to experiment for yourself but I think this is a bug and needs to be resolved in next Patch, as it is an important feature which all experimented developers use because it helps in using fewer objects in an application. I use it quite often to be honest.

Best regards,

Bogdan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Popescu,

Check out this Blog's comments.

In this, look for Etienne's comments where he says:

"This is a bug that slipped through the cracks and we're working on a fix at this very moment.

setDataSelection accepts either:

  • a JSON object: INFOCHART_3.setDataSelection({"0D_DBREGCOD":"80501"});
  • a JSON string: INFOCHART_3.setDataSelection('{"0D_DBREGCOD":"80501"}');

Passing a JSON object does not work in SP0, but the JSON string works fine, so a workaround for the moment is to add quotes to make it a string.

Let me know if that works. We're hoping to fix this is SP1."

Best Regards,

Gowtham S

Former Member
0 Kudos

Hi Gowtham,

Thanks. It is good that it is a known as a small issue and it has already a small correction.

PS: for those using universe as datasource ex:

For multiple selections:

INFOCHART_1.setDataSelection('{"(MEASURES_DIMENSION)":["_SZZ3sH8FEeWtfaOvVorKIg","_SZaewH8FEeWtfaOvVorKIg"]}');

OR single selection:

INFOCHART_1.setDataSelection('{"(MEASURES_DIMENSION)":"_SZZ3sH8FEeWtfaOvVorKIg"}');

Best regards,

Bogdan

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

I don't see where that method is listed in the SAP Help for InfoCharts for 1.6:

http://help.sap.com/businessobject/product_guides/AAD16/en/ds_16_user_en.pdf

I know the functionality is new, so maybe it will be added later?

Former Member
0 Kudos

Hello Tammy,

I think this is at page page 486.

Anyway it seems to be a known issue so it will be resolved in a further patch or release. As long as there is a very simple solution trick with the string single quotes we are safe for the moment

Regards,

Bogdan