survey-analytics 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/fesm/shared.mjs +195 -187
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +12326 -0
  4. package/fesm/shared2.mjs.map +1 -0
  5. package/fesm/survey.analytics.core.mjs +10 -0
  6. package/fesm/survey.analytics.core.mjs.map +1 -0
  7. package/fesm/survey.analytics.mjs +149 -12063
  8. package/fesm/survey.analytics.mjs.map +1 -1
  9. package/fesm/survey.analytics.tabulator.mjs +3 -3
  10. package/package.json +17 -11
  11. package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +2 -0
  12. package/survey-analytics-tabulator.types/localizationManager.d.ts +2 -0
  13. package/survey-analytics-tabulator.types/utils/index.d.ts +1 -1
  14. package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +2 -0
  15. package/survey-analytics.types/analytics-localization/english.d.ts +2 -0
  16. package/survey-analytics.types/entries/summary.core.d.ts +35 -0
  17. package/survey-analytics.types/entries/summary.d.ts +1 -34
  18. package/survey-analytics.types/localizationManager.d.ts +2 -0
  19. package/survey-analytics.types/matrix.d.ts +0 -1
  20. package/survey-analytics.types/pivot.d.ts +62 -0
  21. package/survey-analytics.types/plotly/histogram.d.ts +0 -1
  22. package/survey-analytics.types/plotly/index.d.ts +1 -0
  23. package/survey-analytics.types/plotly/pivot.d.ts +12 -0
  24. package/survey-analytics.types/plotly/selectBase.d.ts +0 -1
  25. package/survey-analytics.types/selectBase.d.ts +1 -1
  26. package/survey-analytics.types/utils/index.d.ts +1 -1
  27. package/survey-analytics.types/visualizationManager.d.ts +3 -0
  28. package/survey-analytics.types/visualizerBase.d.ts +3 -1
  29. package/survey.analytics.core.css +430 -0
  30. package/survey.analytics.core.css.map +1 -0
  31. package/survey.analytics.core.js +15689 -0
  32. package/survey.analytics.core.js.map +1 -0
  33. package/survey.analytics.core.min.css +10 -0
  34. package/survey.analytics.core.min.js +2 -0
  35. package/survey.analytics.core.min.js.LICENSE.txt +22 -0
  36. package/survey.analytics.css +7 -1
  37. package/survey.analytics.css.map +1 -1
  38. package/survey.analytics.js +875 -316
  39. package/survey.analytics.js.map +1 -1
  40. package/survey.analytics.min.css +2 -2
  41. package/survey.analytics.min.js +1 -1
  42. package/survey.analytics.min.js.LICENSE.txt +1 -1
  43. package/survey.analytics.tabulator.css +1 -1
  44. package/survey.analytics.tabulator.js +10 -2
  45. package/survey.analytics.tabulator.js.map +1 -1
  46. package/survey.analytics.tabulator.min.css +1 -1
  47. package/survey.analytics.tabulator.min.js +1 -1
  48. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.2.1
2
+ * surveyjs - SurveyJS Dashboard library v2.2.3
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -7007,6 +7007,12 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
7007
7007
  this.visualizer.setState(state.state);
7008
7008
  }
7009
7009
  };
7010
+ AlternativeVisualizersWrapper.prototype.getValues = function () {
7011
+ return this.visualizer.getValues();
7012
+ };
7013
+ AlternativeVisualizersWrapper.prototype.getLabels = function () {
7014
+ return this.visualizer.getLabels();
7015
+ };
7010
7016
  AlternativeVisualizersWrapper.prototype.getCalculatedValues = function () {
7011
7017
  return this.visualizer.getCalculatedValues();
7012
7018
  };
@@ -7314,6 +7320,8 @@ var englishStrings = {
7314
7320
  npsPromoters: "Promoters",
7315
7321
  npsPassives: "Passives",
7316
7322
  npsDetractors: "Detractors",
7323
+ axisXSelectorTitle: "X axis:",
7324
+ axisYSelectorTitle: "Y axis:"
7317
7325
  };
7318
7326
  // Uncomment the lines below if you create a custom dictionary.
7319
7327
  // Replace "en" with a custom locale code (for example, "fr" or "de"),
@@ -8645,6 +8653,122 @@ function questionContainsValue(questionValue, filterValue) {
8645
8653
  }
8646
8654
  return true;
8647
8655
  }
8656
+
8657
+
8658
+ /***/ }),
8659
+
8660
+ /***/ "./src/entries/summary.core.ts":
8661
+ /*!*************************************!*\
8662
+ !*** ./src/entries/summary.core.ts ***!
8663
+ \*************************************/
8664
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8665
+
8666
+ "use strict";
8667
+ __webpack_require__.r(__webpack_exports__);
8668
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8669
+ /* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_27__.AlternativeVisualizersWrapper),
8670
+ /* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_19__.BooleanModel),
8671
+ /* harmony export */ DataProvider: () => (/* reexport safe */ _dataProvider__WEBPACK_IMPORTED_MODULE_14__.DataProvider),
8672
+ /* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_34__.DocumentHelper),
8673
+ /* harmony export */ HistogramModel: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.HistogramModel),
8674
+ /* harmony export */ Matrix: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_18__.Matrix),
8675
+ /* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_32__.NpsAdapter),
8676
+ /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_32__.NpsVisualizer),
8677
+ /* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_32__.NpsVisualizerWidget),
8678
+ /* harmony export */ NumberModel: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_16__.NumberModel),
8679
+ /* harmony export */ PivotModel: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_33__.PivotModel),
8680
+ /* harmony export */ PostponeHelper: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.PostponeHelper),
8681
+ /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
8682
+ /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_31__.StatisticsTable),
8683
+ /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_31__.StatisticsTableAdapter),
8684
+ /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_30__.Text),
8685
+ /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_30__.TextTableAdapter),
8686
+ /* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_22__.VisualizationManager),
8687
+ /* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_26__.VisualizationMatrixDropdown),
8688
+ /* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_25__.VisualizationMatrixDynamic),
8689
+ /* harmony export */ VisualizationPanel: () => (/* reexport safe */ _visualizationPanel__WEBPACK_IMPORTED_MODULE_23__.VisualizationPanel),
8690
+ /* harmony export */ VisualizationPanelDynamic: () => (/* reexport safe */ _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_24__.VisualizationPanelDynamic),
8691
+ /* harmony export */ VisualizerBase: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.VisualizerBase),
8692
+ /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_15__.VisualizerFactory),
8693
+ /* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_28__.WordCloud),
8694
+ /* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_28__.WordCloudAdapter),
8695
+ /* harmony export */ defaultStatisticsCalculator: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.defaultStatisticsCalculator),
8696
+ /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
8697
+ /* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
8698
+ /* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
8699
+ /* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_29__.textHelper)
8700
+ /* harmony export */ });
8701
+ /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
8702
+ /* harmony import */ var _analytics_localization_farsi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../analytics-localization/farsi */ "./src/analytics-localization/farsi.ts");
8703
+ /* harmony import */ var _analytics_localization_french__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../analytics-localization/french */ "./src/analytics-localization/french.ts");
8704
+ /* harmony import */ var _analytics_localization_german__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../analytics-localization/german */ "./src/analytics-localization/german.ts");
8705
+ /* harmony import */ var _analytics_localization_norwegian__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../analytics-localization/norwegian */ "./src/analytics-localization/norwegian.ts");
8706
+ /* harmony import */ var _analytics_localization_portuguese__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../analytics-localization/portuguese */ "./src/analytics-localization/portuguese.ts");
8707
+ /* harmony import */ var _analytics_localization_russian__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../analytics-localization/russian */ "./src/analytics-localization/russian.ts");
8708
+ /* harmony import */ var _analytics_localization_dutch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../analytics-localization/dutch */ "./src/analytics-localization/dutch.ts");
8709
+ /* harmony import */ var _analytics_localization_spanish__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../analytics-localization/spanish */ "./src/analytics-localization/spanish.ts");
8710
+ /* harmony import */ var _analytics_localization_italian__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../analytics-localization/italian */ "./src/analytics-localization/italian.ts");
8711
+ /* harmony import */ var _analytics_localization_arabic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../analytics-localization/arabic */ "./src/analytics-localization/arabic.ts");
8712
+ /* harmony import */ var _analytics_localization_japanese__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../analytics-localization/japanese */ "./src/analytics-localization/japanese.ts");
8713
+ /* harmony import */ var _analytics_localization_polish__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../analytics-localization/polish */ "./src/analytics-localization/polish.ts");
8714
+ /* harmony import */ var _analytics_localization_finnish__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../analytics-localization/finnish */ "./src/analytics-localization/finnish.ts");
8715
+ /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../dataProvider */ "./src/dataProvider.ts");
8716
+ /* harmony import */ var _visualizerFactory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../visualizerFactory */ "./src/visualizerFactory.ts");
8717
+ /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../number */ "./src/number.ts");
8718
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
8719
+ /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../matrix */ "./src/matrix.ts");
8720
+ /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
8721
+ /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../histogram */ "./src/histogram.ts");
8722
+ /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../visualizerBase */ "./src/visualizerBase.ts");
8723
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
8724
+ /* harmony import */ var _visualizationPanel__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../visualizationPanel */ "./src/visualizationPanel.ts");
8725
+ /* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
8726
+ /* harmony import */ var _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../visualizationMatrixDynamic */ "./src/visualizationMatrixDynamic.ts");
8727
+ /* harmony import */ var _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../visualizationMatrixDropdown */ "./src/visualizationMatrixDropdown.ts");
8728
+ /* harmony import */ var _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../alternativeVizualizersWrapper */ "./src/alternativeVizualizersWrapper.ts");
8729
+ /* harmony import */ var _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../wordcloud/wordcloud */ "./src/wordcloud/wordcloud.ts");
8730
+ /* harmony import */ var _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../wordcloud/stopwords/index */ "./src/wordcloud/stopwords/index.ts");
8731
+ /* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../text */ "./src/text.ts");
8732
+ /* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
8733
+ /* harmony import */ var _nps__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../nps */ "./src/nps.ts");
8734
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
8735
+ /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
8736
+
8737
+ //localization
8738
+
8739
+
8740
+
8741
+
8742
+
8743
+
8744
+
8745
+
8746
+
8747
+
8748
+
8749
+
8750
+
8751
+
8752
+
8753
+
8754
+
8755
+
8756
+
8757
+
8758
+
8759
+
8760
+
8761
+
8762
+
8763
+
8764
+
8765
+
8766
+
8767
+
8768
+
8769
+
8770
+
8771
+
8648
8772
 
