survey-analytics 2.2.3 → 2.2.5

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 (53) hide show
  1. package/fesm/shared.mjs +2 -1
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +379 -268
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/survey.analytics.core.mjs +2 -2
  6. package/fesm/survey.analytics.mjs +177 -418
  7. package/fesm/survey.analytics.mjs.map +1 -1
  8. package/fesm/survey.analytics.tabulator.mjs +16 -4
  9. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  10. package/package.json +6 -5
  11. package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +1 -0
  12. package/survey-analytics-tabulator.types/localizationManager.d.ts +1 -0
  13. package/survey-analytics-tabulator.types/tables/extensions/tableextensions.d.ts +1 -0
  14. package/survey-analytics.types/analytics-localization/english.d.ts +1 -0
  15. package/survey-analytics.types/boolean.d.ts +0 -1
  16. package/survey-analytics.types/entries/summary.core.d.ts +2 -1
  17. package/survey-analytics.types/histogram.d.ts +1 -1
  18. package/survey-analytics.types/localizationManager.d.ts +1 -0
  19. package/survey-analytics.types/pivot.d.ts +2 -0
  20. package/survey-analytics.types/plotly/chart-adapter.d.ts +22 -0
  21. package/survey-analytics.types/plotly/index.d.ts +2 -8
  22. package/survey-analytics.types/plotly/legacy.d.ts +33 -0
  23. package/survey-analytics.types/plotly/setup.d.ts +5 -3
  24. package/survey-analytics.types/{plotly/ranking.d.ts → ranking.d.ts} +2 -2
  25. package/survey-analytics.types/selectBase.d.ts +2 -0
  26. package/survey-analytics.types/statisticCalculators.d.ts +4 -0
  27. package/survey-analytics.types/visualizationManager.d.ts +1 -0
  28. package/survey-analytics.types/visualizerBase.d.ts +12 -3
  29. package/survey.analytics.core.css +1 -1
  30. package/survey.analytics.core.js +355 -151
  31. package/survey.analytics.core.js.map +1 -1
  32. package/survey.analytics.core.min.css +1 -1
  33. package/survey.analytics.core.min.js +1 -1
  34. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  35. package/survey.analytics.css +1 -1
  36. package/survey.analytics.js +679 -909
  37. package/survey.analytics.js.map +1 -1
  38. package/survey.analytics.min.css +1 -1
  39. package/survey.analytics.min.js +1 -1
  40. package/survey.analytics.min.js.LICENSE.txt +1 -1
  41. package/survey.analytics.tabulator.css +1 -1
  42. package/survey.analytics.tabulator.js +39 -5
  43. package/survey.analytics.tabulator.js.map +1 -1
  44. package/survey.analytics.tabulator.min.css +1 -1
  45. package/survey.analytics.tabulator.min.js +1 -1
  46. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
  47. package/survey-analytics.types/plotly/boolean.d.ts +0 -16
  48. package/survey-analytics.types/plotly/histogram.d.ts +0 -12
  49. package/survey-analytics.types/plotly/matrix.d.ts +0 -11
  50. package/survey-analytics.types/plotly/matrixdropdown-grouped.d.ts +0 -11
  51. package/survey-analytics.types/plotly/pivot.d.ts +0 -12
  52. package/survey-analytics.types/plotly/rating.d.ts +0 -20
  53. package/survey-analytics.types/plotly/selectBase.d.ts +0 -25
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.2.3
2
+ * surveyjs - SurveyJS Dashboard library v2.2.5
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
  */
@@ -7289,6 +7289,7 @@ var englishStrings = {
7289
7289
  ascOrder: "Ascending",
7290
7290
  descOrder: "Descending",
7291
7291
  showMinorColumns: "Show minor columns",
7292
+ actionsColumn: "Actions",
7292
7293
  otherCommentTitle: "Other items and comments",
7293
7294
  showPercentages: "Show percentages",
7294
7295
  hidePercentages: "Hide percentages",
@@ -8443,6 +8444,8 @@ __webpack_require__.r(__webpack_exports__);
8443
8444
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
8444
8445
  /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
8445
8446
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
8447
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
8448
+
8446
8449
 
8447
8450
 
8448
8451
 
@@ -8506,6 +8509,7 @@ var BooleanModel = /** @class */ (function (_super) {
8506
8509
  return BooleanModel;
8507
8510
  }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
8508
8511
 
8512
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("boolean", BooleanModel);
8509
8513
 
8510
8514
 
8511
8515
  /***/ }),
@@ -8667,18 +8671,19 @@ function questionContainsValue(questionValue, filterValue) {
8667
8671
  __webpack_require__.r(__webpack_exports__);
8668
8672
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8669
8673
  /* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_27__.AlternativeVisualizersWrapper),
8670
- /* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_19__.BooleanModel),
8674
+ /* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_18__.BooleanModel),
8671
8675
  /* 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),
8676
+ /* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_35__.DocumentHelper),
8677
+ /* harmony export */ HistogramModel: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_19__.HistogramModel),
8678
+ /* harmony export */ Matrix: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_17__.Matrix),
8675
8679
  /* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_32__.NpsAdapter),
8676
8680
  /* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_32__.NpsVisualizer),
8677
8681
  /* 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),
8682
+ /* harmony export */ NumberModel: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_20__.NumberModel),
8683
+ /* harmony export */ PivotModel: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_34__.PivotModel),
8680
8684
  /* harmony export */ PostponeHelper: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_21__.PostponeHelper),
8681
- /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
8685
+ /* harmony export */ RankingModel: () => (/* reexport safe */ _ranking__WEBPACK_IMPORTED_MODULE_33__.RankingModel),
8686
+ /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_16__.SelectBase),
8682
8687
  /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_31__.StatisticsTable),
8683
8688
  /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_31__.StatisticsTableAdapter),
8684
8689
  /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_30__.Text),
@@ -8692,8 +8697,7 @@ __webpack_require__.r(__webpack_exports__);
8692
8697
  /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_15__.VisualizerFactory),
8693
8698
  /* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_28__.WordCloud),
8694
8699
  /* 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),
8700
+ /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_16__.hideEmptyAnswersInData),
8697
8701
  /* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
8698
8702
  /* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
8699
8703
  /* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_29__.textHelper)
@@ -8714,11 +8718,11 @@ __webpack_require__.r(__webpack_exports__);
8714
8718
  /* harmony import */ var _analytics_localization_finnish__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../analytics-localization/finnish */ "./src/analytics-localization/finnish.ts");
8715
8719
  /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../dataProvider */ "./src/dataProvider.ts");
8716
8720
  /* 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");
8721
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
8722
+ /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../matrix */ "./src/matrix.ts");
8723
+ /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
8724
+ /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../histogram */ "./src/histogram.ts");
8725
+ /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../number */ "./src/number.ts");
8722
8726
  /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../visualizerBase */ "./src/visualizerBase.ts");
8723
8727
  /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
8724
8728
  /* harmony import */ var _visualizationPanel__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../visualizationPanel */ "./src/visualizationPanel.ts");
@@ -8731,8 +8735,9 @@ __webpack_require__.r(__webpack_exports__);
8731
8735
  /* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../text */ "./src/text.ts");
8732
8736
  /* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
8733
8737
  /* 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");
8738
+ /* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../ranking */ "./src/ranking.ts");
8739
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
8740
+ /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
8736
8741
 
8737
8742
  //localization
8738
8743
 
@@ -8769,6 +8774,7 @@ __webpack_require__.r(__webpack_exports__);
8769
8774
 
8770
8775
 
8771
8776
 
8777
+
8772
8778
 
8773
8779
 
8774
8780
  /***/ }),
@@ -8840,6 +8846,10 @@ __webpack_require__.r(__webpack_exports__);
8840
8846
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
8841
8847
  /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
8842
8848
  /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
8849
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
8850
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
8851
+
8852
+
8843
8853
 
8844
8854
 
8845
8855
 
@@ -9012,30 +9022,19 @@ var HistogramModel = /** @class */ (function (_super) {
9012
9022
  };
9013
9023
  HistogramModel.prototype.getCalculatedValuesCore = function () {
9014
9024
  var continiousValues = this.getContiniousValues();
9015
- var intervals = this.intervals;
9016
- var statistics = [];
9017
- var series = this.getSeriesValues();
9018
- if (series.length === 0) {
9019
- series.push("");
9020
- }
9021
- for (var i = 0; i < series.length; ++i) {
9022
- statistics.push(intervals.map(function (i) { return 0; }));
9023
- this._continiousData[series[i]].forEach(function (dataValue) {
9024
- for (var j = 0; j < intervals.length; ++j) {
9025
- if (intervals[j].start <= dataValue && (dataValue < intervals[j].end || j == intervals.length - 1)) {
9026
- statistics[i][j]++;
9027
- break;
9028
- }
9029
- }
9030
- });
9031
- }
9032
- return statistics;
9025
+ return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.histogramStatisticsCalculator)(this._continiousData, this.intervals, this.getSeriesValues());
9026
+ };
9027
+ HistogramModel.prototype.getValueType = function () {
9028
+ return this.valueType;
9033
9029
  };
9034
9030
  HistogramModel.IntervalsCount = 10;
9035
9031
  HistogramModel.UseIntervalsFrom = 10;
9036
9032
  return HistogramModel;
9037
9033
  }(_selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase));
9038
9034
 
9035
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("date", HistogramModel);
9036
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("number", HistogramModel, 100);
9037
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", HistogramModel, 100);
9039
9038
 
9040
9039
 
9041
9040
  /***/ }),
@@ -9395,6 +9394,8 @@ __webpack_require__.r(__webpack_exports__);
9395
9394
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
9396
9395
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
9397
9396
  /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
9397
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
9398
+
9398
9399
 
9399
9400
 
9400
9401
 
@@ -9489,6 +9490,7 @@ var Matrix = /** @class */ (function (_super) {
9489
9490
  return Matrix;
9490
9491
  }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
9491
9492
 
9493
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("matrix", Matrix);
9492
9494
 
9493
9495
 
9494
9496
  /***/ }),
@@ -9506,7 +9508,9 @@ __webpack_require__.r(__webpack_exports__);
9506
9508
  /* harmony export */ });
9507
9509
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
9508
9510
  /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
9509
- /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
9511
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
9512
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
9513
+
9510
9514
 
9511
9515
 
9512
9516
 
