Skip to content

Commit

Permalink
Work for #163 - allow grouping for the matrices with one row only
Browse files Browse the repository at this point in the history
  • Loading branch information
T_S_V committed Jan 25, 2022
1 parent 098b61f commit cff26c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/visualizationMatrixDropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class VisualizationMatrixDropdown extends VisualizerBase {
options.seriesLabels = question.rows.map((row: ItemValue) => row.text);

const innerQuestions = this.getQuestions();
const canGroupColumns = innerQuestions.every(innerQuestion => Helpers.isArraysEqual(innerQuestion.choices, (<QuestionSelectBase>this.question).choices));
const canGroupColumns = options.seriesValues.length == 1 && innerQuestions.every(innerQuestion => Helpers.isArraysEqual(innerQuestion.choices, (<QuestionSelectBase>this.question).choices));
if (canGroupColumns) {
var creators = VisualizationManager.getVisualizersByType("matrixdropdown-grouped");
this._matrixDropdownVisualizer = new creators[0](this.question, [], options);
Expand Down

0 comments on commit cff26c7

Please sign in to comment.