8649
8773
 
8650
8774
  /***/ }),
@@ -8729,6 +8853,7 @@ var HistogramModel = /** @class */ (function (_super) {
8729
8853
  _this._continiousData = undefined;
8730
8854
  _this._cachedIntervals = undefined;
8731
8855
  _this._intervalPrecision = 2;
8856
+ _this._transposeData = false;
8732
8857
  if (_this.options.intervalPrecision !== undefined) {
8733
8858
  _this._intervalPrecision = _this.options.intervalPrecision;
8734
8859
  }
@@ -9276,7 +9401,9 @@ __webpack_require__.r(__webpack_exports__);
9276
9401
  var Matrix = /** @class */ (function (_super) {
9277
9402
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(Matrix, _super);
9278
9403
  function Matrix(question, data, options, name) {
9279
- return _super.call(this, question, data, options, name || "matrix") || this;
9404
+ var _this = _super.call(this, question, data, options, name || "matrix") || this;
9405
+ _this._transposeData = true;
9406
+ return _this;
9280
9407
  // this.getAnswersData();
9281
9408
  }
9282
9409
  Object.defineProperty(Matrix.prototype, "matrixQuestion", {
@@ -9359,17 +9486,6 @@ var Matrix = /** @class */ (function (_super) {
9359
9486
  }
9360
9487
  return result;
9361
9488
  };
9362
- Matrix.prototype.getCalculatedValuesCore = function () {
9363
- var statistics = _super.prototype.getCalculatedValuesCore.call(this);
9364
- var series = this.getSeriesValues();
9365
- var values = this.getValues();
9366
- var preparedData = [];
9367
- values.forEach(function (val, valueIndex) {
9368
- var seriesData = series.map(function (seriesName, seriesIndex) { return statistics[seriesIndex][valueIndex]; });
9369
- preparedData.push(seriesData);
9370
- });
9371
- return preparedData;
9372
- };
9373
9489
  return Matrix;
9374
9490
  }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
9375
9491
 
@@ -9810,6 +9926,416 @@ var NumberModel = /** @class */ (function (_super) {
9810
9926
 
9811
9927
 
9812
9928
 
9929
+ /***/ }),
9930
+
9931
+ /***/ "./src/pivot.ts":
9932
+ /*!**********************!*\
9933
+ !*** ./src/pivot.ts ***!
9934
+ \**********************/
9935
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9936
+
9937
+ "use strict";
9938
+ __webpack_require__.r(__webpack_exports__);
9939
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9940
+ /* harmony export */ PivotModel: () => (/* binding */ PivotModel)
9941
+ /* harmony export */ });
9942
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
9943
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
9944
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
9945
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
9946
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
9947
+ /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
9948
+ /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
9949
+
9950
+
9951
+
9952
+
9953
+
9954
+
9955
+ var PivotModel = /** @class */ (function (_super) {
9956
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PivotModel, _super);
9957
+ function PivotModel(questions, data, options, name) {
9958
+ var _this = _super.call(this, null, data, options, name || "pivot") || this;
9959
+ _this.questions = questions;
9960
+ _this.valueType = "enum";
9961
+ _this._cachedValues = undefined;
9962
+ _this._continiousData = undefined;
9963
+ _this._cachedIntervals = undefined;
9964
+ _this._intervalPrecision = 2;
9965
+ _this.axisYSelectors = [];
9966
+ _this.axisYQuestionNames = [];
9967
+ _this.questionsY = [];
9968
+ _this.questions = _this.questions.filter(function (question) { return ["matrixdropdown", "matrixdynamic", "matrix", "file", "signature", "multipletext", "comment", "html", "image"].indexOf(question.getType()) === -1; });
9969
+ if (_this.options.intervalPrecision !== undefined) {
9970
+ _this._intervalPrecision = _this.options.intervalPrecision;
9971
+ }
9972
+ _this.axisXQuestionName = _this.questions.length > 0 ? _this.questions[0].name : undefined;
9973
+ _this.registerToolbarItem("axisXSelector", function () {
9974
+ return _this.axisXSelector = _utils__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.questions.map(function (question) {
9975
+ return {
9976
+ value: question.name,
9977
+ text: question.title || question.name,
9978
+ };
9979
+ }), function (option) { return _this.axisXQuestionName === option.value; }, function (e) { _this.axisXQuestionName = e.target.value; _this.setupPivot(); }, _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("axisXSelectorTitle"));
9980
+ });
9981
+ _this.registerToolbarItem("axisYSelector0", _this.createYSelecterGenerator());
9982
+ _this.setupPivot();
9983
+ return _this;
9984
+ }
9985
+ PivotModel.prototype.createYSelecterGenerator = function () {
9986
+ var _this = this;
9987
+ var selectorIndex = this.axisYSelectors.length;
9988
+ return function () {
9989
+ var selector = _this.axisYSelectors[selectorIndex];
9990
+ if (!selector) {
9991
+ selector = _this.createAxisYSelector(selectorIndex);
9992
+ _this.axisYSelectors.push(selector);
9993
+ }
9994
+ return selector;
9995
+ };
9996
+ };
9997
+ PivotModel.prototype.setAxisQuestions = function () {
9998
+ var axisQuestionNames = [];
9999
+ for (var _i = 0; _i < arguments.length; _i++) {
10000
+ axisQuestionNames[_i] = arguments[_i];
10001
+ }
10002
+ if (axisQuestionNames.length < 1) {
10003
+ return;
10004
+ }
10005
+ this.axisXQuestionName = axisQuestionNames[0];
10006
+ this.axisYQuestionNames = axisQuestionNames.splice(1);
10007
+ this.setupPivot();
10008
+ };
10009
+ PivotModel.prototype.onAxisYSelectorChanged = function (index, value) {
10010
+ this.axisYQuestionNames[index] = value;
10011
+ if (index < this.axisYSelectors.length - 1) {
10012
+ if (!value) {
10013
+ for (var i = index + 1; i < this.axisYSelectors.length; ++i) {
10014
+ this.unregisterToolbarItem("axisYSelector" + i);
10015
+ }
10016
+ this.axisYSelectors = this.axisYSelectors.slice(0, index + 1);
10017
+ this.axisYQuestionNames = this.axisYQuestionNames.slice(0, index + 1);
10018
+ this.updateToolbar();
10019
+ }
10020
+ }
10021
+ else {
10022
+ if (!!value) {
10023
+ this.registerToolbarItem("axisYSelector" + this.axisYSelectors.length, this.createYSelecterGenerator());
10024
+ this.updateToolbar();
10025
+ }
10026
+ }
10027
+ this.setupPivot();
10028
+ };
10029
+ PivotModel.prototype.createAxisYSelector = function (selectorIndex) {
10030
+ var _this = this;
10031
+ var selector = _utils__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector([{ value: "", text: "Not selected" }].concat(this.questions.map(function (question) {
10032
+ return {
10033
+ value: question.name,
10034
+ text: question.title || question.name,
10035
+ };
10036
+ })), function (option) { return _this.axisYQuestionNames[selectorIndex] === option.value; }, function (e) { _this.onAxisYSelectorChanged(selectorIndex, e.target.value); }, selectorIndex ? undefined : _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("axisYSelectorTitle"));
10037
+ return selector;
10038
+ };
10039
+ PivotModel.prototype.getQuestionValueType = function (question) {
10040
+ var questionType = question.getType();
10041
+ if (questionType === "text" && (question["inputType"] === "date" || question["inputType"] === "datetime")) {
10042
+ return "date";
10043
+ }
10044
+ else if (questionType === "text" || questionType === "rating" || questionType === "expression" || questionType === "range") {
10045
+ return "number";
10046
+ }
10047
+ return "enum";
10048
+ };
10049
+ PivotModel.prototype.setupPivot = function () {
10050
+ var _this = this;
10051
+ var questionX = this.questions.filter(function (q) { return q.name === _this.axisXQuestionName; })[0];
10052
+ if (!questionX) {
10053
+ return;
10054
+ }
10055
+ this.question = questionX;
10056
+ this.valueType = this.getQuestionValueType(questionX);
10057
+ this.questionsY = this.axisYQuestionNames.map(function (name) {
10058
+ var questionY = _this.questions.filter(function (q) { return q.name === name; })[0];
10059
+ if (!!questionY) {
10060
+ return _this.getQuestionValueType(questionY) === "enum" ? new _selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase(questionY, []) : new _visualizerBase__WEBPACK_IMPORTED_MODULE_4__.VisualizerBase(questionY, []);
10061
+ }
10062
+ }).filter(function (q) { return !!q; });
10063
+ this.onDataChanged();
10064
+ };
10065
+ PivotModel.prototype.reset = function () {
10066
+ this._continiousData = undefined;
10067
+ this._cachedValues = undefined;
10068
+ this._cachedIntervals = undefined;
10069
+ };
10070
+ PivotModel.prototype.getContiniousValue = function (value) {
10071
+ if (this.valueType === "date") {
10072
+ return Date.parse(value);
10073
+ }
10074
+ return parseFloat(value);
10075
+ };
10076
+ PivotModel.prototype.getString = function (value) {
10077
+ if (this.valueType === "date") {
10078
+ return new Date(value).toLocaleDateString();
10079
+ }
10080
+ return "" + value;
10081
+ };
10082
+ PivotModel.prototype.toPrecision = function (value) {
10083
+ var base = Math.pow(10, this._intervalPrecision);
10084
+ return Math.round(base * value) / base;
10085
+ };
10086
+ PivotModel.prototype.getSelectedItemByText = function (itemText) {
10087
+ if (this.hasCustomIntervals || this.getContiniousValues().length > PivotModel.UseIntervalsFrom) {
10088
+ var interval = this.intervals.filter(function (interval) { return interval.label === itemText; })[0];
10089
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue(interval, interval !== undefined ? interval.label : "");
10090
+ }
10091
+ var labels = this.getLabels();
10092
+ var labelIndex = labels.indexOf(itemText);
10093
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue(this.getValues()[labelIndex], labels[labelIndex]);
10094
+ };
10095
+ /**
10096
+ * Updates visualizer data.
10097
+ */
10098
+ PivotModel.prototype.updateData = function (data) {
10099
+ this.reset();
10100
+ _super.prototype.updateData.call(this, data);
10101
+ };
10102
+ PivotModel.prototype.onDataChanged = function () {
10103
+ this.reset();
10104
+ _super.prototype.onDataChanged.call(this);
10105
+ };
10106
+ PivotModel.prototype.getContiniousValues = function () {
10107
+ var _this = this;
10108
+ if (this._cachedValues === undefined) {
10109
+ this._continiousData = [];
10110
+ if (this.valueType === "enum") {
10111
+ this._cachedValues = [];
10112
+ return this._cachedValues;
10113
+ }
10114
+ var hash_1 = {};
10115
+ this.data.forEach(function (dataItem) {
10116
+ var answerData = dataItem[_this.name];
10117
+ if (answerData !== undefined) {
10118
+ // TODO: _continiousData should be sorted in order to speed-up statistics calculation in the getData function
10119
+ _this._continiousData.push({ continious: _this.getContiniousValue(answerData), row: dataItem });
10120
+ hash_1[answerData] = { value: answerData, row: dataItem };
10121
+ }
10122
+ });
10123
+ this._cachedValues = Object.keys(hash_1).map(function (key) { return ({ original: hash_1[key].value, continious: _this.getContiniousValue(key), row: hash_1[key].row }); });
10124
+ this._cachedValues.sort(function (a, b) { return a.continious - b.continious; });
10125
+ }
10126
+ return this._cachedValues;
10127
+ };
10128
+ PivotModel.prototype.isSupportAnswersOrder = function () {
10129
+ return false;
10130
+ };
10131
+ PivotModel.prototype.isSupportMissingAnswers = function () {
10132
+ return false;
10133
+ };
10134
+ Object.defineProperty(PivotModel.prototype, "needUseRateValues", {
10135
+ get: function () {
10136
+ return this.question.getType() == "rating" && Array.isArray(this.question["rateValues"]) && this.question["rateValues"].length > 0;
10137
+ },
10138
+ enumerable: false,
10139
+ configurable: true
10140
+ });
10141
+ PivotModel.prototype.getSeriesValues = function () {
10142
+ var _this = this;
10143
+ if (this.questionsY.length === 0) {
10144
+ return this.options.seriesValues || [];
10145
+ }
10146
+ var seriesValues = [];
10147
+ this.questionsY.forEach(function (q) {
10148
+ if (_this.getQuestionValueType(q.question) === "enum") {
10149
+ seriesValues.push.apply(seriesValues, q.getValues().reverse());
10150
+ }
10151
+ else {
10152
+ seriesValues.push(q.question.name);
10153
+ }
10154
+ });
10155
+ return seriesValues;
10156
+ };
10157
+ PivotModel.prototype.getSeriesLabels = function () {
10158
+ var _this = this;
10159
+ if (this.questionsY.length === 0) {
10160
+ return this.getSeriesValues();
10161
+ }
10162
+ var seriesLabels = [];
10163
+ this.questionsY.forEach(function (q) {
10164
+ if (_this.getQuestionValueType(q.question) === "enum") {
10165
+ seriesLabels.push.apply(seriesLabels, q.getLabels().reverse());
10166
+ }
10167
+ else {
10168
+ seriesLabels.push(q.question.title || q.question.name);
10169
+ }
10170
+ });
10171
+ return seriesLabels;
10172
+ };
10173
+ PivotModel.prototype.getValues = function () {
10174
+ if (this.valueType === "enum") {
10175
+ return _super.prototype.getValues.call(this).reverse();
10176
+ }
10177
+ return this.intervals.map(function (interval) { return interval.start; });
10178
+ };
10179
+ PivotModel.prototype.getLabels = function () {
10180
+ if (this.valueType === "enum") {
10181
+ return _super.prototype.getLabels.call(this).reverse();
10182
+ }
10183
+ return this.intervals.map(function (interval) { return interval.label; });
10184
+ };
10185
+ Object.defineProperty(PivotModel.prototype, "hasCustomIntervals", {
10186
+ get: function () {
10187
+ return !!this.questionOptions && Array.isArray(this.questionOptions.intervals);
10188
+ },
10189
+ enumerable: false,
10190
+ configurable: true
10191
+ });
10192
+ Object.defineProperty(PivotModel.prototype, "intervals", {
10193
+ get: function () {
10194
+ if (this.hasCustomIntervals) {
10195
+ return this.questionOptions.intervals;
10196
+ }
10197
+ if (this.question.getType() == "rating") {
10198
+ if (this.needUseRateValues) {
10199
+ var rateValues_1 = this.question["rateValues"];
10200
+ rateValues_1.sort(function (iv1, iv2) { return iv1.value - iv2.value; });
10201
+ return rateValues_1.map(function (rateValue, i) { return ({
10202
+ start: rateValue.value,
10203
+ end: i < rateValues_1.length - 1 ? rateValues_1[i + 1].value : rateValue.value + 1,
10204
+ label: rateValue.text
10205
+ }); });
10206
+ }
10207
+ else {
10208
+ var rateIntervals = [];
10209
+ for (var i = (this.question["rateMin"] || 0); i <= (this.question["rateMax"] || (PivotModel.IntervalsCount - 1)); i += (this.question["rateStep"] || 1)) {
10210
+ rateIntervals.push({
10211
+ start: i,
10212
+ end: i + 1,
10213
+ label: "" + (!!this.question["rateMin"] && !!this.question["rateMax"] ? i : (i + "-" + (i + 1)))
10214
+ });
10215
+ }
10216
+ return rateIntervals;
10217
+ }
10218
+ }
10219
+ if (this._cachedIntervals === undefined) {
10220
+ var continiousValues = this.getContiniousValues();
10221
+ this._cachedIntervals = [];
10222
+ if (continiousValues.length) {
10223
+ var start = continiousValues[0].continious;
10224
+ var end = continiousValues[continiousValues.length - 1].continious;
10225
+ var intervalsCount = PivotModel.IntervalsCount;
10226
+ var delta = (end - start) / intervalsCount;
10227
+ for (var i = 0; i < intervalsCount; ++i) {
10228
+ var next = start + delta;
10229
+ var istart = this.toPrecision(start);
10230
+ var inext = this.toPrecision(next);
10231
+ this._cachedIntervals.push({
10232
+ start: istart,
10233
+ end: i < intervalsCount - 1 ? inext : inext + delta / 100,
10234
+ label: "" + this.getString(istart) + "-" + this.getString(inext)
10235
+ });
10236
+ start = next;
10237
+ }
10238
+ }
10239
+ }
10240
+ return this._cachedIntervals;
10241
+ },
10242
+ enumerable: false,
10243
+ configurable: true
10244
+ });
10245
+ PivotModel.prototype.convertFromExternalData = function (externalCalculatedData) {
10246
+ return [externalCalculatedData];
10247
+ };
10248
+ PivotModel.prototype.getSeriesValueIndexes = function () {
10249
+ var _this = this;
10250
+ var seriesValueIndexes = {};
10251
+ var valueIndex = 0;
10252
+ for (var i = 0; i < this.questionsY.length; ++i) {
10253
+ var questionValueType = this.getQuestionValueType(this.questionsY[i].question);
10254
+ if (questionValueType === "enum") {
10255
+ this.questionsY[i].getValues().reverse().forEach(function (value) {
10256
+ seriesValueIndexes[_this.questionsY[i].name + "_" + value] = valueIndex++;
10257
+ });
10258
+ }
10259
+ else {
10260
+ seriesValueIndexes[this.questionsY[i].name] = valueIndex++;
10261
+ }
10262
+ }
10263
+ return seriesValueIndexes;
10264
+ };
10265
+ PivotModel.prototype.updateStatisticsSeriesValue = function (statistics, dataRow, valueIndex, seriesValueIndexes) {
10266
+ for (var j = 0; j < this.questionsY.length; ++j) {
10267
+ if (dataRow[this.questionsY[j].name] !== undefined) {
10268
+ var questionValueType = this.getQuestionValueType(this.questionsY[j].question);
10269
+ if (questionValueType === "enum" || questionValueType === "date") {
10270
+ var seriesValueIndex = seriesValueIndexes[this.questionsY[j].name + "_" + dataRow[this.questionsY[j].name]];
10271
+ statistics[seriesValueIndex][valueIndex]++;
10272
+ }
10273
+ else {
10274
+ var seriesValueIndex = seriesValueIndexes[this.questionsY[j].name];
10275
+ statistics[seriesValueIndex][valueIndex] += parseFloat(dataRow[this.questionsY[j].name]);
10276
+ }
10277
+ }
10278
+ }
10279
+ };
10280
+ PivotModel.prototype.getCalculatedValuesCore = function () {
10281
+ var _this = this;
10282
+ var statistics = [];
10283
+ var series = this.getSeriesValues();
10284
+ if (series.length === 0) {
10285
+ series.push("");
10286
+ }
10287
+ var seriesValueIndexes = this.getSeriesValueIndexes();
10288
+ if (this.valueType === "enum") {
10289
+ var values = this.getValues();
10290
+ var valueIndexes_1 = {};
10291
+ values.forEach(function (value, index) {
10292
+ valueIndexes_1[value] = index;
10293
+ });
10294
+ for (var i = 0; i < series.length; ++i) {
10295
+ statistics.push(values.map(function (i) { return 0; }));
10296
+ }
10297
+ this.data.forEach(function (dataRow) {
10298
+ var answerData = dataRow[_this.name];
10299
+ if (answerData !== undefined && valueIndexes_1[answerData] !== undefined) {
10300
+ var valueIndex = valueIndexes_1[answerData];
10301
+ if (_this.questionsY.length === 0) {
10302
+ statistics[0][valueIndex]++;
10303
+ }
10304
+ else {
10305
+ _this.updateStatisticsSeriesValue(statistics, dataRow, valueIndex, seriesValueIndexes);
10306
+ }
10307
+ }
10308
+ });
10309
+ }
10310
+ else {
10311
+ var continiousValues = this.getContiniousValues();
10312
+ var intervals_1 = this.intervals;
10313
+ for (var i = 0; i < series.length; ++i) {
10314
+ statistics.push(intervals_1.map(function (i) { return 0; }));
10315
+ }
10316
+ this._continiousData.forEach(function (dataValue) {
10317
+ for (var valueIndex = 0; valueIndex < intervals_1.length; ++valueIndex) {
10318
+ if (intervals_1[valueIndex].start <= dataValue.continious && (dataValue.continious < intervals_1[valueIndex].end || valueIndex == intervals_1.length - 1)) {
10319
+ if (_this.questionsY.length === 0) {
10320
+ statistics[0][valueIndex]++;
10321
+ }
10322
+ else {
10323
+ _this.updateStatisticsSeriesValue(statistics, dataValue.row, valueIndex, seriesValueIndexes);
10324
+ }
10325
+ break;
10326
+ }
10327
+ }
10328
+ });
10329
+ }
10330
+ return statistics;
10331
+ };
10332
+ PivotModel.IntervalsCount = 10;
10333
+ PivotModel.UseIntervalsFrom = 10;
10334
+ return PivotModel;
10335
+ }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
10336
+
10337
+
10338
+
9813
10339
  /***/ }),