@@ -9514,7 +9518,6 @@ var MatrixDropdownGrouped = /** @class */ (function (_super) {
9514
9518
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixDropdownGrouped, _super);
9515
9519
  function MatrixDropdownGrouped(question, data, options, name) {
9516
9520
  return _super.call(this, question, data, options, name || "matrixDropdownGrouped") || this;
9517
- // this.getAnswersData();
9518
9521
  }
9519
9522
  Object.defineProperty(MatrixDropdownGrouped.prototype, "matrixQuestion", {
9520
9523
  get: function () {
@@ -9551,7 +9554,7 @@ var MatrixDropdownGrouped = /** @class */ (function (_super) {
9551
9554
  var values = this.getValues();
9552
9555
  var series = this.getSeriesValues();
9553
9556
  var rows = this.matrixQuestion.rows.map(function (row) { return row.value; });
9554
- var statistics = (0,_visualizerBase__WEBPACK_IMPORTED_MODULE_2__.defaultStatisticsCalculator)(this.surveyData, {
9557
+ var statistics = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_2__.defaultStatisticsCalculator)(this.surveyData, {
9555
9558
  name: this.name,
9556
9559
  dataNames: series,
9557
9560
  getValues: function () { return values; },
@@ -9559,16 +9562,12 @@ var MatrixDropdownGrouped = /** @class */ (function (_super) {
9559
9562
  getSeriesValues: function () { return rows; },
9560
9563
  getSeriesLabels: function () { return rows; },
9561
9564
  });
9562
- var preparedData = [];
9563
- values.forEach(function (val, valueIndex) {
9564
- var seriesData = series.map(function (seriesName, seriesIndex) { return statistics[seriesIndex][0][valueIndex]; });
9565
- preparedData.push(seriesData);
9566
- });
9567
- return preparedData;
9565
+ return statistics.map(function (s) { return s[0]; });
9568
9566
  };
9569
9567
  return MatrixDropdownGrouped;
9570
9568
  }(_selectBase__WEBPACK_IMPORTED_MODULE_1__.SelectBase));
9571
9569
 
9570
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("matrixdropdown-grouped", MatrixDropdownGrouped);
9572
9571
 
9573
9572
 
9574
9573
  /***/ }),
@@ -9798,6 +9797,10 @@ __webpack_require__.r(__webpack_exports__);
9798
9797
  /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
9799
9798
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
9800
9799
  /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/index */ "./src/utils/index.ts");
9800
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
9801
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
9802
+
9803
+
9801
9804
 
9802
9805
 
9803
9806
 
@@ -9807,6 +9810,11 @@ var NumberModel = /** @class */ (function (_super) {
9807
9810
  function NumberModel(question, data, options, name) {
9808
9811
  if (options === void 0) { options = {}; }
9809
9812
  var _this = _super.call(this, question, data, options, name || "number") || this;
9813
+ if (_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase.chartAdapterType) {
9814
+ _this._chartAdapter = new _visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase.chartAdapterType(_this);
9815
+ _this.chartTypes = _this._chartAdapter.getChartTypes();
9816
+ _this.chartType = _this.chartTypes[0];
9817
+ }
9810
9818
  _this.registerToolbarItem("changeChartType", function () {
9811
9819
  if (_this.chartTypes.length > 1) {
9812
9820
  return _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
@@ -9891,31 +9899,11 @@ var NumberModel = /** @class */ (function (_super) {
9891
9899
  return [externalCalculatedData.value || 0, externalCalculatedData.minValue || 0, externalCalculatedData.maxValue || 0];
9892
9900
  };
9893
9901
  NumberModel.prototype.getCalculatedValuesCore = function () {
9894
- var _this = this;
9902
+ var _a;
9895
9903
  if (this._resultAverage === undefined ||
9896
9904
  this._resultMin === undefined ||
9897
9905
  this._resultMax === undefined) {
9898
- this._resultMin = Number.MAX_VALUE;
9899
- this._resultMax = -Number.MAX_VALUE;
9900
- this._resultAverage = 0;
9901
- var actualAnswerCount_1 = 0;
9902
- this.data.forEach(function (rowData) {
9903
- if (rowData[_this.question.name] !== undefined) {
9904
- var questionValue = +rowData[_this.question.name];
9905
- actualAnswerCount_1++;
9906
- _this._resultAverage += questionValue;
9907
- if (_this._resultMin > questionValue) {
9908
- _this._resultMin = questionValue;
9909
- }
9910
- if (_this._resultMax < questionValue) {
9911
- _this._resultMax = questionValue;
9912
- }
9913
- }
9914
- });
9915
- if (actualAnswerCount_1 > 0) {
9916
- this._resultAverage = this._resultAverage / actualAnswerCount_1;
9917
- }
9918
- this._resultAverage = Math.ceil(this._resultAverage * 100) / 100;
9906
+ _a = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.mathStatisticsCalculator)(this.surveyData, this.dataNames[0]), this._resultAverage = _a[0], this._resultMin = _a[1], this._resultMax = _a[2];
9919
9907
  }
9920
9908
  return [this._resultAverage, this._resultMin, this._resultMax];
9921
9909
  };
@@ -9924,6 +9912,9 @@ var NumberModel = /** @class */ (function (_super) {
9924
9912
  return NumberModel;
9925
9913
  }(_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase));
9926
9914
 
9915
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("number", NumberModel, 200);
9916
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", NumberModel, 200);
9917
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("expression", NumberModel);
9927
9918
 
9928
9919
 
9929
9920
  /***/ }),
@@ -9946,6 +9937,8 @@ __webpack_require__.r(__webpack_exports__);
9946
9937
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
9947
9938
  /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
9948
9939
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
9940
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
9941
+
9949
9942
 
9950
9943
 
9951
9944
 
@@ -10140,7 +10133,7 @@ var PivotModel = /** @class */ (function (_super) {
10140
10133
  });
10141
10134
  PivotModel.prototype.getSeriesValues = function () {
10142
10135
  var _this = this;
10143
- if (this.questionsY.length === 0) {
10136
+ if (!this.questionsY || this.questionsY.length === 0) {
10144
10137
  return this.options.seriesValues || [];
10145
10138
  }
10146
10139
  var seriesValues = [];
@@ -10329,165 +10322,235 @@ var PivotModel = /** @class */ (function (_super) {
10329
10322
  }
10330
10323
  return statistics;
10331
10324
  };
10325
+ PivotModel.prototype.getValueType = function () {
10326
+ return this.valueType;
10327
+ };
10328
+ PivotModel.prototype.isSupportSoftUpdateContent = function () {
10329
+ return false;
10330
+ };
10332
10331
  PivotModel.IntervalsCount = 10;
10333
10332
  PivotModel.UseIntervalsFrom = 10;
10334
10333
  return PivotModel;
10335
10334
  }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
10336
10335
 
10336
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_6__.VisualizationManager.registerPivotVisualizer(PivotModel);
10337
10337
 
10338
10338
 
10339
10339
  /***/ }),
10340
10340
 
10341
- /***/ "./src/plotly/boolean.ts":
10342
- /*!*******************************!*\
10343
- !*** ./src/plotly/boolean.ts ***!
10344
- \*******************************/
10341
+ /***/ "./src/plotly/chart-adapter.ts":
10342
+ /*!*************************************!*\
10343
+ !*** ./src/plotly/chart-adapter.ts ***!
10344
+ \*************************************/
10345
10345
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10346
10346
 
10347
10347
  "use strict";
10348
10348
  __webpack_require__.r(__webpack_exports__);
10349
10349
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10350
- /* harmony export */ BooleanPlotly: () => (/* binding */ BooleanPlotly),
10351
- /* harmony export */ PlotlyBoolChartAdapter: () => (/* binding */ PlotlyBoolChartAdapter)
10350
+ /* harmony export */ PlotlyChartAdapter: () => (/* binding */ PlotlyChartAdapter),
10351
+ /* harmony export */ plotlyChartTypes: () => (/* binding */ plotlyChartTypes)
10352
10352
  /* harmony export */ });
10353
10353
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10354
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10355
- /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
10356
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10357
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10354
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
10355
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
10356
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
10357
+ /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
10358
+ /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! plotly.js-dist-min */ "plotly.js-dist-min");
10359
+ /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4__);
10360
+ /* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./setup */ "./src/plotly/setup.ts");
10361
+ /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../visualizerBase */ "./src/visualizerBase.ts");
10362
+ /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
10363
+ /* harmony import */ var _legacy__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./legacy */ "./src/plotly/legacy.ts");
10364
+
10365
+
10366
+
10358
10367
 
10359
10368
 
10360
10369
 
10361
10370
 
10362
10371
 
