on 05-02-2017 10:49 PM
Hello All,
I have searched this topic, but wasn't able to find a proper answer.
I have a datasource with four dimensions(rows) and multiple measures(columns). I have four chart types like line, bar etc. Each chart has same dimension but with a different measure. I am trying to put a dropdown or listbox which contains list of four dimension names like dim1, dim2, dim3 and dim4. I will select or choose dim1 from dropdown and should reflect the data in all four charts with the same dim1.
If i choose dim3, it should reflect the data in all four charts with dim3 and so on. i do not want to use navigation panel/filter panel component. i have tried some scripting but did not work fully. any ideas? thanks for your help.
regards, baggi
Hi Baggi,
Your requirement can be implemented with the following steps:
1. In the data source Initial View, make sure you have only the default dimension in the Rows pane and the measures in the columns, as shown in the example below:
2. Define a Global Script Variable of type String named vCurrentDim;
3. Define your Dropdown Box items to include your dimension value/text pairs as shown below:
4. Apply the following script code in the "On Startup" event of the application:
var myRowDims = DS_1.getDimensions(Axis.ROWS);
var myRowDim = myRowDims.pop(); // Assume only one dimension in row axis
vCurrentDim = myRowDim.name;
DROPDOWN_1.setSelectedValue(vCurrentDim);
5. Apply the following script code in the "On Select" event of your Dropdown Box:
var newDim = me.getSelectedValue();
DS_1.swapDimensions(newDim, vCurrentDim);
vCurrentDim = newDim;
6. The result looks like this:
Changing the dropdown selection should update the chart dimension axes accordingly.
Regards.
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Thanks for the quick reply. ds_1 initialview image contain all measures, have you used same ds_1 or multiple datasources to show different measur?. I selected toggle members(measures) to show different measurs on charts. regards,baggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.