9814
10340
 
9815
10341
  /***/ "./src/plotly/boolean.ts":
@@ -9952,20 +10478,6 @@ var HistogramPlotly = /** @class */ (function (_super) {
9952
10478
  });
9953
10479
  });
9954
10480
  };
9955
- HistogramPlotly.prototype.getCalculatedValuesCore = function () {
9956
- var statistics = _super.prototype.getCalculatedValuesCore.call(this);
9957
- var series = this.getSeriesValues();
9958
- var values = this.getValues();
9959
- if (series.length > 1) {
9960
- var preparedData_1 = [];
9961
- values.forEach(function (val, valueIndex) {
9962
- var seriesData = series.map(function (seriesValue, seriesIndex) { return statistics[seriesIndex][valueIndex]; });
9963
- preparedData_1.push(seriesData);
9964
- });
9965
- return preparedData_1;
9966
- }
9967
- return statistics;
9968
- };
9969
10481
  HistogramPlotly.prototype.getValueType = function () {
9970
10482
  return this.valueType;
9971
10483
  };
@@ -9994,6 +10506,7 @@ __webpack_require__.r(__webpack_exports__);
9994
10506
  /* harmony export */ HistogramPlotly: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_6__.HistogramPlotly),
9995
10507
  /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* reexport safe */ _matrixdropdown_grouped__WEBPACK_IMPORTED_MODULE_5__.MatrixDropdownGroupedPlotly),