10363
- var PlotlyBoolChartAdapter = /** @class */ (function (_super) {
10364
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PlotlyBoolChartAdapter, _super);
10365
- function PlotlyBoolChartAdapter(model) {
10366
- return _super.call(this, model) || this;
10372
+
10373
+ var plotlyChartTypes = {
10374
+ "boolean": _legacy__WEBPACK_IMPORTED_MODULE_8__.BooleanPlotly.types,
10375
+ "number": _legacy__WEBPACK_IMPORTED_MODULE_8__.GaugePlotly.types,
10376
+ "selectBase": _legacy__WEBPACK_IMPORTED_MODULE_8__.SelectBasePlotly.types,
10377
+ "histogram": _legacy__WEBPACK_IMPORTED_MODULE_8__.HistogramPlotly.types,
10378
+ "matrix": _legacy__WEBPACK_IMPORTED_MODULE_8__.MatrixPlotly.types,
10379
+ "matrixDropdownGrouped": _legacy__WEBPACK_IMPORTED_MODULE_8__.MatrixDropdownGroupedPlotly.types,
10380
+ "pivot": _legacy__WEBPACK_IMPORTED_MODULE_8__.PivotPlotly.types,
10381
+ };
10382
+ var PlotlyChartAdapter = /** @class */ (function () {
10383
+ function PlotlyChartAdapter(model) {
10384
+ this.model = model;
10385
+ this._chart = undefined;
10367
10386
  }
10368
- PlotlyBoolChartAdapter.prototype.patchConfigParameters = function (chartNode, traces, layout, config) {
10369
- var colors = this.model.getColors();
10370
- var boolColors = [
10371
- BooleanPlotly.trueColor || colors[0],
10372
- BooleanPlotly.falseColor || colors[1],
10373
- ];
10374
- if (this.model.showMissingAnswers) {
10375
- boolColors.push(colors[2]);
10376
- }
10377
- if (this.model.chartType === "pie" || this.model.chartType === "doughnut") {
10378
- traces.forEach(function (trace) {
10379
- trace.marker.colors = boolColors;
10380
- });
10387
+ PlotlyChartAdapter.prototype.patchConfigParameters = function (chartNode, traces, layout, config) {
10388
+ if (this.model.question.getType() === "boolean") {
10389
+ var colors = this.model.getColors();
10390
+ var boolColors_1 = [
10391
+ _boolean__WEBPACK_IMPORTED_MODULE_7__.BooleanModel.trueColor || colors[0],
10392
+ _boolean__WEBPACK_IMPORTED_MODULE_7__.BooleanModel.falseColor || colors[1],
10393
+ ];
10394
+ if (this.model.showMissingAnswers) {
10395
+ boolColors_1.push(colors[2]);
10396
+ }
10397
+ var chartType = this.model.chartType;
10398
+ if (chartType === "pie" || chartType === "doughnut") {
10399
+ traces.forEach(function (trace) {
10400
+ trace.marker.colors = boolColors_1;
10401
+ });
10402
+ }
10403
+ else if (chartType === "bar") {
10404
+ traces.forEach(function (trace) {
10405
+ trace.marker.color = boolColors_1;
10406
+ });
10407
+ }
10381
10408
  }
10382
- else if (this.model.chartType === "bar") {
10383
- traces.forEach(function (trace) {
10384
- trace.marker.color = boolColors;
10385
- });
10409
+ if (this.model.type === "number") {
10410
+ config.displayModeBar = true;
10386
10411
  }
10387
10412
  };
10388
- return PlotlyBoolChartAdapter;
10389
- }(_selectBase__WEBPACK_IMPORTED_MODULE_3__.PlotlyChartAdapter));
10390
-
10391
- var BooleanPlotly = /** @class */ (function (_super) {
10392
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BooleanPlotly, _super);
10393
- function BooleanPlotly(question, data, options, name) {
10394
- var _this = _super.call(this, question, data, options, name) || this;
10395
- _this.chartTypes = BooleanPlotly.types;
10396
- _this._chartType = _this.chartTypes[0];
10397
- _this._chartAdapter = new PlotlyBoolChartAdapter(_this);
10398
- return _this;
10399
- }
10400
- BooleanPlotly.prototype.destroyContent = function (container) {
10401
- this._chartAdapter.destroy(container.children[0]);
10402
- _super.prototype.destroyContent.call(this, container);
10413
+ Object.defineProperty(PlotlyChartAdapter.prototype, "chart", {
10414
+ get: function () {
10415
+ return this._chart;
10416
+ },
10417
+ enumerable: false,
10418
+ configurable: true
10419
+ });
10420
+ PlotlyChartAdapter.prototype.getChartTypes = function () {
10421
+ var visualizerType = this.model.type;
10422
+ var chartCtypes = plotlyChartTypes[visualizerType];
10423
+ return chartCtypes || [];
10403
10424
  };
10404
- BooleanPlotly.prototype.renderContentAsync = function (container) {
10425
+ PlotlyChartAdapter.prototype.create = function (chartNode) {
10405
10426
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10406
- var chartNode;
10407
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10408
- switch (_a.label) {
10409
- case 0:
10410
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
10411
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10427
+ var _a, plot, plotlyOptions, _model_1, getDragLayer;
10428
+ var _this = this;
10429
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {
10430
+ switch (_b.label) {
10431
+ case 0: return [4 /*yield*/, this.update(chartNode)];
10412
10432
  case 1:
10413
- _a.sent();
10414
- container.innerHTML = "";
10415
- container.appendChild(chartNode);
10416
- return [2 /*return*/, container];
10433
+ _a = _b.sent(), plot = _a[0], plotlyOptions = _a[1];
10434
+ if (this.model instanceof _selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase) {
10435
+ _model_1 = this.model;
10436
+ chartNode["on"]("plotly_click", function (data) {
10437
+ var _a;
10438
+ if (data.points.length > 0) {
10439
+ var itemText = "";
10440
+ if (!plotlyOptions.hasSeries) {
10441
+ itemText = Array.isArray(data.points[0].customdata)
10442
+ ? data.points[0].customdata[0]
10443
+ : data.points[0].customdata;
10444
+ var item = _model_1.getSelectedItemByText(itemText);
10445
+ _model_1.setSelection(item);
10446
+ }
10447
+ else {
10448
+ itemText = data.points[0].data.name;
10449
+ var propertyLabel = data.points[0].label;
10450
+ var seriesValues = _this.model.getSeriesValues();
10451
+ var seriesLabels = _this.model.getSeriesLabels();
10452
+ var propertyValue = seriesValues[seriesLabels.indexOf(propertyLabel)];
10453
+ var selectedItem = _model_1.getSelectedItemByText(itemText);
10454
+ var item = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue((_a = {}, _a[propertyValue] = selectedItem.value, _a), propertyLabel + ": " + selectedItem.text);
10455
+ _model_1.setSelection(item);
10456
+ }
10457
+ // const itemText = plotlyOptions.hasSeries
10458
+ // ? data.points[0].data.name
10459
+ // : Array.isArray(data.points[0].customdata)
10460
+ // ? data.points[0].customdata[0]
10461
+ // : data.points[0].customdata;
10462
+ // const item: ItemValue = this.model.getSelectedItemByText(itemText);
10463
+ // this.model.setSelection(item);
10464
+ }
10465
+ });
10466
+ }
10467
+ getDragLayer = function () {
10468
+ return chartNode.getElementsByClassName("nsewdrag")[0];
10469
+ };
10470
+ chartNode["on"]("plotly_hover", function () {
10471
+ var dragLayer = getDragLayer();
10472
+ dragLayer && (dragLayer.style.cursor = "pointer");
10473
+ });
10474
+ chartNode["on"]("plotly_unhover", function () {
10475
+ var dragLayer = getDragLayer();
10476
+ dragLayer && (dragLayer.style.cursor = "");
10477
+ });
10478
+ // setTimeout(() => Plotly.Plots.resize(chartNode), 10);
10479
+ this._chart = plot;
10480
+ return [2 /*return*/, plot];
10417
10481
  }
10418
10482
  });
10419
10483
  });
10420
10484
  };
10421
- BooleanPlotly.types = ["pie", "bar", "doughnut"];
10422
- return BooleanPlotly;
10423
- }(_boolean__WEBPACK_IMPORTED_MODULE_2__.BooleanModel));
10424
-
10425
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("boolean", BooleanPlotly);
10426
-
10427
-
10428
- /***/ }),
10429
-
10430
- /***/ "./src/plotly/histogram.ts":
10431
- /*!*********************************!*\
10432
- !*** ./src/plotly/histogram.ts ***!
10433
- \*********************************/
10434
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10435
-
10436
- "use strict";
10437
- __webpack_require__.r(__webpack_exports__);
10438
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10439
- /* harmony export */ HistogramPlotly: () => (/* binding */ HistogramPlotly)
10440
- /* harmony export */ });
10441
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10442
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10443
- /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../histogram */ "./src/histogram.ts");
10444
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10445
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10446
-
10447
-
10448
-
10449
-
10450
-
10451
- var HistogramPlotly = /** @class */ (function (_super) {
10452
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(HistogramPlotly, _super);
10453
- function HistogramPlotly(question, data, options, name) {
10454
- var _this = _super.call(this, question, data, options, name) || this;
10455
- _this.chartTypes = HistogramPlotly.types;
10456
- _this._chartType = _this.chartTypes[0];
10457
- _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_3__.PlotlyChartAdapter(_this);
10458
- return _this;
10459
- }
10460
- HistogramPlotly.prototype.destroyContent = function (container) {
10461
- this._chartAdapter.destroy(container.children[0]);
10462
- _super.prototype.destroyContent.call(this, container);
10463
- };
10464
- HistogramPlotly.prototype.renderContentAsync = function (container) {
10485
+ PlotlyChartAdapter.prototype.update = function (chartNode) {
10465
10486
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10466
- var chartNode;
10467
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10468
- switch (_a.label) {
10487
+ var answersData, _a, plotlyOptions, config, options, plot;
10488
+ var _this = this;
10489
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {
10490
+ switch (_b.label) {
10469
10491
  case 0:
10470
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
10471
- container.innerHTML = "";
10472
- container.appendChild(chartNode);
10473
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10492
+ if (!(this.model instanceof _selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase)) return [3 /*break*/, 2];
10493
+ return [4 /*yield*/, this.model.getAnswersData()];
10474
10494
  case 1:
10475
- _a.sent();
10476
- return [2 /*return*/, container];
10495
+ _a = _b.sent();
10496
+ return [3 /*break*/, 4];
10497
+ case 2: return [4 /*yield*/, this.model.getCalculatedValues()];
10498
+ case 3:
10499
+ _a = _b.sent();
10500
+ _b.label = 4;
10501
+ case 4:
10502
+ answersData = _a;
10503
+ plotlyOptions = _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.setup(this.model.chartType, this.model, answersData);
10504
+ config = {
10505
+ displaylogo: false,
10506
+ responsive: true,
10507
+ locale: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.currentLocale,
10508
+ modeBarButtonsToRemove: ["toImage"],
10509
+ modeBarButtonsToAdd: [
10510
+ {
10511
+ name: "toImageSjs",
10512
+ title: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("saveDiagramAsPNG"),
10513
+ icon: (plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4___default().Icons).camera,
10514
+ click: function (gd) {
10515
+ var options = {
10516
+ format: _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.imageExportFormat,
10517
+ // width: 800,
10518
+ // height: 600,
10519
+ filename: _this.model.question.name,
10520
+ };
10521
+ _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.onImageSaving.fire(_this.model, options);
10522
+ plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4___default().downloadImage(gd, options);
10523
+ },
10524
+ },
10525
+ ],
10526
+ };
10527
+ if (_legacy__WEBPACK_IMPORTED_MODULE_8__.SelectBasePlotly.displayModeBar !== undefined) {
10528
+ config.displayModeBar = _legacy__WEBPACK_IMPORTED_MODULE_8__.SelectBasePlotly.displayModeBar;
10529
+ }
10530
+ this.patchConfigParameters(chartNode, plotlyOptions.traces, plotlyOptions.layout, config);
10531
+ options = {
10532
+ traces: plotlyOptions.traces,
10533
+ layout: plotlyOptions.layout,
10534
+ data: answersData,
10535
+ config: config,
10536
+ };
10537
+ _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.onPlotCreating.fire(this.model, options);
10538
+ plot = plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4___default().react(chartNode, options.traces, options.layout, options.config);
10539
+ return [2 /*return*/, [plot, plotlyOptions]];
10477
10540
  }
10478
10541
  });
10479
10542
  });
10480
10543
  };
10481
- HistogramPlotly.prototype.getValueType = function () {
10482
- return this.valueType;
10544
+ PlotlyChartAdapter.prototype.destroy = function (node) {
10545
+ if (!!node) {
10546
+ plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_4___default().purge(node);
10547
+ }
10548
+ this._chart = undefined;
10483
10549
  };
10484
- HistogramPlotly.types = ["vbar", "bar"];
10485
- return HistogramPlotly;
10486
- }(_histogram__WEBPACK_IMPORTED_MODULE_2__.HistogramModel));
10550
+ return PlotlyChartAdapter;
10551
+ }());
10487
10552
 
10488
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("date", HistogramPlotly);
10489
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("number", HistogramPlotly);
10490
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("rating", HistogramPlotly);
10553
+ _visualizerBase__WEBPACK_IMPORTED_MODULE_6__.VisualizerBase.chartAdapterType = PlotlyChartAdapter;
10491
10554
 
10492
10555
 
10493
10556
  /***/ }),
@@ -10501,34 +10564,21 @@ _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.register
10501
10564
  "use strict";
10502
10565
  __webpack_require__.r(__webpack_exports__);
10503
10566
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10504
- /* harmony export */ BooleanPlotly: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_3__.BooleanPlotly),
10505
- /* harmony export */ GaugePlotly: () => (/* reexport safe */ _rating__WEBPACK_IMPORTED_MODULE_7__.GaugePlotly),
10506
- /* harmony export */ HistogramPlotly: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_6__.HistogramPlotly),
10507
- /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* reexport safe */ _matrixdropdown_grouped__WEBPACK_IMPORTED_MODULE_5__.MatrixDropdownGroupedPlotly),
10508
- /* harmony export */ MatrixPlotly: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_2__.MatrixPlotly),
10509
- /* harmony export */ PivotPlotly: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_8__.PivotPlotly),
10510
- /* harmony export */ PlotlyBoolChartAdapter: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_3__.PlotlyBoolChartAdapter),
10511
- /* harmony export */ PlotlyChartAdapter: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_1__.PlotlyChartAdapter),
10512
- /* harmony export */ PlotlyGaugeAdapter: () => (/* reexport safe */ _rating__WEBPACK_IMPORTED_MODULE_7__.PlotlyGaugeAdapter),
10567
+ /* harmony export */ BooleanPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.BooleanPlotly),
10568
+ /* harmony export */ GaugePlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.GaugePlotly),
10569
+ /* harmony export */ HistogramPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.HistogramPlotly),
10570
+ /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.MatrixDropdownGroupedPlotly),
10571
+ /* harmony export */ MatrixPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.MatrixPlotly),
10572
+ /* harmony export */ PivotPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.PivotPlotly),
10573
+ /* harmony export */ PlotlyChartAdapter: () => (/* reexport safe */ _chart_adapter__WEBPACK_IMPORTED_MODULE_1__.PlotlyChartAdapter),
10513
10574
  /* harmony export */ PlotlySetup: () => (/* reexport safe */ _setup__WEBPACK_IMPORTED_MODULE_0__.PlotlySetup),
10514
- /* harmony export */ RankingPlotly: () => (/* reexport safe */ _ranking__WEBPACK_IMPORTED_MODULE_4__.RankingPlotly),
10515
- /* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_1__.SelectBasePlotly)
10575
+ /* harmony export */ RankingPlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.RankingPlotly),
10576
+ /* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _legacy__WEBPACK_IMPORTED_MODULE_2__.SelectBasePlotly),
10577
+ /* harmony export */ plotlyChartTypes: () => (/* reexport safe */ _chart_adapter__WEBPACK_IMPORTED_MODULE_1__.plotlyChartTypes)
10516
10578
  /* harmony export */ });
10517
10579
  /* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setup */ "./src/plotly/setup.ts");
10518
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10519
- /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./matrix */ "./src/plotly/matrix.ts");
10520
- /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./boolean */ "./src/plotly/boolean.ts");
10521
- /* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ranking */ "./src/plotly/ranking.ts");
10522
- /* harmony import */ var _matrixdropdown_grouped__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./matrixdropdown-grouped */ "./src/plotly/matrixdropdown-grouped.ts");
10523
- /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./histogram */ "./src/plotly/histogram.ts");
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
-
10527
-
10528
-
10529
-
10530
-
10531
-
10580
+ /* harmony import */ var _chart_adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chart-adapter */ "./src/plotly/chart-adapter.ts");
10581
+ /* harmony import */ var _legacy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./legacy */ "./src/plotly/legacy.ts");
10532
10582
 
10533
10583
 
10534
10584
 
@@ -10536,644 +10586,115 @@ __webpack_require__.r(__webpack_exports__);
10536
10586
 
10537
10587
  /***/ }),
10538
10588
 
10539
- /***/ "./src/plotly/matrix.ts":
10589
+ /***/ "./src/plotly/legacy.ts":
10540
10590
  /*!******************************!*\
10541
- !*** ./src/plotly/matrix.ts ***!
10591
+ !*** ./src/plotly/legacy.ts ***!
10542
10592
  \******************************/
10543
10593
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10544
10594
 
10545
10595
  "use strict";
10546
10596
  __webpack_require__.r(__webpack_exports__);
