Skip to Content
author's profile photo Former Member
Former Member

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

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

cumm.PNG (16.1 kB)
cumm1.PNG (19.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2015 at 09:23 AM

    Hi Popescu,

    Check out this Blog's comments.

    Introducing Info Charts in Design Studio 1.6

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Dec 14, 2015 at 06:48 PM

    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?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.