9996
10508
  /* harmony export */ MatrixPlotly: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_2__.MatrixPlotly),
10509
+ /* harmony export */ PivotPlotly: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_8__.PivotPlotly),
9997
10510
  /* harmony export */ PlotlyBoolChartAdapter: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_3__.PlotlyBoolChartAdapter),
9998
10511
  /* harmony export */ PlotlyChartAdapter: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_1__.PlotlyChartAdapter),
9999
10512
  /* harmony export */ PlotlyGaugeAdapter: () => (/* reexport safe */ _rating__WEBPACK_IMPORTED_MODULE_7__.PlotlyGaugeAdapter),
@@ -10009,6 +10522,8 @@ __webpack_require__.r(__webpack_exports__);
10009
10522
  /* harmony import */ var _matrixdropdown_grouped__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./matrixdropdown-grouped */ "./src/plotly/matrixdropdown-grouped.ts");
10010
10523
  /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./histogram */ "./src/plotly/histogram.ts");
10011
10524
  /* harmony import */ var _rating__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./rating */ "./src/plotly/rating.ts");
10525
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pivot */ "./src/plotly/pivot.ts");
10526
+
10012
10527
 
10013
10528
 
10014
10529
 
@@ -10055,7 +10570,67 @@ var MatrixPlotly = /** @class */ (function (_super) {
10055
10570
  this._chartAdapter.destroy(container.children[0]);
10056
10571
  _super.prototype.destroyContent.call(this, container);
10057
10572
  };
10058
- MatrixPlotly.prototype.renderContentAsync = function (container) {
10573
+ MatrixPlotly.prototype.renderContentAsync = function (container) {
10574
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10575
+ var chartNode;
10576
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10577
+ switch (_a.label) {
10578
+ case 0:
10579
+ chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
10580
+ container.innerHTML = "";
10581
+ container.appendChild(chartNode);
10582
+ return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10583
+ case 1:
10584
+ _a.sent();
10585
+ return [2 /*return*/, container];
10586
+ }
10587
+ });
10588
+ });
10589
+ };
10590
+ MatrixPlotly.types = ["bar", "stackedbar", "pie", "doughnut"];
10591
+ return MatrixPlotly;
10592
+ }(_matrix__WEBPACK_IMPORTED_MODULE_2__.Matrix));
10593
+
10594
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrix", MatrixPlotly);
10595
+
10596
+
10597
+ /***/ }),
10598
+
10599
+ /***/ "./src/plotly/matrixdropdown-grouped.ts":
10600
+ /*!**********************************************!*\
10601
+ !*** ./src/plotly/matrixdropdown-grouped.ts ***!
10602
+ \**********************************************/
10603
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10604
+
10605
+ "use strict";
10606
+ __webpack_require__.r(__webpack_exports__);
10607
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10608
+ /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* binding */ MatrixDropdownGroupedPlotly)
10609
+ /* harmony export */ });
10610
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10611
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10612
+ /* harmony import */ var _matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../matrixDropdownGrouped */ "./src/matrixDropdownGrouped.ts");
10613
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10614
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10615
+
10616
+
10617
+
10618
+
10619
+
10620
+ var MatrixDropdownGroupedPlotly = /** @class */ (function (_super) {
10621
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixDropdownGroupedPlotly, _super);
10622
+ function MatrixDropdownGroupedPlotly(question, data, options, name) {
10623
+ var _this = _super.call(this, question, data, options, name) || this;
10624
+ _this.chartTypes = MatrixDropdownGroupedPlotly.types;
10625
+ _this._chartType = _this.chartTypes[0];
10626
+ _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_3__.PlotlyChartAdapter(_this);
10627
+ return _this;
10628
+ }
10629
+ MatrixDropdownGroupedPlotly.prototype.destroyContent = function (container) {
10630
+ this._chartAdapter.destroy(container.children[0]);
10631
+ _super.prototype.destroyContent.call(this, container);
10632
+ };
10633
+ MatrixDropdownGroupedPlotly.prototype.renderContentAsync = function (container) {
10059
10634
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10060
10635
  var chartNode;
10061
10636
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
@@ -10072,56 +10647,56 @@ var MatrixPlotly = /** @class */ (function (_super) {
10072
10647
  });
10073
10648
  });
10074
10649
  };
10075
- MatrixPlotly.types = ["bar", "stackedbar", "pie", "doughnut"];
10076
- return MatrixPlotly;
10077
- }(_matrix__WEBPACK_IMPORTED_MODULE_2__.Matrix));
10650
+ MatrixDropdownGroupedPlotly.types = ["stackedbar", "bar", "pie", "doughnut"];
10651
+ return MatrixDropdownGroupedPlotly;
10652
+ }(_matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_2__.MatrixDropdownGrouped));
10078
10653
 
10079
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrix", MatrixPlotly);
10654
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrixdropdown-grouped", MatrixDropdownGroupedPlotly);
10080
10655
 
10081
10656
 
10082
10657
  /***/ }),
10083
10658
 
10084
- /***/ "./src/plotly/matrixdropdown-grouped.ts":
10085
- /*!**********************************************!*\
10086
- !*** ./src/plotly/matrixdropdown-grouped.ts ***!
10087
- \**********************************************/
10659
+ /***/ "./src/plotly/pivot.ts":
10660
+ /*!*****************************!*\
10661
+ !*** ./src/plotly/pivot.ts ***!
10662
+ \*****************************/
10088
10663
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10089
10664
 
10090
10665
  "use strict";
10091
10666
  __webpack_require__.r(__webpack_exports__);
10092
10667
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10093
- /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* binding */ MatrixDropdownGroupedPlotly)
10668
+ /* harmony export */ PivotPlotly: () => (/* binding */ PivotPlotly)
10094
10669
  /* harmony export */ });
10095
10670
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10096
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10097
- /* harmony import */ var _matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../matrixDropdownGrouped */ "./src/matrixDropdownGrouped.ts");
10098
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10099
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10671
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
10672
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10673
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10674
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10100
10675
 
10101
10676
 
10102
10677
 
10103
10678
 
10104
10679
 
10105
- var MatrixDropdownGroupedPlotly = /** @class */ (function (_super) {
10106
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixDropdownGroupedPlotly, _super);
10107
- function MatrixDropdownGroupedPlotly(question, data, options, name) {
10108
- var _this = _super.call(this, question, data, options, name) || this;
10109
- _this.chartTypes = MatrixDropdownGroupedPlotly.types;
10680
+ var PivotPlotly = /** @class */ (function (_super) {
10681
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PivotPlotly, _super);
10682
+ function PivotPlotly(questions, data, options, name) {
10683
+ var _this = _super.call(this, questions, data, options, name) || this;
10684
+ _this.chartTypes = PivotPlotly.types;
10110
10685
  _this._chartType = _this.chartTypes[0];
10111
- _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_3__.PlotlyChartAdapter(_this);
10686
+ _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_2__.PlotlyChartAdapter(_this);
10112
10687
  return _this;
10113
10688
  }
10114
- MatrixDropdownGroupedPlotly.prototype.destroyContent = function (container) {
10689
+ PivotPlotly.prototype.destroyContent = function (container) {
10115
10690
  this._chartAdapter.destroy(container.children[0]);
10116
10691
  _super.prototype.destroyContent.call(this, container);
10117
10692
  };
10118
- MatrixDropdownGroupedPlotly.prototype.renderContentAsync = function (container) {
10693
+ PivotPlotly.prototype.renderContentAsync = function (container) {
10119
10694
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10120
10695
  var chartNode;
10121
10696
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10122
10697
  switch (_a.label) {
10123
10698
  case 0:
10124
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
10699
+ chartNode = _utils__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createElement("div");
10125
10700
  container.innerHTML = "";
10126
10701
  container.appendChild(chartNode);
10127
10702
  return [4 /*yield*/, this._chartAdapter.create(chartNode)];
@@ -10132,11 +10707,14 @@ var MatrixDropdownGroupedPlotly = /** @class */ (function (_super) {
10132
10707
  });
10133
10708
  });
10134
10709
  };
10135
- MatrixDropdownGroupedPlotly.types = ["stackedbar", "bar", "pie", "doughnut"];
10136
- return MatrixDropdownGroupedPlotly;
10137
- }(_matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_2__.MatrixDropdownGrouped));
10710
+ PivotPlotly.prototype.getValueType = function () {
10711
+ return this.valueType;
10712
+ };
10713
+ PivotPlotly.types = ["vbar", "bar", "line", "stackedbar", "pie", "doughnut"]; // ["vbar", "bar"];
10714
+ return PivotPlotly;
10715
+ }(_pivot__WEBPACK_IMPORTED_MODULE_1__.PivotModel));
10138
10716
 