10547
10597
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10548
- /* harmony export */ MatrixPlotly: () => (/* binding */ MatrixPlotly)
10598
+ /* harmony export */ BooleanPlotly: () => (/* binding */ BooleanPlotly),
10599
+ /* harmony export */ GaugePlotly: () => (/* binding */ GaugePlotly),
10600
+ /* harmony export */ HistogramPlotly: () => (/* binding */ HistogramPlotly),
10601
+ /* harmony export */ MatrixDropdownGroupedPlotly: () => (/* binding */ MatrixDropdownGroupedPlotly),
10602
+ /* harmony export */ MatrixPlotly: () => (/* binding */ MatrixPlotly),
10603
+ /* harmony export */ PivotPlotly: () => (/* binding */ PivotPlotly),
10604
+ /* harmony export */ RankingPlotly: () => (/* binding */ RankingPlotly),
10605
+ /* harmony export */ SelectBasePlotly: () => (/* binding */ SelectBasePlotly)
10549
10606
  /* harmony export */ });
10550
10607
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10551
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10552
- /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../matrix */ "./src/matrix.ts");
10553
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10554
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10555
-
10556
-
10557
-
10558
-
10608
+ /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../boolean */ "./src/boolean.ts");
10609
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
10610
+ /* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../histogram */ "./src/histogram.ts");
10611
+ /* harmony import */ var _matrix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../matrix */ "./src/matrix.ts");
10612
+ /* harmony import */ var _matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../matrixDropdownGrouped */ "./src/matrixDropdownGrouped.ts");
10613
+ /* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
10614
+ /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../number */ "./src/number.ts");
10615
+ /* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ranking */ "./src/ranking.ts");
10559
10616
 
10560
- var MatrixPlotly = /** @class */ (function (_super) {
10561
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixPlotly, _super);
10562
- function MatrixPlotly(question, data, options, name) {
10563
- var _this = _super.call(this, question, data, options, name) || this;
10564
- _this.chartTypes = MatrixPlotly.types;
10565
- _this._chartType = _this.chartTypes[0];
10566
- _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_3__.PlotlyChartAdapter(_this);
10567
- return _this;
10568
- }
10569
- MatrixPlotly.prototype.destroyContent = function (container) {
10570
- this._chartAdapter.destroy(container.children[0]);
10571
- _super.prototype.destroyContent.call(this, container);
10572
- };
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
10617
 
10594
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrix", MatrixPlotly);
10595
10618
 
10596
10619
 
10597
- /***/ }),
10598
10620
 
10599
- /***/ "./src/plotly/matrixdropdown-grouped.ts":
10600
- /*!**********************************************!*\
10601
- !*** ./src/plotly/matrixdropdown-grouped.ts ***!
10602
- \**********************************************/
10603
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10604
10621
 
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
10622
 
10616
10623
 
10617
10624
 
10625
+ var SelectBasePlotly = /** @class */ (function (_super) {
10626
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SelectBasePlotly, _super);
10627
+ function SelectBasePlotly() {
10628
+ return _super !== null && _super.apply(this, arguments) || this;
10629
+ }
10630
+ SelectBasePlotly.types = ["bar", "vbar", "pie", "doughnut"];
10631
+ SelectBasePlotly.displayModeBar = undefined;
10632
+ return SelectBasePlotly;
10633
+ }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
10618
10634
 
10635
+ var BooleanPlotly = /** @class */ (function (_super) {
10636
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BooleanPlotly, _super);
10637
+ function BooleanPlotly() {
10638
+ return _super !== null && _super.apply(this, arguments) || this;
10639
+ }
10640
+ BooleanPlotly.types = ["pie", "bar", "doughnut"];
10641
+ return BooleanPlotly;
10642
+ }(_boolean__WEBPACK_IMPORTED_MODULE_1__.BooleanModel));
10643
+
10644
+ var HistogramPlotly = /** @class */ (function (_super) {
10645
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(HistogramPlotly, _super);
10646
+ function HistogramPlotly() {
10647
+ return _super !== null && _super.apply(this, arguments) || this;
10648
+ }
10649
+ HistogramPlotly.types = ["vbar", "bar"];
10650
+ return HistogramPlotly;
10651
+ }(_histogram__WEBPACK_IMPORTED_MODULE_3__.HistogramModel));
10652
+
10653
+ var MatrixPlotly = /** @class */ (function (_super) {
10654
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixPlotly, _super);
10655
+ function MatrixPlotly() {
10656
+ return _super !== null && _super.apply(this, arguments) || this;
10657
+ }
10658
+ MatrixPlotly.types = ["bar", "stackedbar", "pie", "doughnut"];
10659
+ return MatrixPlotly;
10660
+ }(_matrix__WEBPACK_IMPORTED_MODULE_4__.Matrix));
10619
10661
 
10620
10662
  var MatrixDropdownGroupedPlotly = /** @class */ (function (_super) {
10621
10663
  (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;
10664
+ function MatrixDropdownGroupedPlotly() {
10665
+ return _super !== null && _super.apply(this, arguments) || this;
10628
10666
  }
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) {
10634
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10635
- var chartNode;
10636
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10637
- switch (_a.label) {
10638
- case 0:
10639
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
10640
- container.innerHTML = "";
10641
- container.appendChild(chartNode);
10642
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10643
- case 1:
10644
- _a.sent();
10645
- return [2 /*return*/, container];
10646
- }
10647
- });
10648
- });
10649
- };
10650
10667
  MatrixDropdownGroupedPlotly.types = ["stackedbar", "bar", "pie", "doughnut"];
10651
10668
  return MatrixDropdownGroupedPlotly;
10652
- }(_matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_2__.MatrixDropdownGrouped));
10653
-
10654
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("matrixdropdown-grouped", MatrixDropdownGroupedPlotly);
10655
-
10656
-
10657
- /***/ }),
10658
-
10659
- /***/ "./src/plotly/pivot.ts":
10660
- /*!*****************************!*\
10661
- !*** ./src/plotly/pivot.ts ***!
10662
- \*****************************/
10663
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10664
-
10665
- "use strict";
10666
- __webpack_require__.r(__webpack_exports__);
10667
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10668
- /* harmony export */ PivotPlotly: () => (/* binding */ PivotPlotly)
10669
- /* harmony export */ });
10670
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.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");
10675
-
10676
-
10677
-
10678
-
10669
+ }(_matrixDropdownGrouped__WEBPACK_IMPORTED_MODULE_5__.MatrixDropdownGrouped));
10679
10670
 
10680
10671
  var PivotPlotly = /** @class */ (function (_super) {
10681
10672
  (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;
10685
- _this._chartType = _this.chartTypes[0];
10686
- _this._chartAdapter = new _selectBase__WEBPACK_IMPORTED_MODULE_2__.PlotlyChartAdapter(_this);
10687
- return _this;
10673
+ function PivotPlotly() {
10674
+ return _super !== null && _super.apply(this, arguments) || this;
10688
10675
  }
10689
- PivotPlotly.prototype.destroyContent = function (container) {
10690
- this._chartAdapter.destroy(container.children[0]);
10691
- _super.prototype.destroyContent.call(this, container);
10692
- };
10693
- PivotPlotly.prototype.renderContentAsync = function (container) {
10694
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10695
- var chartNode;
10696
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10697
- switch (_a.label) {
10698
- case 0:
10699
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createElement("div");
10700
- container.innerHTML = "";
10701
- container.appendChild(chartNode);
10702
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10703
- case 1:
10704
- _a.sent();
10705
- return [2 /*return*/, container];
10706
- }
10707
- });
10708
- });
10709
- };
10710
- PivotPlotly.prototype.getValueType = function () {
10711
- return this.valueType;
10712
- };
10713
10676
  PivotPlotly.types = ["vbar", "bar", "line", "stackedbar", "pie", "doughnut"]; // ["vbar", "bar"];
10714
10677
  return PivotPlotly;
10715
- }(_pivot__WEBPACK_IMPORTED_MODULE_1__.PivotModel));
10716
-
10717
- _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerPivotVisualizer(PivotPlotly);
10718
-
10719
-
10720
- /***/ }),
10721
-
10722
- /***/ "./src/plotly/ranking.ts":
10723
- /*!*******************************!*\
10724
- !*** ./src/plotly/ranking.ts ***!
10725
- \*******************************/
10726
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10727
-
10728
- "use strict";
10729
- __webpack_require__.r(__webpack_exports__);
10730
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10731
- /* harmony export */ RankingPlotly: () => (/* binding */ RankingPlotly)
10732
- /* harmony export */ });
10733
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10734
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10735
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/plotly/selectBase.ts");
10736
-
10737
-
10738
-
10739
- var RankingPlotly = /** @class */ (function (_super) {
10740
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(RankingPlotly, _super);
10741
- function RankingPlotly() {
10742
- return _super !== null && _super.apply(this, arguments) || this;
10743
- }
10744
- RankingPlotly.prototype.getQuestionResults = function () {
10745
- var name = this.question.name;
10746
- return this.data.map(function (dataItem) { return dataItem[name]; });
10747
- };
10748
- RankingPlotly.prototype.getEmptyData = function () {
10749
- var choices = this.getValues();
10750
- var data = [];
10751
- data.length = choices.length;
10752
- data.fill(0);
10753
- return data;
10754
- };
10755
- RankingPlotly.prototype.getCalculatedValuesCore = function () {
10756
- var _this = this;
10757
- var results = this.getQuestionResults();
10758
- var choices = this.getValues();
10759
- var plotlyData = this.getEmptyData();
10760
- results.forEach(function (result) {
10761
- _this.applyResultToPlotlyData(result, plotlyData, choices);
10762
- });
10763
- return [plotlyData];
10764
- };
10765
- RankingPlotly.prototype.applyResultToPlotlyData = function (result, plotlyData, choices) {
10766
- if (!result || !plotlyData || !choices)
10767
- return;
10768
- result.forEach(function (resultValue, resultValueIndex, result) {
10769
- var index = choices.indexOf(resultValue);
10770
- plotlyData[index] =
10771
- +plotlyData[index] + (result.length - resultValueIndex);
10772
- });
10773
- };
10774
- return RankingPlotly;
10775
- }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBasePlotly));
10776
-
10777
- _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("ranking", RankingPlotly);
10778
-
10779
-
10780
- /***/ }),
10781
-
10782
- /***/ "./src/plotly/rating.ts":
10783
- /*!******************************!*\
10784
- !*** ./src/plotly/rating.ts ***!
10785
- \******************************/
10786
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10787
-
10788
- "use strict";
10789
- __webpack_require__.r(__webpack_exports__);
10790
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10791
- /* harmony export */ GaugePlotly: () => (/* binding */ GaugePlotly),
10792
- /* harmony export */ PlotlyGaugeAdapter: () => (/* binding */ PlotlyGaugeAdapter)
10793
- /* harmony export */ });
10794
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10795
- /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../number */ "./src/number.ts");
10796
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10797
- /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
10798
- /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
10799
- /* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./setup */ "./src/plotly/setup.ts");
10800
- /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plotly.js-dist-min */ "plotly.js-dist-min");
10801
- /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6__);
10802
-
10803
-
10804
-
10805
-
10806
-
10807
-
10808
-
10809
- var PlotlyGaugeAdapter = /** @class */ (function () {
10810
- function PlotlyGaugeAdapter(model) {
10811
- this.model = model;
10812
- this._chart = undefined;
10813
- }
10814
- Object.defineProperty(PlotlyGaugeAdapter.prototype, "chart", {
10815
- get: function () {
10816
- return this._chart;
10817
- },
10818
- enumerable: false,
10819
- configurable: true
10820
- });
10821
- PlotlyGaugeAdapter.prototype.create = function (chartNode) {
10822
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10823
- var question, _a, level, minValue, maxValue, rateValues, colors, data, chartMargin, layout, config, options, plot;
10824
- var _this = this;
10825
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {
10826
- switch (_b.label) {
10827
- case 0:
10828
- question = this.model.question;
10829
- return [4 /*yield*/, this.model.getCalculatedValues()];
10830
- case 1:
10831
- _a = _b.sent(), level = _a[0], minValue = _a[1], maxValue = _a[2];
10832
- if (question.getType() === "rating") {
10833
- rateValues = question.visibleRateValues;
10834
- maxValue = rateValues[rateValues.length - 1].value;
10835
- minValue = rateValues[0].value;
10836
- }
10837
- colors = this.model.generateColors(maxValue, minValue, GaugePlotly.stepsCount);
10838
- if (GaugePlotly.showAsPercentage) {
10839
- level = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DataHelper.toPercentage(level, maxValue);
10840
- minValue = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DataHelper.toPercentage(minValue, maxValue);
10841
- maxValue = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DataHelper.toPercentage(maxValue, maxValue);
10842
- }
10843
- data = [
10844
- {
10845
- type: "indicator",
10846
- mode: "gauge+number",
10847
- gauge: {
10848
- axis: { range: [minValue, maxValue] },
10849
- shape: this.model.chartType,
10850
- bgcolor: "white",
10851
- bar: { color: colors[0] },
10852
- },
10853
- value: level,
10854
- text: question.name,
10855
- domain: { x: [0, 1], y: [0, 1] },
10856
- },
10857
- ];
10858
- chartMargin = this.model.chartType === "bullet" ? 60 : 30;
10859
- layout = {
10860
- height: 250,
10861
- margin: {
10862
- l: chartMargin,
10863
- r: chartMargin,
10864
- b: chartMargin,
10865
- t: chartMargin,
10866
- pad: 5
10867
- },
10868
- plot_bgcolor: this.model.backgroundColor,
10869
- paper_bgcolor: this.model.backgroundColor,
10870
- };
10871
- config = {
10872
- displayModeBar: true,
10873
- locale: _localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale,
10874
- responsive: true,
10875
- displaylogo: false,
10876
- modeBarButtonsToRemove: ["toImage"],
10877
- modeBarButtonsToAdd: [
10878
- {
10879
- name: "toImageSjs",
10880
- title: _localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.getString("saveDiagramAsPNG"),
10881
- icon: (plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().Icons).camera,
10882
- click: function (gd) {
10883
- var options = {
10884
- format: _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.imageExportFormat,
10885
- // width: 800,
10886
- // height: 600,
10887
- filename: _this.model.question.name,
10888
- };
10889
- _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.onImageSaving.fire(_this.model, options);
10890
- plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().downloadImage(gd, options);
10891
- },
10892
- },
10893
- ],
10894
- };
10895
- if (GaugePlotly.displayModeBar !== undefined) {
10896
- config.displayModeBar = GaugePlotly.displayModeBar;
10897
- }
10898
- options = {
10899
- data: data,
10900
- layout: layout,
10901
- config: config,
10902
- };
10903
- _setup__WEBPACK_IMPORTED_MODULE_5__.PlotlySetup.onPlotCreating.fire(this.model, options);
10904
- plot = plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().newPlot(chartNode, options.data, options.layout, options.config);
10905
- // setTimeout(() => Plotly.Plots.resize(chartNode), 10);
10906
- return [2 /*return*/, plot];
10907
- }
10908
- });
10909
- });
10910
- };
10911
- PlotlyGaugeAdapter.prototype.destroy = function (node) {
10912
- if (!!node) {
10913
- plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().purge(node);
10914
- }
10915
- this._chart = undefined;
10916
- };
10917
- return PlotlyGaugeAdapter;
10918
- }());
10678
+ }(_pivot__WEBPACK_IMPORTED_MODULE_6__.PivotModel));
10919
10679
 
