cancel
Showing results for 
Search instead for 
Did you mean: 

MoveDimensionToRows

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

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.

Answers (3)

Answers (3)

former_member234401
Active Participant
0 Kudos

Hi

I had the same question https://answers.sap.com/questions/354037/lumira-designer-20-sp02-patch-1-ds-1movedimensiont.html?chi...

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é

0 Kudos

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

MustafaBensan
Active Contributor
0 Kudos

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.

0 Kudos

Sorry images missing