10139
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrixdropdown-grouped", MatrixDropdownGroupedPlotly);
10717
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerPivotVisualizer(PivotPlotly);
10140
10718
 
10141
10719
 
10142
10720
  /***/ }),
@@ -10586,20 +11164,6 @@ var SelectBasePlotly = /** @class */ (function (_super) {
10586
11164
  this._chartAdapter.update(chartNode);
10587
11165
  }
10588
11166
  };
10589
- SelectBasePlotly.prototype.getCalculatedValuesCore = function () {
10590
- var statistics = _super.prototype.getCalculatedValuesCore.call(this);
10591
- var series = this.getSeriesValues();
10592
- var values = this.getValues();
10593
- if (series.length > 1) {
10594
- var preparedData_1 = [];
10595
- values.forEach(function (val, valueIndex) {
10596
- var seriesData = series.map(function (seriesValue, seriesIndex) { return statistics[seriesIndex][valueIndex]; });
10597
- preparedData_1.push(seriesData);
10598
- });
10599
- return preparedData_1;
10600
- }
10601
- return statistics;
10602
- };
10603
11167
  SelectBasePlotly.types = ["bar", "vbar", "pie", "doughnut"];
10604
11168
  SelectBasePlotly.displayModeBar = undefined;
10605
11169
  return SelectBasePlotly;