10920
10680
  var GaugePlotly = /** @class */ (function (_super) {
10921
10681
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(GaugePlotly, _super);
10922
- function GaugePlotly(question, data, options, name) {
10923
- var _this = _super.call(this, question, data, options, name) || this;
10924
- _this.chartTypes = GaugePlotly.types;
10925
- _this.chartType = _this.chartTypes[0];
10926
- _this._chartAdapter = new PlotlyGaugeAdapter(_this);
10927
- return _this;
10928
- }
10929
- GaugePlotly.prototype.destroyContent = function (container) {
10930
- this._chartAdapter.destroy(container.children[0]);
10931
- _super.prototype.destroyContent.call(this, container);
10932
- };
10933
- GaugePlotly.prototype.renderContentAsync = function (container) {
10934
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
10935
- var chartNode;
10936
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
10937
- switch (_a.label) {
10938
- case 0:
10939
- chartNode = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createElement("div");
10940
- container.innerHTML = "";
10941
- container.appendChild(chartNode);
10942
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
10943
- case 1:
10944
- _a.sent();
10945
- return [2 /*return*/, container];
10946
- }
10947
- });
10948
- });
10949
- };
10950
- GaugePlotly.displayModeBar = undefined;
10951
- GaugePlotly.types = ["gauge", "bullet"];
10952
- return GaugePlotly;
10953
- }(_number__WEBPACK_IMPORTED_MODULE_1__.NumberModel));
10954
-
10955
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("number", GaugePlotly);
10956
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("rating", GaugePlotly);
10957
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("expression", GaugePlotly);
10958
-
10959
-
10960
- /***/ }),
10961
-
10962
- /***/ "./src/plotly/selectBase.ts":
10963
- /*!**********************************!*\
10964
- !*** ./src/plotly/selectBase.ts ***!
10965
- \**********************************/
10966
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10967
-
10968
- "use strict";
10969
- __webpack_require__.r(__webpack_exports__);
10970
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10971
- /* harmony export */ PlotlyChartAdapter: () => (/* binding */ PlotlyChartAdapter),
10972
- /* harmony export */ SelectBasePlotly: () => (/* binding */ SelectBasePlotly)
10973
- /* harmony export */ });
10974
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
10975
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
10976
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
10977
- /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectBase */ "./src/selectBase.ts");
10978
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../visualizationManager */ "./src/visualizationManager.ts");
10979
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10980
- /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
10981
- /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plotly.js-dist-min */ "plotly.js-dist-min");
10982
- /* harmony import */ var plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6__);
10983
- /* harmony import */ var _setup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./setup */ "./src/plotly/setup.ts");
10984
-
10985
-
10986
-
10987
-
10988
-
10989
-
10990
-
10991
-
10992
- var PlotlyChartAdapter = /** @class */ (function () {
10993
- function PlotlyChartAdapter(model) {
10994
- this.model = model;
10995
- this._chart = undefined;
10996
- }
10997
- PlotlyChartAdapter.prototype.patchConfigParameters = function (chartNode, traces, layout, config) { };
10998
- Object.defineProperty(PlotlyChartAdapter.prototype, "chart", {
10999
- get: function () {
11000
- return this._chart;
11001
- },
11002
- enumerable: false,
11003
- configurable: true
11004
- });
11005
- PlotlyChartAdapter.prototype.create = function (chartNode) {
11006
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
11007
- var _a, plot, plotlyOptions, getDragLayer;
11008
- var _this = this;
11009
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {
11010
- switch (_b.label) {
11011
- case 0: return [4 /*yield*/, this.update(chartNode)];
11012
- case 1:
11013
- _a = _b.sent(), plot = _a[0], plotlyOptions = _a[1];
11014
- chartNode["on"]("plotly_click", function (data) {
11015
- var _a;
11016
- if (data.points.length > 0) {
11017
- var itemText = "";
11018
- if (!plotlyOptions.hasSeries) {
11019
- itemText = Array.isArray(data.points[0].customdata)
11020
- ? data.points[0].customdata[0]
11021
- : data.points[0].customdata;
11022
- var item = _this.model.getSelectedItemByText(itemText);
11023
- _this.model.setSelection(item);
11024
- }
11025
- else {
11026
- itemText = data.points[0].data.name;
11027
- var propertyLabel = data.points[0].label;
11028
- var seriesValues = _this.model.getSeriesValues();
11029
- var seriesLabels = _this.model.getSeriesLabels();
11030
- var propertyValue = seriesValues[seriesLabels.indexOf(propertyLabel)];
11031
- var selectedItem = _this.model.getSelectedItemByText(itemText);
11032
- var item = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue((_a = {}, _a[propertyValue] = selectedItem.value, _a), propertyLabel + ": " + selectedItem.text);
11033
- _this.model.setSelection(item);
11034
- }
11035
- // const itemText = plotlyOptions.hasSeries
11036
- // ? data.points[0].data.name
11037
- // : Array.isArray(data.points[0].customdata)
11038
- // ? data.points[0].customdata[0]
11039
- // : data.points[0].customdata;
11040
- // const item: ItemValue = this.model.getSelectedItemByText(itemText);
11041
- // this.model.setSelection(item);
11042
- }
11043
- });
11044
- getDragLayer = function () {
11045
- return chartNode.getElementsByClassName("nsewdrag")[0];
11046
- };
11047
- chartNode["on"]("plotly_hover", function () {
11048
- var dragLayer = getDragLayer();
11049
- dragLayer && (dragLayer.style.cursor = "pointer");
11050
- });
11051
- chartNode["on"]("plotly_unhover", function () {
11052
- var dragLayer = getDragLayer();
11053
- dragLayer && (dragLayer.style.cursor = "");
11054
- });
11055
- // setTimeout(() => Plotly.Plots.resize(chartNode), 10);
11056
- this._chart = plot;
11057
- return [2 /*return*/, plot];
11058
- }
11059
- });
11060
- });
11061
- };
11062
- PlotlyChartAdapter.prototype.update = function (chartNode) {
11063
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
11064
- var answersData, plotlyOptions, config, options, plot;
11065
- var _this = this;
11066
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
11067
- switch (_a.label) {
11068
- case 0: return [4 /*yield*/, this.model.getAnswersData()];
11069
- case 1:
11070
- answersData = _a.sent();
11071
- plotlyOptions = _setup__WEBPACK_IMPORTED_MODULE_7__.PlotlySetup.setup(this.model.chartType, this.model, answersData);
11072
- config = {
11073
- displaylogo: false,
11074
- responsive: true,
11075
- locale: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.currentLocale,
11076
- modeBarButtonsToRemove: ["toImage"],
11077
- modeBarButtonsToAdd: [
11078
- {
11079
- name: "toImageSjs",
11080
- title: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("saveDiagramAsPNG"),
11081
- icon: (plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().Icons).camera,
11082
- click: function (gd) {
11083
- var options = {
11084
- format: _setup__WEBPACK_IMPORTED_MODULE_7__.PlotlySetup.imageExportFormat,
11085
- // width: 800,
11086
- // height: 600,
11087
- filename: _this.model.question.name,
11088
- };
11089
- _setup__WEBPACK_IMPORTED_MODULE_7__.PlotlySetup.onImageSaving.fire(_this.model, options);
11090
- plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().downloadImage(gd, options);
11091
- },
11092
- },
11093
- ],
11094
- };
11095
- if (SelectBasePlotly.displayModeBar !== undefined) {
11096
- config.displayModeBar = SelectBasePlotly.displayModeBar;
11097
- }
11098
- this.patchConfigParameters(chartNode, plotlyOptions.traces, plotlyOptions.layout, config);
11099
- options = {
11100
- traces: plotlyOptions.traces,
11101
- layout: plotlyOptions.layout,
11102
- config: config,
11103
- };
11104
- _setup__WEBPACK_IMPORTED_MODULE_7__.PlotlySetup.onPlotCreating.fire(this.model, options);
11105
- plot = plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().react(chartNode, options.traces, options.layout, options.config);
11106
- return [2 /*return*/, [plot, plotlyOptions]];
11107
- }
11108
- });
11109
- });
11110
- };
11111
- PlotlyChartAdapter.prototype.destroy = function (node) {
11112
- if (!!node) {
11113
- plotly_js_dist_min__WEBPACK_IMPORTED_MODULE_6___default().purge(node);
11114
- }
11115
- this._chart = undefined;
11116
- };
11117
- return PlotlyChartAdapter;
11118
- }());
11119
-
11120
- var SelectBasePlotly = /** @class */ (function (_super) {
11121
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SelectBasePlotly, _super);
11122
- function SelectBasePlotly(question, data, options, name) {
11123
- if (options === void 0) { options = {}; }
11124
- var _this = _super.call(this, question, data, options, name) || this;
11125
- _this.chartTypes = [].concat(SelectBasePlotly.types);
11126
- if (_this.getSeriesValues().length > 0 && _this.chartTypes.indexOf("stackedbar") === -1) {
11127
- _this.chartTypes.push("stackedbar");
11128
- }
11129
- if (options.allowExperimentalFeatures) {
11130
- // this.chartTypes.splice(1, 0, "vbar");
11131
- }
11132
- _this._chartType = _this.chartTypes[0];
11133
- if (_this.chartTypes.indexOf(options.defaultChartType) !== -1) {
11134
- _this._chartType = options.defaultChartType;
11135
- }
11136
- _this._chartAdapter = new PlotlyChartAdapter(_this);
11137
- return _this;
11138
- }
11139
- SelectBasePlotly.prototype.destroyContent = function (container) {
11140
- this._chartAdapter.destroy(container.children[0]);
11141
- _super.prototype.destroyContent.call(this, container);
11142
- };
11143
- SelectBasePlotly.prototype.renderContentAsync = function (container) {
11144
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
11145
- var chartNode;
11146
- return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
11147
- switch (_a.label) {
11148
- case 0:
11149
- chartNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
11150
- container.innerHTML = "";
11151
- container.appendChild(chartNode);
11152
- return [4 /*yield*/, this._chartAdapter.create(chartNode)];
11153
- case 1:
11154
- _a.sent();
11155
- return [2 /*return*/, container];
11156
- }
11157
- });
11158
- });
11159
- };
11160
- SelectBasePlotly.prototype.updateContent = function () {
11161
- var _a;
11162
- var chartNode = (_a = this.contentContainer) === null || _a === void 0 ? void 0 : _a.children[0];
11163
- if (chartNode) {
11164
- this._chartAdapter.update(chartNode);
11165
- }
11166
- };
11167
- SelectBasePlotly.types = ["bar", "vbar", "pie", "doughnut"];
11168
- SelectBasePlotly.displayModeBar = undefined;
11169
- return SelectBasePlotly;
11170
- }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
10682
+ function GaugePlotly() {
10683
+ return _super !== null && _super.apply(this, arguments) || this;
10684
+ }
10685
+ GaugePlotly.displayModeBar = undefined;
10686
+ GaugePlotly.types = ["gauge", "bullet"];
10687
+ return GaugePlotly;
10688
+ }(_number__WEBPACK_IMPORTED_MODULE_7__.NumberModel));
10689
+
10690
+ var RankingPlotly = /** @class */ (function (_super) {
10691
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(RankingPlotly, _super);
10692
+ function RankingPlotly() {
10693
+ return _super !== null && _super.apply(this, arguments) || this;
10694
+ }
10695
+ return RankingPlotly;
10696
+ }(_ranking__WEBPACK_IMPORTED_MODULE_8__.RankingModel));
11171
10697
 
