survey-analytics 2.3.5 → 2.3.7

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 (36) hide show
  1. package/fesm/shared.mjs +1 -1
  2. package/fesm/shared2.mjs +84 -51
  3. package/fesm/shared2.mjs.map +1 -1
  4. package/fesm/survey.analytics.core.mjs +2 -2
  5. package/fesm/survey.analytics.mjs +11 -4
  6. package/fesm/survey.analytics.mjs.map +1 -1
  7. package/fesm/survey.analytics.tabulator.mjs +6 -3
  8. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  9. package/package.json +2 -2
  10. package/survey-analytics-tabulator.types/tables/table.d.ts +18 -5
  11. package/survey-analytics.types/entries/summary.core.d.ts +1 -0
  12. package/survey-analytics.types/selectBase.d.ts +1 -0
  13. package/survey-analytics.types/visualizationComposite.d.ts +8 -0
  14. package/survey-analytics.types/visualizationManager.d.ts +2 -2
  15. package/survey-analytics.types/visualizationMatrixDynamic.d.ts +1 -2
  16. package/survey-analytics.types/visualizationPanel.d.ts +1 -1
  17. package/survey-analytics.types/visualizationPanelDynamic.d.ts +1 -2
  18. package/survey-analytics.types/visualizerBase.d.ts +1 -1
  19. package/survey.analytics.core.css +1 -1
  20. package/survey.analytics.core.js +141 -84
  21. package/survey.analytics.core.js.map +1 -1
  22. package/survey.analytics.core.min.css +1 -1
  23. package/survey.analytics.core.min.js +1 -1
  24. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  25. package/survey.analytics.css +1 -1
  26. package/survey.analytics.js +150 -85
  27. package/survey.analytics.js.map +1 -1
  28. package/survey.analytics.min.css +1 -1
  29. package/survey.analytics.min.js +1 -1
  30. package/survey.analytics.min.js.LICENSE.txt +1 -1
  31. package/survey.analytics.tabulator.css +1 -1
  32. package/survey.analytics.tabulator.js +11 -4
  33. package/survey.analytics.tabulator.js.map +1 -1
  34. package/survey.analytics.tabulator.min.css +1 -1
  35. package/survey.analytics.tabulator.min.js +1 -1
  36. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.5
2
+ * surveyjs - SurveyJS Dashboard library v2.3.7
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.5
2
+ * surveyjs - SurveyJS Dashboard library v2.3.7
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.5
2
+ * surveyjs - SurveyJS Dashboard library v2.3.7
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
  */
@@ -6859,7 +6859,7 @@ __webpack_require__.r(__webpack_exports__);
6859
6859
  var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
6860
6860
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(AlternativeVisualizersWrapper, _super);
6861
6861
  function AlternativeVisualizersWrapper(visualizers, question, data, options) {
6862
- var _this = _super.call(this, question, data, options) || this;
6862
+ var _this = _super.call(this, question, data, options, "alternative") || this;
6863
6863
  _this.visualizers = visualizers;
6864
6864
  _this.visualizersWithSelection = [];
6865
6865
  _this.onAfterVisualizerRenderCallback = function () {
@@ -9979,22 +9979,23 @@ __webpack_require__.r(__webpack_exports__);
9979
9979
  /* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_28__.AlternativeVisualizersWrapper),
9980
9980
  /* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_19__.BooleanModel),
9981
9981
  /* harmony export */ DataProvider: () => (/* reexport safe */ _dataProvider__WEBPACK_IMPORTED_MODULE_15__.DataProvider),
9982
- /* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_36__.DocumentHelper),
9982
+ /* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_37__.DocumentHelper),
9983
9983
  /* harmony export */ HistogramModel: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.HistogramModel),
9984
9984
  /* harmony export */ Matrix: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_18__.Matrix),
9985
- /* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsAdapter),
9986
- /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsVisualizer),
9987
- /* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_33__.NpsVisualizerWidget),
9985
+ /* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsAdapter),
9986
+ /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsVisualizer),
9987
+ /* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsVisualizerWidget),
9988
9988
  /* harmony export */ NumberModel: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_21__.NumberModel),