@@ -10638,38 +11202,44 @@ var PlotlySetup = /** @class */ (function () {
10638
11202
  };
10639
11203
  PlotlySetup.setupPie = function (model, answersData) {
10640
11204
  var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels;
10641
- var traces = [];
10642
11205
  var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
11206
+ var layoutColumns = 2;
11207
+ var traces = [];
10643
11208
  var traceConfig = {
10644
11209
  type: model.chartType,
10645
- y: hasSeries ? seriesLabels : labels,
10646
- text: (hasSeries ? seriesLabels : labels).map(function (label) {
11210
+ labels: labels,
11211
+ customdata: labels,
11212
+ text: labels.map(function (label) {
10647
11213
  return PlotlySetup.getTruncatedLabel(label, model.labelTruncateLength);
10648
11214
  }),
10649
- hoverinfo: "x+y",
10650
- mode: "markers",
10651
- marker: {},
11215
+ hoverinfo: "label+value+percent",
11216
+ textposition: "inside",
10652
11217
  };
10653
- traceConfig.hoverinfo = "label+value+percent";
10654
- traceConfig.marker.colors = colors;
10655
- traceConfig.textposition = "inside";
10656
11218
  if (model.chartType === "doughnut") {
10657
11219
  traceConfig.type = "pie";
10658
11220
  traceConfig.hole = 0.4;
10659
11221
  }
10660
11222
  if (!hasSeries) {
11223
+ traceConfig.mode = "markers",
11224
+ traceConfig.marker = { color: colors };
10661
11225
  traceConfig.marker.symbol = "circle";
10662
11226
  traceConfig.marker.size = 16;
10663
11227
  }
10664
11228
  datasets.forEach(function (dataset, index) {
10665
- traces.push(Object.assign({}, traceConfig, {
10666
- values: dataset,
10667
- labels: hasSeries ? seriesLabels : labels,
10668
- customdata: hasSeries ? seriesLabels : labels,
10669
- }));
11229
+ var isNotEmpty = dataset.some(function (value) { return value != 0; });
11230
+ if (isNotEmpty) {
11231
+ traces.push(Object.assign({}, traceConfig, {
11232
+ values: dataset,
11233
+ domain: {
11234
+ column: traces.length % layoutColumns,
11235
+ row: Math.floor(traces.length / layoutColumns),
11236
+ },
11237
+ title: { position: "bottom center", text: seriesLabels[index] }
11238
+ }));
11239
+ }
10670
11240
  });
10671
11241
  var radius = labels.length < 10 ? labels.length * 50 + 100 : 550;
10672
- var height = radius * Math.round(traces.length / 2) + 25;
11242
+ var height = (radius + 25) * Math.ceil(traces.length / layoutColumns);
10673
11243
  var layout = {
10674
11244
  font: {
10675
11245
  family: "Segoe UI, sans-serif",
@@ -10692,21 +11262,7 @@ var PlotlySetup = /** @class */ (function () {
10692
11262
  };
10693
11263
  if (hasSeries) {
10694
11264
  layout.annotations = [];
10695
- labels.forEach(function (label, index) {
10696
- traces[index].title = { position: "bottom center", text: label };
10697
- });
10698
- traces = traces.filter(function (t) { return !(t.values.length === 1 && t.values[0] === 0); });
10699
- traces.forEach(function (label, index) {
10700
- traces[index].domain = {
10701
- column: index % 2,
10702
- row: Math.floor(index / 2),
10703
- };
10704
- });
10705
- layout.grid = {
10706
- rows: Math.round(traces.length / 2),
10707
- columns: 2,
10708
- };
10709
- layout.height = radius * Math.round(traces.length / 2) + 25;
11265
+ layout.grid = { rows: Math.ceil(traces.length / layoutColumns), columns: layoutColumns };
10710
11266
  }
10711
11267
  return { traces: traces, layout: layout, hasSeries: hasSeries };
10712
11268
  };
@@ -10715,36 +11271,45 @@ var PlotlySetup = /** @class */ (function () {
10715
11271
  var topMargin = 30;
10716
11272
  var bottomMargin = 30;
10717
11273
  var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels;
10718
- var traces = [];
10719
11274
  var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
10720
- var yFullTexts = hasSeries ? seriesLabels : labels;
11275
+ var traces = [];
10721
11276
  var traceConfig = {
10722
- type: model.chartType,
10723
- y: yFullTexts,
10724
- text: yFullTexts,
10725
- customdata: hasSeries ? seriesLabels : labels,
11277
+ type: model.chartType === "line" ? "line" : "bar",
11278
+ y: labels,
11279
+ customdata: labels,
10726
11280
  hoverinfo: "text",
10727
11281
  orientation: "h",
10728
- mode: "markers",
10729
11282
  textposition: "none",
10730
- width: 0.5,
10731
- bargap: 0.5,
10732
- marker: {},
10733
11283
  };
10734
- traceConfig.marker.color = colors;
11284
+ if (!hasSeries) {
11285
+ traceConfig.width = 0.5;
11286
+ traceConfig.bargap = 0.5;
11287
+ traceConfig.mode = "markers",
11288
+ traceConfig.marker = { color: colors };
11289
+ }
10735
11290
  datasets.forEach(function (dataset, index) {
11291
+ var traceName = hasSeries ? seriesLabels[index] : labels[index];
11292
+ var percentString = model.showPercentages ? "%" : "";
10736
11293
  var trace = Object.assign({}, traceConfig, {
10737
11294
  x: dataset,
11295
+ name: traceName,
11296
+ width: hasSeries && model.chartType !== "stackedbar" ? 0.5 / seriesLabels.length : 0.5,
10738
11297
  text: texts[index],
10739
- hovertext: yFullTexts.map(function (label, labelIndex) {
10740
- return "".concat(texts[index][labelIndex], ", ").concat(label);
11298
+ hovertext: labels.map(function (label, labelIndex) {
11299
+ if (model.showOnlyPercentages) {
11300
+ return "".concat(texts[index][labelIndex]).concat(percentString);
11301
+ }
11302
+ else {
11303
+ return hasSeries ? "".concat(traceName, " : ").concat(label, ", ").concat(texts[index][labelIndex]).concat(percentString) : "".concat(texts[index][labelIndex]).concat(percentString, ", ").concat(label);
11304
+ }
10741
11305
  }),
10742
11306
  });
10743
11307
  if (model.showPercentages) {
10744
11308
  var texttemplate = model.showOnlyPercentages ? "%{text}%" : "%{value} (%{text}%)";
10745
11309
  trace.textposition = "inside";
10746
11310
  trace.texttemplate = texttemplate;
10747
- trace.bargap = 0.1;
11311
+ trace.width = hasSeries && model.chartType !== "stackedbar" ? 0.7 / seriesLabels.length : 0.9;
11312
+ trace.bargap = hasSeries && model.chartType !== "stackedbar" ? 0.3 / seriesLabels.length : 0.1;
10748
11313
  }
10749
11314
  traces.push(trace);
10750
11315
  });
@@ -10764,60 +11329,49 @@ var PlotlySetup = /** @class */ (function () {
10764
11329
  },
10765
11330
  colorway: colors,
10766
11331
  hovermode: "closest",
11332
+ plot_bgcolor: model.backgroundColor,
11333
+ paper_bgcolor: model.backgroundColor,
11334
+ showlegend: hasSeries,
11335
+ barmode: hasSeries && model.chartType == "stackedbar" ? "stack" : "group",
11336
+ xaxis: {
11337
+ rangemode: "nonnegative",
11338
+ automargin: true,
11339
+ },
10767
11340
  yaxis: {
10768
11341
  automargin: true,
10769
11342
  type: "category",
10770
11343
  orientation: "h",
10771
11344
  tickmode: "array",
10772
- tickvals: yFullTexts,
10773
- ticktext: yFullTexts.map(function (label) {
11345
+ tickvals: labels,
11346
+ ticktext: labels.map(function (label) {
10774
11347
  return PlotlySetup.getTruncatedLabel(label, model.labelTruncateLength) + " ";
10775
11348
  }),
10776
11349
  },
10777
- xaxis: {
10778
- rangemode: "nonnegative",
10779
- automargin: true,
10780
- // dtick: 1
10781
- },
10782
- plot_bgcolor: model.backgroundColor,
10783
- paper_bgcolor: model.backgroundColor,
10784
- showlegend: false,
10785
11350
  };
10786
- if (hasSeries) {
10787
- layout.showlegend = true;
10788
- if (model.chartType == "stackedbar") {
10789
- layout.barmode = "stack";
10790
- layout.height =
10791
- (seriesLabels.length + 1) * lineHeight +
10792
- topMargin +
10793
- bottomMargin;
10794
- }
10795
- else {
10796
- layout.height =
10797
- (labels.length + 1) * lineHeight * seriesLabels.length +
10798
- topMargin +
10799
- bottomMargin;
10800
- }
10801
- labels.forEach(function (label, index) {
10802
- traces[index].marker.color = undefined;
10803
- traces[index].name = label;
10804
- if (model.chartType === "stackedbar") {
10805
- traces[index].type = "bar";
10806
- traces[index].width = 0.5;
10807
- }
10808
- else {
10809
- traces[index].width =
10810
- (model.showPercentages ? 0.7 : 0.5) / traces.length;
10811
- }
10812
- });
10813
- traces.forEach(function (trace, traceIndex) {
10814
- var percentString = model.showPercentages ? "%" : "";
10815
- traces[traceIndex].hovertext = [];
10816
- yFullTexts.forEach(function (yFullText, yFullTextIndex) {
10817
- traces[traceIndex].hovertext.push("".concat(trace.y[yFullTextIndex], " : ").concat(trace.name, ", ").concat(trace.text[yFullTextIndex]).concat(percentString));
10818
- });
10819
- });
11351
+ if (hasSeries && model.chartType !== "stackedbar") {
11352
+ layout.height =
11353
+ (labels.length * seriesLabels.length + 1) * lineHeight +
11354
+ topMargin +
11355
+ bottomMargin;
10820
11356
  }
11357
+ // labels.forEach((label, index) => {
11358
+ // traces[index].marker.color = undefined;
11359
+ // traces[index].name = label;
11360
+ // if (model.chartType === "stackedbar") {
11361
+ // traces[index].type = "bar";
11362
+ // traces[index].width = 0.5;
11363
+ // } else {
11364
+ // traces[index].width =
11365
+ // (model.showPercentages ? 0.7 : 0.5) / traces.length;
11366
+ // }
11367
+ // });
11368
+ // traces.forEach((trace, traceIndex) => {
11369
+ // const percentString = model.showPercentages ? "%" : "";
11370
+ // traces[traceIndex].hovertext = [];
11371
+ // yFullTexts.forEach((yFullText, yFullTextIndex) => {
11372
+ // traces[traceIndex].hovertext.push(`${trace.y[yFullTextIndex]} : ${trace.name}, ${trace.text[yFullTextIndex]}${percentString}`);
11373
+ // });
11374
+ // });
10821
11375
  if (["ar", "fa"].indexOf(_localizationManager__WEBPACK_IMPORTED_MODULE_1__.localization.currentLocale) !== -1) {
10822
11376
  layout.xaxis.autorange = "reversed";
10823
11377
  layout.yaxis.side = "right";
@@ -10834,9 +11388,11 @@ var PlotlySetup = /** @class */ (function () {
10834
11388
  var topMargin = 30;
10835
11389
  var bottomMargin = 30;
10836
11390
  var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels;
10837
- if (model.type !== "histogram") {
11391
+ var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
11392
+ if (model.type !== "histogram" && model.type !== "pivot") {
10838
11393
  labels = [].concat(labels).reverse();
10839
- colors = [].concat(colors.slice(0, labels.length)).reverse();
11394
+ seriesLabels = [].concat(seriesLabels).reverse();
11395
+ colors = [].concat(colors.slice(0, hasSeries ? seriesLabels.length : labels.length)).reverse();
10840
11396
  var ts_1 = [];
10841
11397
  texts.forEach(function (text) {
10842
11398
  ts_1.push([].concat(text).reverse());
@@ -10849,7 +11405,37 @@ var PlotlySetup = /** @class */ (function () {
10849
11405
  datasets = ds_1;
10850
11406
  }
10851
11407
  var traces = [];
10852
- var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
11408
+ var traceConfig = {
11409
+ type: model.chartType === "line" ? "line" : "bar",
11410
+ x: labels,
11411
+ customdata: hasSeries ? seriesLabels : labels,
11412
+ hoverinfo: hasSeries ? undefined : "x+y",
11413
+ orientation: "v",
11414
+ textposition: "none",
11415
+ };
11416
+ if (model.type === "histogram" || !hasSeries) {
11417
+ traceConfig.width = 0.5;
11418
+ traceConfig.bargap = 0.5;
11419
+ traceConfig.mode = "markers",
11420
+ traceConfig.marker = { color: colors };
11421
+ }
11422
+ datasets.forEach(function (dataset, index) {
11423
+ var trace = Object.assign({}, traceConfig, {
11424
+ y: dataset,
11425
+ name: hasSeries ? seriesLabels[index] : labels[index],
11426
+ text: texts[index],
11427
+ });
11428
+ if (model.showPercentages) {
11429
+ var texttemplate = model.showOnlyPercentages ? "%{text}%" : "%{value} (%{text}%)";
11430
+ trace.textposition = "inside";
11431
+ trace.texttemplate = texttemplate;
11432
+ if (!hasSeries) {
11433
+ trace.width = 0.9;
11434
+ trace.bargap = 0.1;
11435
+ }
11436
+ }
11437
+ traces.push(trace);
11438
+ });
10853
11439
  var layout = {
10854
11440
  font: {
10855
11441
  family: "Segoe UI, sans-serif",
@@ -10866,34 +11452,21 @@ var PlotlySetup = /** @class */ (function () {
10866
11452
  hovermode: "closest",
10867
11453
  plot_bgcolor: model.backgroundColor,
10868
11454
  paper_bgcolor: model.backgroundColor,
10869
- showlegend: false,
10870
- };
10871
- var traceConfig = {
10872
- type: model.chartType === "line" ? "line" : "bar",
10873
- customdata: hasSeries ? seriesLabels : labels,
10874
- hoverinfo: "x+y",
10875
- mode: model.chartType === "line" ? "lines+markers" : "markers",
10876
- textposition: "none",
10877
- width: 0.5,
10878
- bargap: 0.5,
10879
- marker: {},
11455
+ showlegend: hasSeries,
11456
+ yaxis: {
11457
+ rangemode: "nonnegative",
11458
+ automargin: true,
11459
+ },
11460
+ xaxis: {
11461
+ automargin: true,
11462
+ type: "category",
11463
+ tickmode: "array",
11464
+ tickvals: labels,
11465
+ ticktext: labels.map(function (label) {
11466
+ return PlotlySetup.getTruncatedLabel(label, model.labelTruncateLength) + " ";
11467
+ }),
11468
+ },
10880
11469
  };
10881
- traceConfig.marker.color = colors;
10882
- datasets.forEach(function (dataset, index) {
10883
- var trace = Object.assign({}, traceConfig, {
10884
- x: labels,
10885
- y: model.showPercentages ? texts[index].map(function (y) { return y / 100; }) : dataset,
10886
- text: texts[index],
10887
- });
10888
- if (model.showPercentages) {
10889
- var texttemplate = model.showOnlyPercentages ? "%{text}%" : "%{value} (%{text}%)";
10890
- trace.textposition = "inside";
10891
- trace.texttemplate = texttemplate;
10892
- trace.width = 0.9;
10893
- trace.bargap = 0.1;
10894
- }
10895
- traces.push(trace);
10896
- });
10897
11470
  if (model.showPercentages && model.showOnlyPercentages) {
10898
11471
  layout.yaxis = {
10899
11472
  automargin: true,
@@ -11069,9 +11642,9 @@ function hideEmptyAnswersInData(answersData) {
11069
11642
  seriesDataExistence.length = answersData.seriesLabels.length;
11070
11643
  var valuesDataExistence = [];
11071
11644
  valuesDataExistence.length = answersData.labels.length;
11072
- for (var valueIndex = 0; valueIndex < answersData.labels.length; valueIndex++) {
11073
- for (var seriesIndex = 0; seriesIndex < answersData.seriesLabels.length; seriesIndex++) {
11074
- if (answersData.datasets[valueIndex][seriesIndex] != 0) {
11645
+ for (var seriesIndex = 0; seriesIndex < answersData.seriesLabels.length; seriesIndex++) {
11646
+ for (var valueIndex = 0; valueIndex < answersData.labels.length; valueIndex++) {
11647
+ if (answersData.datasets[seriesIndex][valueIndex] != 0) {
11075
11648
  seriesDataExistence[seriesIndex] = true;
11076
11649
  valuesDataExistence[valueIndex] = true;
11077
11650
  }
@@ -11088,14 +11661,14 @@ function hideEmptyAnswersInData(answersData) {
11088
11661
  result.seriesLabels.push(answersData.seriesLabels[seriesIndex]);
11089
11662
  }
11090
11663
  }
11091
- for (var valueIndex = 0; valueIndex < answersData.labels.length; valueIndex++) {
11092
- if (valuesDataExistence[valueIndex]) {
11664
+ for (var seriesIndex = 0; seriesIndex < answersData.datasets.length; seriesIndex++) {
11665
+ if (seriesDataExistence[seriesIndex]) {
11093
11666
  var dataset = [];
11094
11667
  var texts = [];
11095
- for (var seriesIndex = 0; seriesIndex < answersData.datasets.length; seriesIndex++) {
11096
- if (seriesDataExistence[seriesIndex]) {
11097
- dataset.push(answersData.datasets[valueIndex][seriesIndex]);
11098
- texts.push(answersData.texts[valueIndex][seriesIndex]);
11668
+ for (var valueIndex = 0; valueIndex < answersData.labels.length; valueIndex++) {
11669
+ if (valuesDataExistence[valueIndex]) {
11670
+ dataset.push(answersData.datasets[seriesIndex][valueIndex]);
11671
+ texts.push(answersData.texts[seriesIndex][valueIndex]);
11099
11672
  }
11100
11673
  }
11101
11674
  result.datasets.push(dataset);
@@ -11133,14 +11706,19 @@ var SelectBase = /** @class */ (function (_super) {
11133
11706
  * options fields can be modified
11134
11707
  */
11135
11708
  _this.onAnswersDataReady = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Event();
11136
- question.visibleChoicesChangedCallback = function () {
11137
- _this.dataProvider.raiseDataChanged();
11138
- };
11709
+ if (!!question) { // TODO: move somewhere else
11710
+ question.visibleChoicesChangedCallback = function () {
11711
+ _this.dataProvider.raiseDataChanged();
11712
+ };
11713
+ }
11139
11714
  _this._showPercentages = _this.options.showPercentages === true;
11140
11715
  _this._showOnlyPercentages = _this.options.showOnlyPercentages === true;
11141
11716
  if (_this.options.percentagePrecision) {
11142
11717
  _this._percentagePrecision = _this.options.percentagePrecision;
11143
11718
  }
11719
+ if (_this.options.transposeData !== undefined) {
11720
+ _this._transposeData = _this.options.transposeData;
11721
+ }
11144
11722
  _this._hideEmptyAnswers = _this.options.hideEmptyAnswers === true;
11145
11723
  _this._answersOrder = _this.options.answersOrder || "default";
11146
11724
  _this._showMissingAnswers = _this.isSupportMissingAnswers() && _this.options.showMissingAnswers === true;
@@ -11628,9 +12206,9 @@ var SelectBase = /** @class */ (function (_super) {
11628
12206
  var series = this.getSeriesValues();
11629
12207
  var innerCalculatedData = [];
11630
12208
  if (series.length > 0) {
11631
- for (var i = 0; i < values.length; i++) {
12209
+ for (var j = 0; j < series.length; j++) {
11632
12210
  var seriesData = [];
11633
- for (var j = 0; j < series.length; j++) {
12211
+ for (var i = 0; i < values.length; i++) {
11634
12212
  if (!!externalCalculatedData[series[j]]) {
11635
12213
  seriesData.push(externalCalculatedData[series[j]][values[i]] || 0);
11636
12214
  }
@@ -12244,9 +12822,15 @@ __webpack_require__.r(__webpack_exports__);
12244
12822
  var DocumentHelper = /** @class */ (function () {
12245
12823
  function DocumentHelper() {
12246
12824
  }
12247
- DocumentHelper.createSelector = function (options, isSelected, handler) {
12825
+ DocumentHelper.createSelector = function (options, isSelected, handler, title) {
12248
12826
  var selectWrapper = document.createElement("div");
12249
12827
  selectWrapper.className = "sa-question__select-wrapper";
12828
+ if (title) {
12829
+ var titleElement = DocumentHelper.createElement("span", "sa-question__select-title", {
12830
+ innerText: title,
12831
+ });
12832
+ selectWrapper.appendChild(titleElement);
12833
+ }
12250
12834
  var select = document.createElement("select");
12251
12835
  select.className = "sa-question__select";
12252
12836
  options.forEach(function (option) {
@@ -12552,7 +13136,14 @@ var VisualizationManager = /** @class */ (function () {
12552
13136
  VisualizationManager.registerAltVisualizerSelector = function (constructor) {
12553
13137
  VisualizationManager.alternativesVisualizer = constructor;
12554
13138
  };
13139
+ VisualizationManager.getPivotVisualizerConstructor = function () {
13140
+ return VisualizationManager.pivotVisualizer || _visualizerBase__WEBPACK_IMPORTED_MODULE_0__.VisualizerBase;
13141
+ };
13142
+ VisualizationManager.registerPivotVisualizer = function (constructor) {
13143
+ VisualizationManager.pivotVisualizer = constructor;
13144
+ };
12555
13145
  VisualizationManager.alternativesVisualizer = undefined;
13146
+ VisualizationManager.pivotVisualizer = undefined;
12556
13147
  VisualizationManager.vizualizers = {};
12557
13148
  return VisualizationManager;
12558
13149
  }());
@@ -12599,6 +13190,7 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
12599
13190
  _this._childOptions.disableLocaleSwitch = true;
12600
13191
  _this._childOptions.dataProvider = undefined;
12601
13192
  _this._childOptions.allowDynamicLayout = false;
13193
+ _this._childOptions.transposeData = true;
12602
13194
  _this._childOptions.seriesValues = question.rows.map(function (row) { return row.value; });
12603
13195
  _this._childOptions.seriesLabels = question.rows.map(function (row) { return row.text; });
12604
13196
  var innerQuestions = _this.getQuestions();
@@ -12758,6 +13350,8 @@ __webpack_require__.r(__webpack_exports__);
12758
13350
  /* harmony import */ var _layoutEngine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layoutEngine */ "./src/layoutEngine.ts");
12759
13351
  /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.ts");
12760
13352
  /* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
13353
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
13354
+
12761
13355
 
12762
13356
 
12763
13357
 
@@ -13079,7 +13673,15 @@ var VisualizationPanel = /** @class */ (function (_super) {
13079
13673
  VisualizationPanel.prototype.buildVisualizers = function (questions) {
13080
13674
  var _this = this;
13081
13675
  questions.forEach(function (question) {
13082
- var visualizer = _this.createVisualizer(question);
13676
+ var visualizerOptions = Object.assign({}, _this.options);
13677
+ var visualizerData = _this.surveyData;
13678
+ var visualizer;
13679
+ if (Array.isArray(question)) {
13680
+ visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions);
13681
+ }
13682
+ else {
13683
+ visualizer = _this.createVisualizer(question, visualizerOptions, visualizerData);
13684
+ }
13083
13685
  if (!visualizer) {
13084
13686
  return;
13085
13687
  }
@@ -13148,6 +13750,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
13148
13750
  var _this = this;
13149
13751
  _super.prototype.setLocale.call(this, newLocale);
13150
13752
  (this.questions || []).forEach(function (question) {
13753
+ question = Array.isArray(question) ? question[0] : question;
13151
13754
  var element = _this.getElement(question.name);
13152
13755
  if (!!element) {
13153
13756
  element.displayName = _this.processText(question.title);
@@ -13215,6 +13818,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
13215
13818
  VisualizationPanel.prototype.buildElements = function (questions) {
13216
13819
  var _this = this;
13217
13820
  return (questions || []).map(function (question) {
13821
+ question = Array.isArray(question) ? question[0] : question;
13218
13822
  return {
13219
13823
  name: question.name,
13220
13824
  displayName: _this.processText(question.title),
@@ -13439,7 +14043,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
13439
14043
  this._settingState = true;
13440
14044
  try {
13441
14045
  if (Array.isArray(newState.elements)) {
13442
- var questionNames_1 = this.questions.map(function (q) { return q.name; });
14046
+ var questionNames_1 = this.questions.map(function (q) { return Array.isArray(q) ? q[0].name : q.name; });
13443
14047
  this._elements = [].concat(newState.elements.filter(function (e) { return (questionNames_1.indexOf(e.name) !== -1); }));
13444
14048
  }
13445
14049
  if (typeof newState.locale !== "undefined")
@@ -13816,12 +14420,12 @@ var VisualizerBase = /** @class */ (function () {
13816
14420
  enumerable: false,
13817
14421
  configurable: true
13818
14422
  });
13819
- VisualizerBase.prototype.createVisualizer = function (question, options) {
14423
+ VisualizerBase.prototype.createVisualizer = function (question, options, data) {
13820
14424
  var visualizerOptions = Object.assign({}, options || this.options);
13821
14425
  if (visualizerOptions.dataProvider === undefined) {
13822
14426
  visualizerOptions.dataProvider = this.dataProvider;
13823
14427
  }
13824
- return _visualizerFactory__WEBPACK_IMPORTED_MODULE_3__.VisualizerFactory.createVisualizer(question, this.data, visualizerOptions);
14428
+ return _visualizerFactory__WEBPACK_IMPORTED_MODULE_3__.VisualizerFactory.createVisualizer(question, data || this.data, visualizerOptions);
13825
14429
  };
13826
14430
  Object.defineProperty(VisualizerBase.prototype, "footerVisualizer", {
13827
14431
  /**
@@ -14085,6 +14689,17 @@ var VisualizerBase = /** @class */ (function () {
14085
14689
  });
14086
14690
  });
14087
14691
  };
14692
+ VisualizerBase.prototype.ensureQuestionIsReady = function () {
14693
+ var _this = this;
14694
+ return new Promise(function (resolve) {
14695
+ if (_this.question) {
14696
+ _this.question.waitForQuestionIsReady().then(function () { return resolve(); });
14697
+ }
14698
+ else {
14699
+ resolve();
14700
+ }
14701
+ });
14702
+ };
14088
14703
  VisualizerBase.prototype.renderContent = function (container) {
14089
14704
  var _this = this;
14090
14705
  if (!!this.options && typeof this.options.renderContent === "function") {
@@ -14097,7 +14712,7 @@ var VisualizerBase = /** @class */ (function () {
14097
14712
  if (this.loadingData) {
14098
14713
  this.renderLoadingIndicator(this.contentContainer);
14099
14714
  }
14100
- this.renderContentAsync(container).then(function (el) { return _this.afterRender(el); });
14715
+ this.ensureQuestionIsReady().then(function () { return _this.renderContentAsync(container).then(function (el) { return _this.afterRender(el); }); });
14101
14716
  }
14102
14717
  };
14103
14718
  VisualizerBase.prototype.destroyFooter = function (container) {
@@ -14153,6 +14768,15 @@ var VisualizerBase = /** @class */ (function () {
14153
14768
  targetElement.appendChild(this.footerContainer);
14154
14769
  this.renderFooter(this.footerContainer);
14155
14770
  };
14771
+ VisualizerBase.prototype.updateToolbar = function () {
14772
+ var _this = this;
14773
+ if (!!this.toolbarContainer) {
14774
+ PostponeHelper.postpone(function () {
14775
+ _this.destroyToolbar(_this.toolbarContainer);
14776
+ _this.renderToolbar(_this.toolbarContainer);
14777
+ });
14778
+ }
14779
+ };
14156
14780
  VisualizerBase.prototype.updateContent = function () {
14157
14781
  this.destroyContent(this.contentContainer);
14158
14782
  this.renderContent(this.contentContainer);
@@ -16415,117 +17039,52 @@ var __webpack_exports__ = {};
16415
17039
  \********************************/
16416
17040
  __webpack_require__.r(__webpack_exports__);
16417
17041
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16418
- /* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_27__.AlternativeVisualizersWrapper),
16419
- /* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_19__.BooleanModel),
16420
- /* harmony export */ BooleanPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.BooleanPlotly),
16421
- /* harmony export */ DataProvider: () => (/* reexport safe */ _dataProvider__WEBPACK_IMPORTED_MODULE_14__.DataProvider),
16422
- /* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_34__.DocumentHelper),
16423
- /* harmony export */ GaugePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.GaugePlotly),
16424
- /* harmony export */ HistogramModel: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.HistogramModel),
16425
- /* harmony export */ HistogramPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.HistogramPlotly),
16426
- /* harmony export */ Matrix: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_18__.Matrix),
16427
- /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.MatrixDropdownGroupedPlotly),
16428
- /* harmony export */ MatrixPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.MatrixPlotly),
16429
- /* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsAdapter),
16430
- /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsVisualizer),
16431
- /* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsVisualizerWidget),
16432
- /* harmony export */ NumberModel: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_16__.NumberModel),
16433
- /* harmony export */ PlotlyBoolChartAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.PlotlyBoolChartAdapter),
16434
- /* harmony export */ PlotlyChartAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.PlotlyChartAdapter),
16435
- /* harmony export */ PlotlyGaugeAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.PlotlyGaugeAdapter),
16436
- /* harmony export */ PlotlySetup: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.PlotlySetup),
16437
- /* harmony export */ PostponeHelper: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.PostponeHelper),
16438
- /* harmony export */ RankingPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.RankingPlotly),
16439
- /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
16440
- /* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_28__.SelectBasePlotly),
16441
- /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTable),
16442
- /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableAdapter),
16443
- /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.Text),
16444
- /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.TextTableAdapter),
16445
- /* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_22__.VisualizationManager),
16446
- /* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_26__.VisualizationMatrixDropdown),
16447
- /* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_25__.VisualizationMatrixDynamic),
16448
- /* harmony export */ VisualizationPanel: () => (/* reexport safe */ _visualizationPanel__WEBPACK_IMPORTED_MODULE_23__.VisualizationPanel),
16449
- /* harmony export */ VisualizationPanelDynamic: () => (/* reexport safe */ _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_24__.VisualizationPanelDynamic),
16450
- /* harmony export */ VisualizerBase: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.VisualizerBase),
16451
- /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_15__.VisualizerFactory),
16452
- /* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__.WordCloud),
16453
- /* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__.WordCloudAdapter),
16454
- /* harmony export */ defaultStatisticsCalculator: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.defaultStatisticsCalculator),
16455
- /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
16456
- /* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
16457
- /* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
16458
- /* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_30__.textHelper)
17042
+ /* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.AlternativeVisualizersWrapper),
17043
+ /* harmony export */ BooleanModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.BooleanModel),
17044
+ /* harmony export */ BooleanPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.BooleanPlotly),
17045
+ /* harmony export */ DataProvider: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.DataProvider),
17046
+ /* harmony export */ DocumentHelper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.DocumentHelper),
17047
+ /* harmony export */ GaugePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.GaugePlotly),
17048
+ /* harmony export */ HistogramModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.HistogramModel),
17049
+ /* harmony export */ HistogramPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.HistogramPlotly),
17050
+ /* harmony export */ Matrix: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.Matrix),
17051
+ /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.MatrixDropdownGroupedPlotly),
17052
+ /* harmony export */ MatrixPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.MatrixPlotly),
17053
+ /* harmony export */ NpsAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.NpsAdapter),
17054
+ /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.NpsVisualizer),
17055
+ /* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.NpsVisualizerWidget),
17056
+ /* harmony export */ NumberModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.NumberModel),
17057
+ /* harmony export */ PivotModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.PivotModel),
17058
+ /* harmony export */ PivotPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PivotPlotly),
17059
+ /* harmony export */ PlotlyBoolChartAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PlotlyBoolChartAdapter),
17060
+ /* harmony export */ PlotlyChartAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PlotlyChartAdapter),
17061
+ /* harmony export */ PlotlyGaugeAdapter: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PlotlyGaugeAdapter),
17062
+ /* harmony export */ PlotlySetup: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PlotlySetup),
17063
+ /* harmony export */ PostponeHelper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.PostponeHelper),
17064
+ /* harmony export */ RankingPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.RankingPlotly),
17065
+ /* harmony export */ SelectBase: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.SelectBase),
17066
+ /* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.SelectBasePlotly),
17067
+ /* harmony export */ StatisticsTable: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTable),
17068
+ /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTableAdapter),
17069
+ /* harmony export */ Text: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.Text),
17070
+ /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.TextTableAdapter),
17071
+ /* harmony export */ VisualizationManager: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager),
17072
+ /* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDropdown),
17073
+ /* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDynamic),
17074
+ /* harmony export */ VisualizationPanel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationPanel),
17075
+ /* harmony export */ VisualizationPanelDynamic: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationPanelDynamic),
17076
+ /* harmony export */ VisualizerBase: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase),
17077
+ /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizerFactory),
17078
+ /* harmony export */ WordCloud: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.WordCloud),
17079
+ /* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.WordCloudAdapter),
17080
+ /* harmony export */ defaultStatisticsCalculator: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.defaultStatisticsCalculator),
17081
+ /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.hideEmptyAnswersInData),
17082
+ /* harmony export */ localization: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.localization),
17083
+ /* harmony export */ surveyStrings: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.surveyStrings),
17084
+ /* harmony export */ textHelper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.textHelper)
16459
17085
  /* harmony export */ });
16460
- /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
16461
- /* harmony import */ var _analytics_localization_farsi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../analytics-localization/farsi */ "./src/analytics-localization/farsi.ts");
16462
- /* harmony import */ var _analytics_localization_french__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../analytics-localization/french */ "./src/analytics-localization/french.ts");
16463
- /* harmony import */ var _analytics_localization_german__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../analytics-localization/german */ "./src/analytics-localization/german.ts");
16464
- /* harmony import */ var _analytics_localization_norwegian__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../analytics-localization/norwegian */ "./src/analytics-localization/norwegian.ts");
16465
- /* harmony import */ var _analytics_localization_portuguese__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../analytics-localization/portuguese */ "./src/analytics-localization/portuguese.ts");
16466
- /* harmony import */ var _analytics_localization_russian__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../analytics-localization/russian */ "./src/analytics-localization/russian.ts");
16467
- /* harmony import */ var _analytics_localization_dutch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../analytics-localization/dutch */ "./src/analytics-localization/dutch.ts");
16468
- /* harmony import */ var _analytics_localization_spanish__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../analytics-localization/spanish */ "./src/analytics-localization/spanish.ts");
16469
- /* harmony import */ var _analytics_localization_italian__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../analytics-localization/italian */ "./src/analytics-localization/italian.ts");
16470
- /* harmony import */ var _analytics_localization_arabic__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../analytics-localization/arabic */ "./src/analytics-localization/arabic.ts");
16471
- /* harmony import */ var _analytics_localization_japanese__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../analytics-localization/japanese */ "./src/analytics-localization/japanese.ts");
16472
- /* harmony import */ var _analytics_localization_polish__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../analytics-localization/polish */ "./src/analytics-localization/polish.ts");
16473
- /* harmony import */ var _analytics_localization_finnish__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../analytics-localization/finnish */ "./src/analytics-localization/finnish.ts");
16474
- /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../dataProvider */ "./src/dataProvider.ts");
16475
- /* harmony import */ var _visualizerFactory__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../visualizerFactory */ "./src/visualizerFactory.ts");
16476
- /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../number */ "./src/number.ts");
16477
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
16478
- /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../matrix */ "./src/matrix.ts");
16479
- /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
16480
- /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../histogram */ "./src/histogram.ts");
16481
- /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../visualizerBase */ "./src/visualizerBase.ts");
16482
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
16483
- /* harmony import */ var _visualizationPanel__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../visualizationPanel */ "./src/visualizationPanel.ts");
16484
- /* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
16485
- /* harmony import */ var _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../visualizationMatrixDynamic */ "./src/visualizationMatrixDynamic.ts");
16486
- /* harmony import */ var _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../visualizationMatrixDropdown */ "./src/visualizationMatrixDropdown.ts");
16487
- /* harmony import */ var _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../alternativeVizualizersWrapper */ "./src/alternativeVizualizersWrapper.ts");
16488
- /* harmony import */ var _plotly_index__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../plotly/index */ "./src/plotly/index.ts");
16489
- /* harmony import */ var _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../wordcloud/wordcloud */ "./src/wordcloud/wordcloud.ts");
16490
- /* harmony import */ var _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../wordcloud/stopwords/index */ "./src/wordcloud/stopwords/index.ts");
16491
- /* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../text */ "./src/text.ts");
16492
- /* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
16493
- /* harmony import */ var _nps__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../nps */ "./src/nps.ts");
16494
- /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
16495
-
16496
- //localization
16497
-
16498
-
16499
-
16500
-
16501
-
16502
-
16503
-
16504
-
16505
-
16506
-
16507
-
16508
-
16509
-
16510
-
16511
-
16512
-
16513
-
16514
-
16515
-
16516
-
16517
-
16518
-
16519
-
16520
-
16521
-
16522
-
16523
-
16524
-
16525
-
16526
-
16527
-
16528
-
17086
+ /* harmony import */ var _plotly_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../plotly/index */ "./src/plotly/index.ts");
17087
+ /* harmony import */ var _summary_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./summary.core */ "./src/entries/summary.core.ts");
16529
17088
 
16530
17089
 
16531
17090