11172
- _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("checkbox", SelectBasePlotly);
11173
- _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("radiogroup", SelectBasePlotly);
11174
- _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("dropdown", SelectBasePlotly);
11175
- _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("imagepicker", SelectBasePlotly);
11176
- _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("tagbox", SelectBasePlotly);
11177
10698
 
11178
10699
 
11179
10700
  /***/ }),
@@ -11192,6 +10713,10 @@ __webpack_require__.r(__webpack_exports__);
11192
10713
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
11193
10714
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
11194
10715
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
10716
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
10717
+ /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../number */ "./src/number.ts");
10718
+
10719
+
11195
10720
 
11196
10721
 
11197
10722
  var PlotlySetup = /** @class */ (function () {
@@ -11557,6 +11082,49 @@ var PlotlySetup = /** @class */ (function () {
11557
11082
  }
11558
11083
  return { traces: traces, layout: layout, hasSeries: hasSeries };
11559
11084
  };
11085
+ PlotlySetup.setupGauge = function (model, answersData) {
11086
+ var _a = answersData, level = _a[0], minValue = _a[1], maxValue = _a[2];
11087
+ if (model.question.getType() === "rating") {
11088
+ var rateValues = model.question.visibleRateValues;
11089
+ maxValue = rateValues[rateValues.length - 1].value;
11090
+ minValue = rateValues[0].value;
11091
+ }
11092
+ var colors = model.generateColors(maxValue, minValue, _number__WEBPACK_IMPORTED_MODULE_3__.NumberModel.stepsCount);
11093
+ if (_number__WEBPACK_IMPORTED_MODULE_3__.NumberModel.showAsPercentage) {
11094
+ level = _utils__WEBPACK_IMPORTED_MODULE_2__.DataHelper.toPercentage(level, maxValue);
11095
+ minValue = _utils__WEBPACK_IMPORTED_MODULE_2__.DataHelper.toPercentage(minValue, maxValue);
11096
+ maxValue = _utils__WEBPACK_IMPORTED_MODULE_2__.DataHelper.toPercentage(maxValue, maxValue);
11097
+ }
11098
+ var traces = [
11099
+ {
11100
+ type: "indicator",
11101
+ mode: "gauge+number",
11102
+ gauge: {
11103
+ axis: { range: [minValue, maxValue] },
11104
+ shape: model.chartType,
11105
+ bgcolor: "white",
11106
+ bar: { color: colors[0] },
11107
+ },
11108
+ value: level,
11109
+ text: model.name,
11110
+ domain: { x: [0, 1], y: [0, 1] },
11111
+ },
11112
+ ];
11113
+ var chartMargin = model.chartType === "bullet" ? 60 : 30;
11114
+ var layout = {
11115
+ height: 250,
11116
+ margin: {
11117
+ l: chartMargin,
11118
+ r: chartMargin,
11119
+ b: chartMargin,
11120
+ t: chartMargin,
11121
+ pad: 5
11122
+ },
11123
+ plot_bgcolor: model.backgroundColor,
11124
+ paper_bgcolor: model.backgroundColor,
11125
+ };
11126
+ return { traces: traces, layout: layout, hasSeries: false };
11127
+ };
11560
11128
  PlotlySetup.imageExportFormat = "png";
11561
11129
  /**
11562
11130
  * Fires when end user clicks on the 'save as image' button.
@@ -11575,6 +11143,8 @@ var PlotlySetup = /** @class */ (function () {
11575
11143
  doughnut: PlotlySetup.setupPie,
11576
11144
  pie: PlotlySetup.setupPie,
11577
11145
  scatter: PlotlySetup.setupScatter,
11146
+ gauge: PlotlySetup.setupGauge,
11147
+ bullet: PlotlySetup.setupGauge,
11578
11148
  };
11579
11149
  PlotlySetup.getTruncatedLabel = function (label, labelTruncateLength) {
11580
11150
  var truncateSymbols = "...";
@@ -11592,6 +11162,66 @@ var PlotlySetup = /** @class */ (function () {
11592
11162
 
11593
11163
 
11594
11164
 
11165
+ /***/ }),
11166
+
11167
+ /***/ "./src/ranking.ts":
11168
+ /*!************************!*\
11169
+ !*** ./src/ranking.ts ***!
11170
+ \************************/
11171
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11172
+
11173
+ "use strict";
11174
+ __webpack_require__.r(__webpack_exports__);
11175
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11176
+ /* harmony export */ RankingModel: () => (/* binding */ RankingModel)
11177
+ /* harmony export */ });
11178
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
11179
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
11180
+ /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
11181
+
11182
+
11183
+
11184
+ var RankingModel = /** @class */ (function (_super) {
11185
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(RankingModel, _super);
11186
+ function RankingModel() {
11187
+ return _super !== null && _super.apply(this, arguments) || this;
11188
+ }
11189
+ RankingModel.prototype.getQuestionResults = function () {
11190
+ var name = this.question.name;
11191
+ return this.data.map(function (dataItem) { return dataItem[name]; });
11192
+ };
11193
+ RankingModel.prototype.getEmptyData = function () {
11194
+ var choices = this.getValues();
11195
+ var data = [];
11196
+ data.length = choices.length;
11197
+ data.fill(0);
11198
+ return data;
11199
+ };
11200
+ RankingModel.prototype.getCalculatedValuesCore = function () {
11201
+ var _this = this;
11202
+ var results = this.getQuestionResults();
11203
+ var choices = this.getValues();
11204
+ var plotlyData = this.getEmptyData();
11205
+ results.forEach(function (result) {
11206
+ _this.applyResultToPlotlyData(result, plotlyData, choices);
11207
+ });
11208
+ return [plotlyData];
11209
+ };
11210
+ RankingModel.prototype.applyResultToPlotlyData = function (result, plotlyData, choices) {
11211
+ if (!result || !plotlyData || !choices)
11212
+ return;
11213
+ result.forEach(function (resultValue, resultValueIndex, result) {
11214
+ var index = choices.indexOf(resultValue);
11215
+ plotlyData[index] =
11216
+ +plotlyData[index] + (result.length - resultValueIndex);
11217
+ });
11218
+ };
11219
+ return RankingModel;
11220
+ }(_selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase));
11221
+
11222
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("ranking", RankingModel);
11223
+
11224
+
11595
11225
  /***/ }),
11596
11226
 
11597
11227
  /***/ "./src/selectBase.ts":
@@ -11612,6 +11242,8 @@ __webpack_require__.r(__webpack_exports__);
11612
11242
  /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
11613
11243
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
11614
11244
  /* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/index */ "./src/utils/index.ts");
11245
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
11246
+
11615
11247
 
11616
11248
 
11617
11249
 