9989
- /* harmony export */ PivotModel: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_35__.PivotModel),
9989
+ /* harmony export */ PivotModel: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_36__.PivotModel),
9990
9990
  /* harmony export */ PostponeHelper: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_22__.PostponeHelper),
9991
- /* harmony export */ RankingModel: () => (/* reexport safe */ _ranking__WEBPACK_IMPORTED_MODULE_34__.RankingModel),
9991
+ /* harmony export */ RankingModel: () => (/* reexport safe */ _ranking__WEBPACK_IMPORTED_MODULE_35__.RankingModel),
9992
9992
  /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
9993
- /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTable),
9994
- /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableAdapter),
9995
- /* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableBoolean),
9996
- /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.Text),
9997
- /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.TextTableAdapter),
9993
+ /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTable),
9994
+ /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTableAdapter),
9995
+ /* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTableBoolean),
9996
+ /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_32__.Text),
9997
+ /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_32__.TextTableAdapter),
9998
+ /* harmony export */ VisualizationComposite: () => (/* reexport safe */ _visualizationComposite__WEBPACK_IMPORTED_MODULE_29__.VisualizationComposite),
9998
9999
  /* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_23__.VisualizationManager),
9999
10000
  /* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_27__.VisualizationMatrixDropdown),
10000
10001
  /* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_26__.VisualizationMatrixDynamic),
@@ -10002,13 +10003,13 @@ __webpack_require__.r(__webpack_exports__);
10002
10003
  /* harmony export */ VisualizationPanelDynamic: () => (/* reexport safe */ _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_25__.VisualizationPanelDynamic),
10003
10004
  /* harmony export */ VisualizerBase: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_22__.VisualizerBase),
10004
10005
  /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_16__.VisualizerFactory),
10005
- /* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__.WordCloud),
10006
- /* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__.WordCloudAdapter),
10006
+ /* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloud),
10007
+ /* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloudAdapter),
10007
10008
  /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
10008
10009
  /* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
10009
10010
  /* harmony export */ setupLocale: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale),
10010
10011
  /* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
10011
- /* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_30__.textHelper)
10012
+ /* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_31__.textHelper)
10012
10013
  /* harmony export */ });
10013
10014
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
10014
10015
  /* harmony import */ var _analytics_localization_farsi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../analytics-localization/farsi */ "./src/analytics-localization/farsi.ts");
@@ -10039,14 +10040,15 @@ __webpack_require__.r(__webpack_exports__);
10039
10040
  /* harmony import */ var _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../visualizationMatrixDynamic */ "./src/visualizationMatrixDynamic.ts");
10040
10041
  /* harmony import */ var _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../visualizationMatrixDropdown */ "./src/visualizationMatrixDropdown.ts");
10041
10042
  /* harmony import */ var _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../alternativeVizualizersWrapper */ "./src/alternativeVizualizersWrapper.ts");
10042
- /* harmony import */ var _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../wordcloud/wordcloud */ "./src/wordcloud/wordcloud.ts");
10043
- /* harmony import */ var _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../wordcloud/stopwords/index */ "./src/wordcloud/stopwords/index.ts");
10044
- /* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../text */ "./src/text.ts");
10045
- /* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
10046
- /* harmony import */ var _nps__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../nps */ "./src/nps.ts");
10047
- /* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../ranking */ "./src/ranking.ts");
10048
- /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
10049
- /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
10043
+ /* harmony import */ var _visualizationComposite__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../visualizationComposite */ "./src/visualizationComposite.ts");
10044
+ /* harmony import */ var _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../wordcloud/wordcloud */ "./src/wordcloud/wordcloud.ts");
10045
+ /* harmony import */ var _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../wordcloud/stopwords/index */ "./src/wordcloud/stopwords/index.ts");
10046
+ /* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../text */ "./src/text.ts");
10047
+ /* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
10048
+ /* harmony import */ var _nps__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../nps */ "./src/nps.ts");
10049
+ /* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../ranking */ "./src/ranking.ts");
10050
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
10051
+ /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
10050
10052
 
