on 02-18-2018 10:41 AM
Hi Experts.
Using the radio button I am swapping X Axis Dimensions from both graphs.
It’s working on the left graph. But it’s not working on the right graph (Stacked Column Chart)
Dimension in Stacked Column Chart is under Color as shown below in Pic 1. in my Case, " Region"
Using this code to delete X axis dimensions first and then moving radio button selected dimension into rows
var selectedValue = P1_RADIO.getSelectedValue();
DS1.getDimensions(Axis.ROWS).forEach(function(dimension, index) {
DS1.removeDimension(dimension);
});
DS1.moveDimensionToRows(selectedValue);
Hi
Instead of remove the dimension and then adding the new one try
DS_1.swapDimensions(dimension1, dimension2)
the moveDimensionToRows(selectedValue,0) is not currently working as intended - should be corrected in week 11 (Lumira 2.1 SP01)
And when you use the foreach statement to find the dimension on the rows - there should only be one dimension in that row - put the other dimensions in the columns in the datasource (DS_1)
Br
René
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks René, For your response.
I someone got it working using the following code. i cleared the Columns and moved the dimension into Columns. Although the actual dimension is under " Color" in Stacked Column chart it still worked.
var selectedValue = P1_RADIO.getSelectedValue();
P1_CH1.getDimensions(Axis.ROWS).forEach(function(dimension, index) { P1_CH1.removeDimension(dimension); });
P1_CH1.moveDimensionToRows(selectedValue);
P1_CH2.getDimensions(Axis.COLUMNS).forEach(function(dimension, index) { P1_CH2.removeDimension(dimension); });
P1_CH2.moveDimensionToColumns(selectedValue);
P1_CH2.getDimensions(Axis.COLUMNS).forEach(function(dimension, index) { P1_CH2.removeDimension(dimension); }); P1_CH2.moveDimensionToColumns(selectedValue);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.