@@ -11722,6 +11354,20 @@ var SelectBase = /** @class */ (function (_super) {
11722
11354
  _this._hideEmptyAnswers = _this.options.hideEmptyAnswers === true;
11723
11355
  _this._answersOrder = _this.options.answersOrder || "default";
11724
11356
  _this._showMissingAnswers = _this.isSupportMissingAnswers() && _this.options.showMissingAnswers === true;
11357
+ if (_this.options.allowExperimentalFeatures) {
11358
+ // this.chartTypes.splice(1, 0, "vbar");
11359
+ }
11360
+ if (_visualizerBase__WEBPACK_IMPORTED_MODULE_2__.VisualizerBase.chartAdapterType) {
11361
+ _this._chartAdapter = new _visualizerBase__WEBPACK_IMPORTED_MODULE_2__.VisualizerBase.chartAdapterType(_this);
11362
+ _this.chartTypes = _this._chartAdapter.getChartTypes();
11363
+ if (_this.getSeriesValues().length > 0 && _this.chartTypes.indexOf("stackedbar") === -1) {
11364
+ _this.chartTypes.push("stackedbar");
11365
+ }
11366
+ _this._chartType = _this.chartTypes[0];
11367
+ if (_this.chartTypes.indexOf(_this.options.defaultChartType) !== -1) {
11368
+ _this._chartType = _this.options.defaultChartType;
11369
+ }
11370
+ }
11725
11371
  _this.registerToolbarItem("changeChartType", function () {
11726
11372
  if (_this.chartTypes.length > 1) {
11727
11373
  return _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
@@ -11904,6 +11550,16 @@ var SelectBase = /** @class */ (function (_super) {
11904
11550
  var selectBaseQuestion = this.question;
11905
11551
  return resultValues.map(function (value) { return survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue.getTextOrHtmlByValue(selectBaseQuestion.choices, value); }).join(", ");
11906
11552
  };
11553
+ SelectBase.prototype.isSupportSoftUpdateContent = function () {
11554
+ return true;
11555
+ };
11556
+ SelectBase.prototype.softUpdateContent = function () {
11557
+ var _a;
11558
+ var chartNode = (_a = this.contentContainer) === null || _a === void 0 ? void 0 : _a.children[0];
11559
+ if (chartNode) {
11560
+ this._chartAdapter.update(chartNode);
11561
+ }
11562
+ };
11907
11563
  SelectBase.prototype.getSelectedItemByText = function (itemText) {
11908
11564
  var selBase = this.question;
11909
11565
  if (this.question.hasOther && itemText == selBase.otherText) {
@@ -12265,6 +11921,127 @@ var SelectBase = /** @class */ (function (_super) {
12265
11921
  return SelectBase;
12266
11922
  }(_visualizerBase__WEBPACK_IMPORTED_MODULE_2__.VisualizerBase));
12267
11923
 
11924
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("checkbox", SelectBase);
11925
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("radiogroup", SelectBase);
11926
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("dropdown", SelectBase);
11927
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("imagepicker", SelectBase);
11928
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("tagbox", SelectBase);
11929
+
11930
+
11931
+ /***/ }),
11932
+
11933
+ /***/ "./src/statisticCalculators.ts":
11934
+ /*!*************************************!*\
11935
+ !*** ./src/statisticCalculators.ts ***!
11936
+ \*************************************/
11937
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11938
+
11939
+ "use strict";
11940
+ __webpack_require__.r(__webpack_exports__);
11941
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11942
+ /* harmony export */ defaultStatisticsCalculator: () => (/* binding */ defaultStatisticsCalculator),
11943
+ /* harmony export */ histogramStatisticsCalculator: () => (/* binding */ histogramStatisticsCalculator),
11944
+ /* harmony export */ mathStatisticsCalculator: () => (/* binding */ mathStatisticsCalculator)
11945
+ /* harmony export */ });
11946
+ /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
11947
+
11948
+ function defaultStatisticsCalculator(data, dataInfo) {
11949
+ var dataNames = dataInfo.dataNames;
11950
+ var statistics = [];
11951
+ var values = dataInfo.getValues();
11952
+ var valuesIndex = {};
11953
+ values.forEach(function (val, index) {
11954
+ valuesIndex[val] = index;
11955
+ });
11956
+ var processMissingAnswers = values.indexOf(undefined) !== -1;
11957
+ var series = dataInfo.getSeriesValues();
11958
+ var seriesIndex = {};
11959
+ series.forEach(function (val, index) {
11960
+ seriesIndex[val] = index;
11961
+ });
11962
+ var seriesLength = series.length || 1;
11963
+ for (var i = 0; i < dataNames.length; ++i) {
11964
+ var dataNameStatistics = new Array();
11965
+ for (var j = 0; j < seriesLength; ++j) {
11966
+ dataNameStatistics.push(new Array(values.length).fill(0));
11967
+ }
11968
+ statistics.push(dataNameStatistics);
11969
+ }
11970
+ data.forEach(function (row) {
11971
+ dataNames.forEach(function (dataName, index) {
11972
+ var rowValue = row[dataName];
11973
+ if (rowValue !== undefined || processMissingAnswers) {
11974
+ var rowValues = Array.isArray(rowValue) ? rowValue : [rowValue];
11975
+ if (series.length > 0) {
11976
+ if (row[_dataProvider__WEBPACK_IMPORTED_MODULE_0__.DataProvider.seriesMarkerKey] !== undefined) {
11977
+ // Series are labelled by seriesMarkerKey in row data
11978
+ var seriesNo_1 = seriesIndex[row[_dataProvider__WEBPACK_IMPORTED_MODULE_0__.DataProvider.seriesMarkerKey]] || 0;
11979
+ rowValues.forEach(function (val) {
11980
+ statistics[index][seriesNo_1][valuesIndex[val]]++;
11981
+ });
11982
+ }
11983
+ else {
11984
+ // Series are the keys in question value (matrix question)
11985
+ // TODO: think about the de-normalization and combine with the previous case
11986
+ rowValues.forEach(function (val) {
11987
+ series.forEach(function (seriesName) {
11988
+ if (val[seriesName] !== undefined) {
11989
+ var seriesNo = seriesIndex[seriesName] || 0;
11990
+ statistics[index][seriesNo][valuesIndex[val[seriesName]]]++;
11991
+ }
11992
+ });
11993
+ });
11994
+ }
11995
+ }
11996
+ else {
11997
+ // No series
11998
+ rowValues.forEach(function (val) { return statistics[0][0][valuesIndex[val]]++; });
11999
+ }
12000
+ }
12001
+ });
12002
+ });
12003
+ return dataInfo.dataNames.length > 1 ? statistics : statistics[0];
12004
+ }
12005
+ function histogramStatisticsCalculator(data, intervals, seriesValues) {
12006
+ var statistics = [];
12007
+ if (seriesValues.length === 0) {
12008
+ seriesValues.push("");
12009
+ }
12010
+ for (var i = 0; i < seriesValues.length; ++i) {
12011
+ statistics.push(intervals.map(function (i) { return 0; }));
12012
+ data[seriesValues[i]].forEach(function (dataValue) {
12013
+ for (var j = 0; j < intervals.length; ++j) {
12014
+ if (intervals[j].start <= dataValue && (dataValue < intervals[j].end || j == intervals.length - 1)) {
12015
+ statistics[i][j]++;
12016
+ break;
12017
+ }
12018
+ }
12019
+ });
12020
+ }
12021
+ return statistics;
12022
+ }
12023
+ function mathStatisticsCalculator(data, dataName) {
12024
+ var resultMin = Number.MAX_VALUE, resultMax = -Number.MAX_VALUE, resultAverage = 0;
12025
+ var actualAnswerCount = 0;
12026
+ data.forEach(function (rowData) {
12027
+ if (rowData[dataName] !== undefined) {
12028
+ var questionValue = +rowData[dataName];
12029
+ actualAnswerCount++;
12030
+ resultAverage += questionValue;
12031
+ if (resultMin > questionValue) {
12032
+ resultMin = questionValue;
12033
+ }
12034
+ if (resultMax < questionValue) {
12035
+ resultMax = questionValue;
12036
+ }
12037
+ }
12038
+ });
12039
+ if (actualAnswerCount > 0) {
12040
+ resultAverage = resultAverage / actualAnswerCount;
12041
+ }
12042
+ resultAverage = Math.ceil(resultAverage * 100) / 100;
12043
+ return [resultAverage, resultMin, resultMax];
12044
+ }
12268
12045
 
12269
12046
 
12270
12047
  /***/ }),
@@ -12657,7 +12434,9 @@ __webpack_require__.r(__webpack_exports__);
12657
12434
  /* harmony export */ __decorate: () => (/* binding */ __decorate),
12658
12435
  /* harmony export */ __extends: () => (/* binding */ __extends),
12659
12436
  /* harmony export */ __generator: () => (/* binding */ __generator),
12660
- /* harmony export */ __rest: () => (/* binding */ __rest)
12437
+ /* harmony export */ __rest: () => (/* binding */ __rest),
12438
+ /* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),
12439
+ /* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays)
12661
12440
  /* harmony export */ });
12662
12441
  var __assign = Object["assign"] ||
12663
12442
  function (target) {
@@ -12796,6 +12575,25 @@ function __generator(thisArg, body) {
12796
12575
  return { value: op[0] ? op[1] : void 0, done: true };
12797
12576
  }
12798
12577
  }
12578
+ var __spreadArrays = function () {
12579
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
12580
+ s += arguments[i].length;
12581
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
12582
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
12583
+ r[k] = a[j];
12584
+ return r;
12585
+ };
12586
+ function __spreadArray(to, from, pack) {
12587
+ if (pack || arguments.length === 2)
12588
+ for (var i = 0, l = from.length, ar; i < l; i++) {
12589
+ if (ar || !(i in from)) {
12590
+ if (!ar)
12591
+ ar = Array.prototype.slice.call(from, 0, i);
12592
+ ar[i] = from[i];
12593
+ }
12594
+ }
12595
+ return to.concat(ar || Array.prototype.slice.call(from));
12596
+ }
12799
12597
 
12800
12598
 
12801
12599
  /***/ }),
@@ -13042,8 +12840,6 @@ __webpack_require__.r(__webpack_exports__);
13042
12840
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13043
12841
  /* harmony export */ VisualizationManager: () => (/* binding */ VisualizationManager)
13044
12842
  /* harmony export */ });