10051
10053
  //localization
10052
10054
 
@@ -10085,6 +10087,7 @@ __webpack_require__.r(__webpack_exports__);
10085
10087
 
10086
10088
 
10087
10089
 
10090
+
10088
10091
 
10089
10092
 
10090
10093
  /***/ }),
@@ -12130,8 +12133,9 @@ var PlotlySetup = /** @class */ (function () {
12130
12133
  text: labels.map(function (label) {
12131
12134
  return PlotlySetup.getTruncatedLabel(label, model.labelTruncateLength);
12132
12135
  }),
12133
- hoverinfo: "label+value+percent",
12136
+ hoverinfo: "value+text",
12134
12137
  textposition: "inside",
12138
+ texttemplate: "%{text}"
12135
12139
  };
12136
12140
  if (model.chartType === "doughnut") {
12137
12141
  traceConfig.type = "pie";
@@ -12145,9 +12149,15 @@ var PlotlySetup = /** @class */ (function () {
12145
12149
  }
12146
12150
  datasets.forEach(function (dataset, index) {
12147
12151
  var isNotEmpty = dataset.some(function (value) { return value != 0; });
12152
+ var pieTexts = traceConfig.text;
12153
+ if (model.showPercentages) {
12154
+ var percentages_1 = model.getPercentages([dataset])[0];
12155
+ pieTexts = labels.map(function (l, li) { return (model.showOnlyPercentages ? percentages_1[li] : PlotlySetup.getTruncatedLabel(l, model.labelTruncateLength) + "<br>" + percentages_1[li]) + "%"; });
12156
+ }
12148
12157
  if (isNotEmpty) {
12149
12158
  traces.push(Object.assign({}, traceConfig, {
12150
12159
  values: dataset,
12160
+ text: pieTexts,
12151
12161
  domain: {
12152
12162
  column: traces.length % layoutColumns,
12153
12163
  row: Math.floor(traces.length / layoutColumns),
@@ -12764,9 +12774,8 @@ var SelectBase = /** @class */ (function (_super) {
12764
12774
  _this.emptyAnswersBtn = undefined;
12765
12775
  _this.transposeDataBtn = undefined;
12766
12776
  _this.topNSelector = undefined;
12767
- _this._showPercentages = false;
12768
12777
  _this._showOnlyPercentages = false;
12769
- _this._percentagePrecision = 0;
12778
+ _this._percentagePrecision = 2;
12770
12779
  _this._answersOrder = "default";
12771
12780
  _this._hideEmptyAnswers = false;
12772
12781
  _this._topN = -1;
@@ -12788,7 +12797,6 @@ var SelectBase = /** @class */ (function (_super) {
12788
12797
  };
12789
12798
  }
12790
12799
  _this._supportSelection = true;
12791
- _this._showPercentages = _this.options.showPercentages === true;
12792
12800
  _this._showOnlyPercentages = _this.options.showOnlyPercentages === true;
12793
12801
  if (_this.options.percentagePrecision) {
12794
12802
  _this._percentagePrecision = _this.options.percentagePrecision;
@@ -13046,12 +13054,23 @@ var SelectBase = /** @class */ (function (_super) {
13046
13054
  enumerable: false,
13047
13055
  configurable: true
13048
13056
  });
13057
+ SelectBase.prototype.getShowPercentagesDefault = function () {
13058
+ if (this.options.showPercentages === undefined) {
13059
+ return ["pie", "doughnut"].indexOf(this.chartType) !== -1;
13060
+ }
13061
+ return this.options.showPercentages === true;
13062
+ };
13049
13063
  Object.defineProperty(SelectBase.prototype, "showPercentages", {
13050
13064
  /**
13051
13065
  * Gets and sets whether chart should show values and percentages.
13052
13066
  */
13053
13067
  get: function () {
13054
- return this._showPercentages;
13068
+ if (this._showPercentages !== undefined) {
13069
+ return this._showPercentages;
13070
+ }
13071
+ else {
13072
+ return this.getShowPercentagesDefault();
13073
+ }
13055
13074
  },
13056
13075
  set: function (val) {
13057
13076
  this._showPercentages = val;
@@ -13213,12 +13232,10 @@ var SelectBase = /** @class */ (function (_super) {
13213
13232
  var percentages = [];
13214
13233
  var percentagePrecision = this._percentagePrecision;
13215
13234
  if (data.length < 2) {
13216
- data.forEach(function (res, index) {
13217
- var sum = res.reduce(function (sum, val) { return sum + val; }, 0);
13218
- percentages[index] = res.map(function (val) {
13219
- var value = percentagePrecision ? +(val / sum).toFixed(percentagePrecision) : Math.round((val / sum) * 10000);
13220
- return sum && (value / 100);
13221
- });
13235
+ var sum = data[0].reduce(function (sum, val) { return sum + val; }, 0);
13236
+ percentages[0] = data[0].map(function (val) {
13237
+ var value = percentagePrecision ? +(val / sum * 100).toFixed(percentagePrecision) : Math.round(val / sum * 100);
13238
+ return sum && value;
13222
13239
  });
13223
13240
  }
13224
13241
  else {
@@ -13230,7 +13247,7 @@ var SelectBase = /** @class */ (function (_super) {
13230
13247
  for (var j = 0; j < data.length; j++) {
13231
13248
  if (!Array.isArray(percentages[j]))
13232
13249
  percentages[j] = [];
13233
- var value = percentagePrecision ? +((data[j][i] / sum) * 100).toFixed(percentagePrecision) : Math.round((data[j][i] / sum) * 100);
13250
+ var value = percentagePrecision ? +(data[j][i] / sum * 100).toFixed(percentagePrecision) : Math.round(data[j][i] / sum * 100);
13234
13251
  percentages[j][i] = sum && value;
13235
13252
  }
13236
13253
  }
@@ -13258,7 +13275,7 @@ var SelectBase = /** @class */ (function (_super) {
13258
13275
  */
13259
13276
  SelectBase.prototype.getAnswersData = function () {
13260
13277
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
13261
- var seriesLabels, datasets, labels, colors, texts, temp, zippedArray, dict, unzippedArray, answersData;
13278
+ var seriesLabels, datasets, labels, colors, temp, texts, zippedArray, dict, unzippedArray, answersData;
13262
13279
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
13263
13280
  switch (_a.label) {
13264
13281
  case 0:
@@ -13268,14 +13285,13 @@ var SelectBase = /** @class */ (function (_super) {
13268
13285
  datasets = (_a.sent());
13269
13286
  labels = this.getLabels();
13270
13287
  colors = this.getColors();
13271
- texts = this.showPercentages ? this.getPercentages(datasets) : datasets;
13272
13288
  if (this.transposeData) {
13273
13289
  datasets = this.transpose(datasets);
13274
- texts = this.transpose(texts);
13275
13290
  temp = seriesLabels;
13276
13291
  seriesLabels = labels;
13277
13292
  labels = temp;
13278
13293
  }
13294
+ texts = this.showPercentages ? this.getPercentages(datasets) : datasets;
13279
13295
  if (this.answersOrder == "asc" || this.answersOrder == "desc") {
13280
13296
  zippedArray = this.showPercentages
13281
13297
  ? _utils_index__WEBPACK_IMPORTED_MODULE_4__.DataHelper.zipArrays(labels, colors, texts[0])
@@ -14358,6 +14374,42 @@ function toPrecision(value, precision) {
14358
14374
  }
14359
14375
 
14360
14376
 
14377
+ /***/ }),
14378
+
14379
+ /***/ "./src/visualizationComposite.ts":
14380
+ /*!***************************************!*\
14381
+ !*** ./src/visualizationComposite.ts ***!
14382
+ \***************************************/
14383
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14384
+
14385
+ "use strict";
14386
+ __webpack_require__.r(__webpack_exports__);
14387
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14388
+ /* harmony export */ VisualizationComposite: () => (/* binding */ VisualizationComposite)
14389
+ /* harmony export */ });
14390
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
14391
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
14392
+ /* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
14393
+
14394
+
14395
+
14396
+ var VisualizationComposite = /** @class */ (function (_super) {
14397
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationComposite, _super);
14398
+ function VisualizationComposite(question, data, options, name) {
14399
+ return _super.call(this, question, data, options, name || "composite") || this;
14400
+ }
14401
+ VisualizationComposite.prototype.getQuestions = function () {
14402
+ var matrixdynamic = this.question;
14403
+ var innerQuestions = [];
14404
+ matrixdynamic.contentPanel.addQuestionsToList(innerQuestions);
14405
+ return innerQuestions;
14406
+ };
14407
+ return VisualizationComposite;
14408
+ }(_visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_2__.VisualizationPanelDynamic));
14409
+
14410
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("composite", VisualizationComposite);
14411
+
14412
+
14361
14413
  /***/ }),
14362
14414
 
14363
14415
  /***/ "./src/visualizationManager.ts":
@@ -14435,10 +14487,13 @@ var VisualizationManager = /** @class */ (function () {
14435
14487
  };
14436
14488
  /**
14437
14489
  * Returns all visualizer constructors for a specified question type.
14438
- * @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
14490
+ * @param visualizerType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
14439
14491
  */
14440
- VisualizationManager.getVisualizersByType = function (questionType) {
14441
- var vDescrs = VisualizationManager.vizualizers[questionType];
14492
+ VisualizationManager.getVisualizersByType = function (visualizerType, fallbackVisualizerType) {
14493
+ var vDescrs = VisualizationManager.vizualizers[visualizerType];
14494
+ if (!!fallbackVisualizerType && (!vDescrs || vDescrs.length == 0)) {
14495
+ vDescrs = VisualizationManager.vizualizers[fallbackVisualizerType];
14496
+ }
14442
14497
  if (!vDescrs) {
14443
14498
  if (VisualizationManager.defaultVisualizer.suppressVisualizerStubRendering) {
14444
14499
  return [];
@@ -14636,16 +14691,9 @@ __webpack_require__.r(__webpack_exports__);
14636
14691
 
14637
14692
  var VisualizationMatrixDynamic = /** @class */ (function (_super) {
14638
14693
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationMatrixDynamic, _super);
14639
- function VisualizationMatrixDynamic(question, data, options) {
14640
- return _super.call(this, question, data, options) || this;
14694
+ function VisualizationMatrixDynamic(question, data, options, name) {
14695
+ return _super.call(this, question, data, options, name || "matrixDynamic") || this;
14641
14696
  }
14642
- Object.defineProperty(VisualizationMatrixDynamic.prototype, "type", {
14643
- get: function () {
14644
- return "matrixDynamic";
14645
- },
14646
- enumerable: false,
14647
- configurable: true
14648
- });
14649
14697
  VisualizationMatrixDynamic.prototype.getQuestions = function () {
14650
14698
  var matrixdynamic = this.question;
14651
14699
  var visibleRows = matrixdynamic.visibleRows;
@@ -14696,8 +14744,8 @@ __webpack_require__.r(__webpack_exports__);
14696
14744
  /* harmony import */ var _filterInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filterInfo */ "./src/filterInfo.ts");
14697
14745
  /* harmony import */ var _layoutEngine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layoutEngine */ "./src/layoutEngine.ts");
14698
14746
  /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.ts");
14699
- /* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
14700
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
14747
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
14748
+ /* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
14701
14749
 
14702
14750
 
14703
14751
 
@@ -14828,7 +14876,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
14828
14876
  _this._layoutEngine.onMoveCallback = function (order) {
14829
14877
  return _this.reorderVisibleElements(order);
14830
14878
  };
14831
- _this.showToolbar = true;
14879
+ _this.showToolbar = isRoot;
14832
14880
  if (_this.options.survey) {
14833
14881
  _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.currentLocale = _this.options.survey.locale;
14834
14882
  }
@@ -14836,6 +14884,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
14836
14884
  _this._elements = _this.buildElements(questions);
14837
14885
  }
14838
14886
  _this.buildVisualizers(questions);
14887
+ _this.updateData(_this.surveyData);
14839
14888
  if (!_this.haveCommercialLicense && _this.isRoot) {
14840
14889
  _this.registerToolbarItem("commercialLicense", function () {
14841
14890
  return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
@@ -15023,7 +15072,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
15023
15072
  var visualizerData = _this.surveyData;
15024
15073
  var visualizer;
15025
15074
  if (Array.isArray(question)) {
15026
- visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
15075
+ visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_10__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
15027
15076
  }
15028
15077
  else {
15029
15078
  visualizer = _this.createVisualizer(question, visualizerOptions, visualizerData);
@@ -15490,40 +15539,32 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
15490
15539
  };
15491
15540
  _this.loadingData = false;
15492
15541
  var options = Object.assign({}, options);
15542
+ options.allowHideQuestions = false;
15493
15543
  options.allowDynamicLayout = false;
15494
15544
  options.dataProvider = undefined;
15545
+ options.dataPath = _this.dataNames[0];
15495
15546
  _this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
15496
15547
  _this._panelVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
15497
15548
  _this.updateData(data);
15498
15549
  return _this;
15499
15550
  }
15500
- VisualizationPanelDynamic.prototype.setLocale = function (newLocale) {
15501
- _super.prototype.setLocale.call(this, newLocale);
15502
- this._panelVisualizer.locale = newLocale;
15503
- };
15504
- Object.defineProperty(VisualizationPanelDynamic.prototype, "type", {
15551
+ Object.defineProperty(VisualizationPanelDynamic.prototype, "contentVisualizer", {
15505
15552
  get: function () {
15506
- return "panelDynamic";
15553
+ return this._panelVisualizer;
15507
15554
  },
15508
15555
  enumerable: false,
15509
15556
  configurable: true
15510
15557
  });
15511
- VisualizationPanelDynamic.prototype.updatePanelVisualizerData = function () {
15512
- var _this = this;
15513
- var panelData = [];
15514
- this.data.forEach(function (dataItem) {
15515
- if (dataItem[_this.question.name] !== undefined) {
15516
- panelData = panelData.concat(dataItem[_this.question.name]);
15517
- }
15518
- });
15519
- this._panelVisualizer.updateData(panelData);
15558
+ VisualizationPanelDynamic.prototype.setLocale = function (newLocale) {
15559
+ _super.prototype.setLocale.call(this, newLocale);
15560
+ this._panelVisualizer.locale = newLocale;
15520
15561
  };
15521
15562
  VisualizationPanelDynamic.prototype.updateData = function (data) {
15522
15563
  _super.prototype.updateData.call(this, data);
15523
- this.updatePanelVisualizerData();
15564
+ this._panelVisualizer.updateData(data);
15524
15565
  };
15525
15566
  VisualizationPanelDynamic.prototype.onDataChanged = function () {
15526
- this.updatePanelVisualizerData();
15567
+ this._panelVisualizer.updateData(this.dataProvider.filteredData);
15527
15568
  _super.prototype.onDataChanged.call(this);
15528
15569
  };
15529
15570
  VisualizationPanelDynamic.prototype.getQuestions = function () {
@@ -15952,11 +15993,26 @@ var VisualizerBase = /** @class */ (function () {
15952
15993
  * @param data A data array with survey results to be visualized.
15953
15994
  */
15954
15995
  VisualizerBase.prototype.updateData = function (data) {
15996
+ var dataPath = this.options.dataPath;
15997
+ var dataToAssign = data;
15998
+ if (!!dataPath && Array.isArray(data)) {
15999
+ dataToAssign = [];
16000
+ data.forEach(function (dataItem) {
16001
+ if (!!dataItem && dataItem[dataPath] !== undefined) {
16002
+ if (Array.isArray(dataItem[dataPath])) {
16003
+ dataToAssign = dataToAssign.concat(dataItem[dataPath]);
16004
+ }
16005
+ else {
16006
+ dataToAssign.push(dataItem[dataPath]);
16007
+ }
16008
+ }
16009
+ });
16010
+ }
15955
16011
  if (!this.options.dataProvider) {
15956
- this.dataProvider.data = data;
16012
+ this.dataProvider.data = dataToAssign;
15957
16013
  }
15958
16014
  if (this.hasFooter) {
15959
- this.footerVisualizer.updateData(data);
16015
+ this.footerVisualizer.updateData(dataToAssign);
15960
16016
  }
15961
16017
  };
15962
16018
  VisualizerBase.prototype.invokeOnUpdate = function () {
@@ -16446,7 +16502,10 @@ __webpack_require__.r(__webpack_exports__);
16446
16502
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16447
16503
  /* harmony export */ VisualizerFactory: () => (/* binding */ VisualizerFactory)
16448
16504
  /* harmony export */ });
16449
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
16505
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
16506
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
16507
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
16508
+
16450
16509
 
16451
16510
  /**
16452
16511
  * An object that allows you to create individual visualizers without creating a [visualization panel](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel).
@@ -16477,21 +16536,26 @@ var VisualizerFactory = /** @class */ (function () {
16477
16536
  VisualizerFactory.createVisualizer = function (question, data, options) {
16478
16537
  var type = question.getType();
16479
16538
  var creators = [];
16539
+ var questionForCreator = question;
16540
+ var optionsForCreator = Object.assign({}, options);
16480
16541
  if (type === "text" && question.inputType) {
16481
- type = question.inputType;
16482
- creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
16483
- if (creators === undefined || creators.length == 0) {
16484
- type = "text";
16485
- creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
16486
- }
16542
+ creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getVisualizersByType(question.inputType, type);
16487
16543
  }
16488
16544
  else {
16489
- creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
16545
+ var fallbackType = undefined;
16546
+ if (question instanceof survey_core__WEBPACK_IMPORTED_MODULE_0__.QuestionCustomModel) {
16547
+ fallbackType = question.getDynamicType();
16548
+ // questionForCreator = question.contentQuestion;
16549
+ }
16550
+ else if (question instanceof survey_core__WEBPACK_IMPORTED_MODULE_0__.QuestionCompositeModel) {
16551
+ fallbackType = "composite";
16552
+ }
16553
+ creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getVisualizersByType(type, fallbackType);
16490
16554
  }
16491
- var visualizers = creators.map(function (creator) { return new creator(question, data, options); });
16555
+ var visualizers = creators.map(function (creator) { return new creator(questionForCreator, data, optionsForCreator); });
16492
16556
  if (visualizers.length > 1) {
16493
- var alternativesVisualizerConstructor = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getAltVisualizerSelector();
16494
- var visualizer = new alternativesVisualizerConstructor(visualizers, question, data, options);
16557
+ var alternativesVisualizerConstructor = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getAltVisualizerSelector();
16558
+ var visualizer = new alternativesVisualizerConstructor(visualizers, questionForCreator, data, optionsForCreator);
16495
16559
  return visualizer;
16496
16560
  }
16497
16561
  return visualizers[0];
@@ -18444,6 +18508,7 @@ __webpack_require__.r(__webpack_exports__);
18444
18508
  /* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTableBoolean),
18445
18509
  /* harmony export */ Text: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.Text),
18446
18510
  /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.TextTableAdapter),
18511
+ /* harmony export */ VisualizationComposite: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationComposite),
18447
18512
  /* harmony export */ VisualizationManager: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager),
18448
18513
  /* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDropdown),
18449
18514
  /* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDynamic),