Skip to Content

MoveDimensionToRows

Issue: The moveDimensionToRows does not replace the existing dimension in the 0 position.

If start with Region as the dimension on the initial view, Region is in the 0 position.

And the chart works find. See X-axis only below

Next Step: change to view Sales Channels. Region should be replaced by Sales Channel as per the code above. The Sales Channel takes over the 0 position but the Region is pushed to 1.

And as would be expected the chart has both dimensions

This worked on Design Studio 1.6 SP4. When we moved to Lumira the issue appeared.

The documentation states

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Aug 24, 2017 at 02:17 AM

    Hi James,

    As per the documentation you've highlighted, existing dimensions are only replaced if you specify the optional position parameter. Based on your code, it seems you are not using the position parameter so the behaviour is as expected.

    The swapDimensions() method may be more appropriate for your requirement.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 23, 2017 at 04:59 PM

    Sorry images missing

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 24, 2017 at 01:35 PM

    Mustafa,

    Thank you for your idea of .swapDimensions(). It has solved my problem.

    Please note that the code I used in Design Studio above does use the optional position attribute of 0. It worked perfectly in Design Studio but does not work in Lumira Designer.

    Best Regards

    Jim

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jim,

      Sorry, I misread your original example and now see what you mean. It looks like you've uncovered a Lumira Designer bug so you may wish to raise it in an SAP Support ticket.

      Regards,

      Mustafa.

  • Feb 08 at 08:13 PM

    Hi

    I had the same question https://answers.sap.com/questions/354037/lumira-designer-20-sp02-patch-1-ds-1movedimensiont.html?childToView=426673&answerPublished=true#answer-426673

    and there is a bug -

    2601643 - Script APIs moveDimensionToRows and moveDimensionToColumns behaves incorrectly in Lumira 2.x opposed to Design Studio 1.x

    Br

    René

    Add comment
    10|10000 characters needed characters exceeded