13045
- /* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
13046
-
13047
12843
  /**
13048
12844
  * An object with methods used to register and unregister visualizers for individual question types.
13049
12845
  *
@@ -13113,10 +12909,10 @@ var VisualizationManager = /** @class */ (function () {
13113
12909
  VisualizationManager.getVisualizersByType = function (questionType) {
13114
12910
  var vDescrs = VisualizationManager.vizualizers[questionType];
13115
12911
  if (!vDescrs) {
13116
- if (_visualizerBase__WEBPACK_IMPORTED_MODULE_0__.VisualizerBase.suppressVisualizerStubRendering) {
12912
+ if (VisualizationManager.defaultVisualizer.suppressVisualizerStubRendering) {
13117
12913
  return [];
13118
12914
  }
13119
- return [_visualizerBase__WEBPACK_IMPORTED_MODULE_0__.VisualizerBase];
12915
+ return [VisualizationManager.defaultVisualizer];
13120
12916
  }
13121
12917
  vDescrs = [].concat(vDescrs);
13122
12918
  vDescrs.sort(function (v1, v2) { return v1.index - v2.index; });
@@ -13127,7 +12923,7 @@ var VisualizationManager = /** @class */ (function () {
13127
12923
  * @see registerAltVisualizerSelector
13128
12924
  */
13129
12925
  VisualizationManager.getAltVisualizerSelector = function () {
13130
- return VisualizationManager.alternativesVisualizer || _visualizerBase__WEBPACK_IMPORTED_MODULE_0__.VisualizerBase;
12926
+ return VisualizationManager.alternativesVisualizer || VisualizationManager.defaultVisualizer;
13131
12927
  };
13132
12928
  /**
13133
12929
  * Registers an alternative visualizer selector.
@@ -13137,11 +12933,12 @@ var VisualizationManager = /** @class */ (function () {
13137
12933
  VisualizationManager.alternativesVisualizer = constructor;
13138
12934
  };
13139
12935
  VisualizationManager.getPivotVisualizerConstructor = function () {
13140
- return VisualizationManager.pivotVisualizer || _visualizerBase__WEBPACK_IMPORTED_MODULE_0__.VisualizerBase;
12936
+ return VisualizationManager.pivotVisualizer || VisualizationManager.defaultVisualizer;
13141
12937
  };
13142
12938
  VisualizationManager.registerPivotVisualizer = function (constructor) {
13143
12939
  VisualizationManager.pivotVisualizer = constructor;
13144
12940
  };
12941
+ VisualizationManager.defaultVisualizer = undefined;
13145
12942
  VisualizationManager.alternativesVisualizer = undefined;
13146
12943
  VisualizationManager.pivotVisualizer = undefined;
13147
12944
  VisualizationManager.vizualizers = {};
@@ -14215,17 +14012,19 @@ __webpack_require__.r(__webpack_exports__);
14215
14012
  __webpack_require__.r(__webpack_exports__);
14216
14013
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14217
14014
  /* harmony export */ PostponeHelper: () => (/* binding */ PostponeHelper),
14218
- /* harmony export */ VisualizerBase: () => (/* binding */ VisualizerBase),
14219
- /* harmony export */ defaultStatisticsCalculator: () => (/* binding */ defaultStatisticsCalculator)
14015
+ /* harmony export */ VisualizerBase: () => (/* binding */ VisualizerBase)
14220
14016
  /* harmony export */ });
14221
14017
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
14222
14018
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
14223
14019
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
14224
14020
  /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
14225
14021
  /* harmony import */ var _visualizerFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizerFactory */ "./src/visualizerFactory.ts");
14226
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
14227
- /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
14228
- /* harmony import */ var _visualizerBase_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./visualizerBase.scss */ "./src/visualizerBase.scss");
14022
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
14023
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
14024
+ /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
14025
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
14026
+ /* harmony import */ var _visualizerBase_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visualizerBase.scss */ "./src/visualizerBase.scss");
14027
+
14229
14028
 
14230
14029
 
14231
14030
 
@@ -14293,6 +14092,7 @@ var VisualizerBase = /** @class */ (function () {
14293
14092
  this.contentContainer = undefined;
14294
14093
  this.footerContainer = undefined;
14295
14094
  this._supportSelection = false;
14095
+ this._chartAdapter = undefined;
14296
14096
  /**
14297
14097
  * An event that is raised after the visualizer's content is rendered.
14298
14098
  *
@@ -14648,7 +14448,7 @@ var VisualizerBase = /** @class */ (function () {
14648
14448
  };
14649
14449
  VisualizerBase.prototype.renderToolbar = function (container) {
14650
14450
  if (this.showToolbar) {
14651
- var toolbar_1 = (_utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-toolbar"));
14451
+ var toolbar_1 = (_utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-toolbar"));
14652
14452
  this.createToolbarItems(toolbar_1);
14653
14453
  container.appendChild(toolbar_1);
14654
14454
  }
@@ -14665,27 +14465,40 @@ var VisualizerBase = /** @class */ (function () {
14665
14465
  if (!!this.options && typeof this.options.destroyContent === "function") {
14666
14466
  this.options.destroyContent(container, this);
14667
14467
  }
14668
- else {
14669
- container.innerHTML = "";
14468
+ else if (this._chartAdapter) {
14469
+ this._chartAdapter.destroy(container.children[0]);
14670
14470
  }
14471
+ container.innerHTML = "";
14671
14472
  };
14672
14473
  VisualizerBase.prototype.renderHeader = function (container) {
14673
14474
  if (!!this.options && typeof this.options.renderHeader === "function") {
14674
14475
  this.options.renderHeader(container, this);
14675
14476
  }
14676
14477
  else {
14677
- var correctAnswerElement = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__correct-answer");
14678
- correctAnswerElement.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("correctAnswer") + this.getCorrectAnswerText();
14478
+ var correctAnswerElement = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__correct-answer");
14479
+ correctAnswerElement.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("correctAnswer") + this.getCorrectAnswerText();
14679
14480
  container.appendChild(correctAnswerElement);
14680
14481
  }
14681
14482
  };
14682
14483
  VisualizerBase.prototype.renderContentAsync = function (container) {
14683
14484
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
14485
+ var chartNode;
14684
14486
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
14685
- return [2 /*return*/, new Promise(function (resolve, reject) {
14686
- container.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("noVisualizerForQuestion");
14687
- resolve(container);
14688
- })];
14487
+ switch (_a.label) {
14488
+ case 0:
14489
+ if (!this._chartAdapter) return [3 /*break*/, 2];
14490
+ chartNode = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div");
14491
+ container.innerHTML = "";
14492
+ container.appendChild(chartNode);
14493
+ return [4 /*yield*/, this._chartAdapter.create(chartNode)];
14494
+ case 1:
14495
+ _a.sent();
14496
+ return [3 /*break*/, 3];
14497
+ case 2:
14498
+ container.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("noVisualizerForQuestion");
14499
+ _a.label = 3;
14500
+ case 3: return [2 /*return*/, container];
14501
+ }
14689
14502
  });
14690
14503
  });
14691
14504
  };
@@ -14722,23 +14535,23 @@ var VisualizerBase = /** @class */ (function () {
14722
14535
  var _this = this;
14723
14536
  container.innerHTML = "";
14724
14537
  if (this.hasFooter) {
14725
- var footerTitleElement = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("h4", "sa-visualizer__footer-title", { innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("otherCommentTitle") });
14538
+ var footerTitleElement = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("h4", "sa-visualizer__footer-title", { innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("otherCommentTitle") });
14726
14539
  container.appendChild(footerTitleElement);
14727
- var footerContentElement_1 = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__footer-content");
14540
+ var footerContentElement_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__footer-content");
14728
14541
  footerContentElement_1.style.display = VisualizerBase.otherCommentCollapsed
14729
14542
  ? "none"
14730
14543
  : "block";
14731
- var visibilityButton_1 = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createButton(function () {
14544
+ var visibilityButton_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
14732
14545
  if (footerContentElement_1.style.display === "none") {
14733
14546
  footerContentElement_1.style.display = "block";
14734
- visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("hideButton");
14547
+ visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("hideButton");
14735
14548
  }
14736
14549
  else {
14737
14550
  footerContentElement_1.style.display = "none";
14738
- visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString(VisualizerBase.otherCommentCollapsed ? "showButton" : "hideButton");
14551
+ visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString(VisualizerBase.otherCommentCollapsed ? "showButton" : "hideButton");
14739
14552
  }
14740
14553
  _this.footerVisualizer.invokeOnUpdate();
14741
- }, _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("showButton") /*, "sa-toolbar__button--right"*/);
14554
+ }, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("showButton") /*, "sa-toolbar__button--right"*/);
14742
14555
  container.appendChild(visibilityButton_1);
14743
14556
  container.appendChild(footerContentElement_1);
14744
14557
  this.footerVisualizer.render(footerContentElement_1);
@@ -14753,18 +14566,18 @@ var VisualizerBase = /** @class */ (function () {
14753
14566
  targetElement = document.getElementById(targetElement);
14754
14567
  }
14755
14568
  this.renderResult = targetElement;
14756
- this.toolbarContainer = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__toolbar");
14569
+ this.toolbarContainer = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__toolbar");
14757
14570
  targetElement.appendChild(this.toolbarContainer);
14758
14571
  this.renderToolbar(this.toolbarContainer);
14759
14572
  if (this.hasHeader) {
14760
- this.headerContainer = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__header");
14573
+ this.headerContainer = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__header");
14761
14574
  targetElement.appendChild(this.headerContainer);
14762
14575
  this.renderHeader(this.headerContainer);
14763
14576
  }
14764
- this.contentContainer = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__content");
14577
+ this.contentContainer = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__content");
14765
14578
  targetElement.appendChild(this.contentContainer);
14766
14579
  this.renderContent(this.contentContainer);
14767
- this.footerContainer = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div", "sa-visualizer__footer");
14580
+ this.footerContainer = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__footer");
14768
14581
  targetElement.appendChild(this.footerContainer);
14769
14582
  this.renderFooter(this.footerContainer);
14770
14583
  };
@@ -14777,10 +14590,23 @@ var VisualizerBase = /** @class */ (function () {
14777
14590
  });
14778
14591
  }
14779
14592
  };
14780
- VisualizerBase.prototype.updateContent = function () {
14593
+ VisualizerBase.prototype.isSupportSoftUpdateContent = function () {
14594
+ return false;
14595
+ };
14596
+ VisualizerBase.prototype.softUpdateContent = function () {
14597
+ };
14598
+ VisualizerBase.prototype.hardUpdateContent = function () {
14781
14599
  this.destroyContent(this.contentContainer);
14782
14600
  this.renderContent(this.contentContainer);
14783
14601
  };
14602
+ VisualizerBase.prototype.updateContent = function () {
14603
+ if (!this.isSupportSoftUpdateContent()) {
14604
+ this.hardUpdateContent();
14605
+ }
14606
+ else {
14607
+ this.softUpdateContent();
14608
+ }
14609
+ };
14784
14610
  /**
14785
14611
  * Re-renders the visualizer and its content.
14786
14612
  */
@@ -14876,10 +14702,10 @@ var VisualizerBase = /** @class */ (function () {
14876
14702
  if (!!this._getDataCore) {
14877
14703
  return this._getDataCore(this);
14878
14704
  }
14879
- return defaultStatisticsCalculator(this.surveyData, this);
14705
+ return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_7__.defaultStatisticsCalculator)(this.surveyData, this);
14880
14706
  };
14881
14707
  VisualizerBase.prototype.renderLoadingIndicator = function (contentContainer) {
14882
- contentContainer.appendChild((0,_utils__WEBPACK_IMPORTED_MODULE_4__.createLoadingIndicator)());
14708
+ contentContainer.appendChild((0,_utils__WEBPACK_IMPORTED_MODULE_5__.createLoadingIndicator)());
14883
14709
  };
14884
14710
  VisualizerBase.prototype.convertFromExternalData = function (externalCalculatedData) {
14885
14711
  return externalCalculatedData;
@@ -14967,7 +14793,7 @@ var VisualizerBase = /** @class */ (function () {
14967
14793
  if (!!survey) {
14968
14794
  return survey.locale;
14969
14795
  }
14970
- return _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.currentLocale;
14796
+ return _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.currentLocale;
14971
14797
  },
14972
14798
  set: function (newLocale) {
14973
14799
  this.setLocale(newLocale);
@@ -14978,13 +14804,14 @@ var VisualizerBase = /** @class */ (function () {
14978
14804
  configurable: true
14979
14805
  });
14980
14806
  VisualizerBase.prototype.setLocale = function (newLocale) {
14981
- _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.currentLocale = newLocale;
14807
+ _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.currentLocale = newLocale;
14982
14808
  var survey = this.options.survey;
14983
14809
  if (!!survey && survey.locale !== newLocale) {
14984
14810
  survey.locale = newLocale;
14985
14811
  }
14986
14812
  };
14987
14813
  VisualizerBase.suppressVisualizerStubRendering = false;
14814
+ VisualizerBase.chartAdapterType = undefined;
14988
14815
  // public static otherCommentQuestionType = "comment"; // TODO: make it configureable - allow choose what kind of question/visualizer will be used for comments/others
14989
14816
  VisualizerBase.otherCommentCollapsed = true;
14990
14817
  VisualizerBase.customColors = [];
@@ -15003,63 +14830,7 @@ var VisualizerBase = /** @class */ (function () {
15003
14830
  return VisualizerBase;
15004
14831
  }());
15005
14832
 
15006
- function defaultStatisticsCalculator(data, dataInfo) {
15007
- var dataNames = dataInfo.dataNames;
15008
- var statistics = [];
15009
- var values = dataInfo.getValues();
15010
- var valuesIndex = {};
15011
- values.forEach(function (val, index) {
15012
- valuesIndex[val] = index;
15013
- });
15014
- var processMissingAnswers = values.indexOf(undefined) !== -1;
15015
- var series = dataInfo.getSeriesValues();
15016
- var seriesIndex = {};
15017
- series.forEach(function (val, index) {
15018
- seriesIndex[val] = index;
15019
- });
15020
- var seriesLength = series.length || 1;
15021
- for (var i = 0; i < dataNames.length; ++i) {
15022
- var dataNameStatistics = new Array();
15023
- for (var j = 0; j < seriesLength; ++j) {
15024
- dataNameStatistics.push(new Array(values.length).fill(0));
15025
- }
15026
- statistics.push(dataNameStatistics);
15027
- }
15028
- data.forEach(function (row) {
15029
- dataNames.forEach(function (dataName, index) {
15030
- var rowValue = row[dataName];
15031
- if (rowValue !== undefined || processMissingAnswers) {
15032
- var rowValues = Array.isArray(rowValue) ? rowValue : [rowValue];
15033
- if (series.length > 0) {
15034
- if (row[_dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider.seriesMarkerKey] !== undefined) {
15035
- // Series are labelled by seriesMarkerKey in row data
15036
- var seriesNo_1 = seriesIndex[row[_dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider.seriesMarkerKey]] || 0;
15037
- rowValues.forEach(function (val) {
15038
- statistics[index][seriesNo_1][valuesIndex[val]]++;
15039
- });
15040
- }
15041
- else {
15042
- // Series are the keys in question value (matrix question)
15043
- // TODO: think about the de-normalization and combine with the previous case
15044
- rowValues.forEach(function (val) {
15045
- series.forEach(function (seriesName) {
15046
- if (val[seriesName] !== undefined) {
15047
- var seriesNo = seriesIndex[seriesName] || 0;
15048
- statistics[index][seriesNo][valuesIndex[val[seriesName]]]++;
15049
- }
15050
- });
15051
- });
15052
- }
15053
- }
15054
- else {
15055
- // No series
15056
- rowValues.forEach(function (val) { return statistics[0][0][valuesIndex[val]]++; });
15057
- }
15058
- }
15059
- });
15060
- });
15061
- return dataInfo.dataNames.length > 1 ? statistics : statistics[0];
15062
- }
14833
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.defaultVisualizer = VisualizerBase;
15063
14834
 
15064
14835
 
15065
14836
  /***/ }),
@@ -17056,11 +16827,10 @@ __webpack_require__.r(__webpack_exports__);
17056
16827
  /* harmony export */ NumberModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.NumberModel),
17057
16828
  /* harmony export */ PivotModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.PivotModel),
17058
16829
  /* 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
16830
  /* 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
16831
  /* harmony export */ PlotlySetup: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.PlotlySetup),
17063
16832
  /* harmony export */ PostponeHelper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.PostponeHelper),
16833
+ /* harmony export */ RankingModel: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.RankingModel),
17064
16834
  /* harmony export */ RankingPlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.RankingPlotly),
17065
16835
  /* harmony export */ SelectBase: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.SelectBase),
17066
16836
  /* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.SelectBasePlotly),
@@ -17077,9 +16847,9 @@ __webpack_require__.r(__webpack_exports__);
17077
16847
  /* harmony export */ VisualizerFactory: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizerFactory),
17078
16848
  /* harmony export */ WordCloud: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.WordCloud),
17079
16849
  /* 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
16850
  /* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.hideEmptyAnswersInData),
17082
16851
  /* harmony export */ localization: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.localization),
16852
+ /* harmony export */ plotlyChartTypes: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.plotlyChartTypes),
17083
16853
  /* harmony export */ surveyStrings: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.surveyStrings),
17084
16854
  /* harmony export */ textHelper: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.textHelper)
17085
16855
  /* harmony export */ });