survey-analytics 2.3.10 → 2.3.11
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.
- package/fesm/shared.mjs +479 -15
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +696 -212
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +2 -2
- package/fesm/survey.analytics.mjs +26 -8
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +2 -2
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +4 -3
- package/survey-analytics-tabulator.types/analytics-localization/arabic.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/dutch.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/farsi.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/finnish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/french.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/german.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/italian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/japanese.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/norwegian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/polish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/portuguese.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/russian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/spanish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +16 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +16 -0
- package/survey-analytics-tabulator.types/tables/table.d.ts +1 -0
- package/survey-analytics.types/analytics-localization/arabic.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/dutch.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/farsi.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/finnish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/french.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/german.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/italian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/japanese.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/norwegian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/polish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/portuguese.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/russian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/spanish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/swedish.d.ts +16 -0
- package/survey-analytics.types/dataProvider.d.ts +10 -0
- package/survey-analytics.types/entries/mongo.d.ts +1 -0
- package/survey-analytics.types/histogram.d.ts +48 -1
- package/survey-analytics.types/localizationManager.d.ts +16 -0
- package/survey-analytics.types/mongo/index.d.ts +16 -0
- package/survey-analytics.types/mongo/pipelines.d.ts +1 -0
- package/survey-analytics.types/mongo/result-transformers.d.ts +35 -0
- package/survey-analytics.types/selectBase.d.ts +3 -1
- package/survey-analytics.types/statisticCalculators.d.ts +12 -2
- package/survey-analytics.types/visualizationMatrixDropdown.d.ts +4 -6
- package/survey-analytics.types/visualizationPanel.d.ts +1 -0
- package/survey-analytics.types/visualizationPanelDynamic.d.ts +2 -5
- package/survey-analytics.types/visualizerBase.d.ts +2 -0
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.d.ts +1 -0
- package/survey.analytics.core.js +1215 -201
- package/survey.analytics.core.js.map +1 -1
- package/survey.analytics.core.min.css +1 -1
- package/survey.analytics.core.min.js +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1 -1
- package/survey.analytics.d.ts +1 -0
- package/survey.analytics.js +1240 -206
- package/survey.analytics.js.map +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.mongo.d.ts +1 -0
- package/survey.analytics.mongo.js +1 -1
- package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.d.ts +1 -0
- package/survey.analytics.tabulator.js +480 -16
- package/survey.analytics.tabulator.js.map +1 -1
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +1 -1
- package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
package/survey.analytics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.3.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.11
|
|
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
|
*/
|
|
@@ -7230,7 +7230,39 @@ var arabicStrings = {
|
|
|
7230
7230
|
// [Auto-translated] "Groups:"
|
|
7231
7231
|
axisYAlternativeSelectorTitle: "المجموعات:",
|
|
7232
7232
|
// [Auto-translated] "Not selected"
|
|
7233
|
-
notSelected: "غير محدد"
|
|
7233
|
+
notSelected: "غير محدد",
|
|
7234
|
+
// [Auto-translated] "Default"
|
|
7235
|
+
intervalMode_default: "افتراضي",
|
|
7236
|
+
// [Auto-translated] "Decades"
|
|
7237
|
+
intervalMode_decades: "عقود",
|
|
7238
|
+
// [Auto-translated] "Years"
|
|
7239
|
+
intervalMode_years: "اعوام",
|
|
7240
|
+
// [Auto-translated] "Quarters"
|
|
7241
|
+
intervalMode_quarters: "ارباع",
|
|
7242
|
+
// [Auto-translated] "Months"
|
|
7243
|
+
intervalMode_months: "أشهر",
|
|
7244
|
+
// [Auto-translated] "Days"
|
|
7245
|
+
intervalMode_days: "أيام",
|
|
7246
|
+
// [Auto-translated] "Custom"
|
|
7247
|
+
intervalMode_custom: "تقليد",
|
|
7248
|
+
// [Auto-translated] "Auto"
|
|
7249
|
+
intervalMode_auto: "تلقائي",
|
|
7250
|
+
// [Auto-translated] "Intervals:"
|
|
7251
|
+
intervalModeTitle: "فترات:",
|
|
7252
|
+
// [Auto-translated] "Show individual values"
|
|
7253
|
+
noRunningTotals: "إظهار القيم الفردية",
|
|
7254
|
+
// [Auto-translated] "Show running totals"
|
|
7255
|
+
runningTotals: "إظهار الإجماليات الجارية",
|
|
7256
|
+
// [Auto-translated] "Compare periods"
|
|
7257
|
+
groupDateSeries: "مقارنة الفترات",
|
|
7258
|
+
// [Auto-translated] "View timeline"
|
|
7259
|
+
ungroupDateSeries: "عرض الجدول الزمني",
|
|
7260
|
+
// [Auto-translated] "None"
|
|
7261
|
+
noneAggregateText: "اي",
|
|
7262
|
+
// [Auto-translated] "Aggregate:"
|
|
7263
|
+
selectAggregateText: "تجميع:",
|
|
7264
|
+
// [Auto-translated] "Year ends with"
|
|
7265
|
+
groupedYearsAxisTitle: "ينتهي العام ب"
|
|
7234
7266
|
};
|
|
7235
7267
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ar", strings: arabicStrings, nativeName: "العربية" });
|
|
7236
7268
|
|
|
@@ -7414,7 +7446,39 @@ var dutchStrings = {
|
|
|
7414
7446
|
// [Auto-translated] "Groups:"
|
|
7415
7447
|
axisYAlternativeSelectorTitle: "Groepen:",
|
|
7416
7448
|
// [Auto-translated] "Not selected"
|
|
7417
|
-
notSelected: "Niet geselecteerd"
|
|
7449
|
+
notSelected: "Niet geselecteerd",
|
|
7450
|
+
// [Auto-translated] "Default"
|
|
7451
|
+
intervalMode_default: "Verstek",
|
|
7452
|
+
// [Auto-translated] "Decades"
|
|
7453
|
+
intervalMode_decades: "Decennia",
|
|
7454
|
+
// [Auto-translated] "Years"
|
|
7455
|
+
intervalMode_years: "Jaren",
|
|
7456
|
+
// [Auto-translated] "Quarters"
|
|
7457
|
+
intervalMode_quarters: "Vertrekken",
|
|
7458
|
+
// [Auto-translated] "Months"
|
|
7459
|
+
intervalMode_months: "Maanden",
|
|
7460
|
+
// [Auto-translated] "Days"
|
|
7461
|
+
intervalMode_days: "Dagen",
|
|
7462
|
+
// [Auto-translated] "Custom"
|
|
7463
|
+
intervalMode_custom: "Gewoonte",
|
|
7464
|
+
// [Auto-translated] "Auto"
|
|
7465
|
+
intervalMode_auto: "Auto",
|
|
7466
|
+
// [Auto-translated] "Intervals:"
|
|
7467
|
+
intervalModeTitle: "Intervallen:",
|
|
7468
|
+
// [Auto-translated] "Show individual values"
|
|
7469
|
+
noRunningTotals: "Toon individuele waarden",
|
|
7470
|
+
// [Auto-translated] "Show running totals"
|
|
7471
|
+
runningTotals: "Toon lopende totalen",
|
|
7472
|
+
// [Auto-translated] "Compare periods"
|
|
7473
|
+
groupDateSeries: "Vergelijk periodes",
|
|
7474
|
+
// [Auto-translated] "View timeline"
|
|
7475
|
+
ungroupDateSeries: "Tijdlijn bekijken",
|
|
7476
|
+
// [Auto-translated] "None"
|
|
7477
|
+
noneAggregateText: "Geen",
|
|
7478
|
+
// [Auto-translated] "Aggregate:"
|
|
7479
|
+
selectAggregateText: "Aggregaat:",
|
|
7480
|
+
// [Auto-translated] "Year ends with"
|
|
7481
|
+
groupedYearsAxisTitle: "Het jaar eindigt met"
|
|
7418
7482
|
};
|
|
7419
7483
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "nl", strings: dutchStrings, nativeName: "Nederlands" });
|
|
7420
7484
|
|
|
@@ -7517,6 +7581,22 @@ var englishStrings = {
|
|
|
7517
7581
|
axisXAlternativeSelectorTitle: "Segments:",
|
|
7518
7582
|
axisYAlternativeSelectorTitle: "Groups:",
|
|
7519
7583
|
notSelected: "Not selected",
|
|
7584
|
+
intervalMode_default: "Default",
|
|
7585
|
+
intervalMode_decades: "Decades",
|
|
7586
|
+
intervalMode_years: "Years",
|
|
7587
|
+
intervalMode_quarters: "Quarters",
|
|
7588
|
+
intervalMode_months: "Months",
|
|
7589
|
+
intervalMode_days: "Days",
|
|
7590
|
+
intervalMode_custom: "Custom",
|
|
7591
|
+
intervalMode_auto: "Auto",
|
|
7592
|
+
intervalModeTitle: "Intervals:",
|
|
7593
|
+
noRunningTotals: "Show individual values",
|
|
7594
|
+
runningTotals: "Show running totals",
|
|
7595
|
+
groupDateSeries: "Compare periods",
|
|
7596
|
+
ungroupDateSeries: "View timeline",
|
|
7597
|
+
noneAggregateText: "None",
|
|
7598
|
+
selectAggregateText: "Aggregate:",
|
|
7599
|
+
groupedYearsAxisTitle: "Year ends with",
|
|
7520
7600
|
license: "To use the Dashboard library in your application, a <a href='https://surveyjs.io/licensing' target='_blank'>developer license</a> is required. If you have an active license, please <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up your license key</a> and ensure you're using the <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>latest version</a>.",
|
|
7521
7601
|
license2: "This banner appears because your maintenance subscription for the Dashboard library expired on {date}. You may continue using <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>all versions released up to that date</a>. To remove this banner in the latest version, please <a href='https://surveyjs.io/manage#license-manager' target='_blank'>renew your subscription</a> and <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up a new license key</a>."
|
|
7522
7602
|
};
|
|
@@ -7705,7 +7785,39 @@ var farsiStrings = {
|
|
|
7705
7785
|
// [Auto-translated] "Groups:"
|
|
7706
7786
|
axisYAlternativeSelectorTitle: "گروه:",
|
|
7707
7787
|
// [Auto-translated] "Not selected"
|
|
7708
|
-
notSelected: "انتخاب نشده است"
|
|
7788
|
+
notSelected: "انتخاب نشده است",
|
|
7789
|
+
// [Auto-translated] "Default"
|
|
7790
|
+
intervalMode_default: "پیش فرض",
|
|
7791
|
+
// [Auto-translated] "Decades"
|
|
7792
|
+
intervalMode_decades: "دهه",
|
|
7793
|
+
// [Auto-translated] "Years"
|
|
7794
|
+
intervalMode_years: "سال",
|
|
7795
|
+
// [Auto-translated] "Quarters"
|
|
7796
|
+
intervalMode_quarters: "چهارم",
|
|
7797
|
+
// [Auto-translated] "Months"
|
|
7798
|
+
intervalMode_months: "ماهها",
|
|
7799
|
+
// [Auto-translated] "Days"
|
|
7800
|
+
intervalMode_days: "روزها",
|
|
7801
|
+
// [Auto-translated] "Custom"
|
|
7802
|
+
intervalMode_custom: "سفارشی",
|
|
7803
|
+
// [Auto-translated] "Auto"
|
|
7804
|
+
intervalMode_auto: "خودکار",
|
|
7805
|
+
// [Auto-translated] "Intervals:"
|
|
7806
|
+
intervalModeTitle: "فواصل:",
|
|
7807
|
+
// [Auto-translated] "Show individual values"
|
|
7808
|
+
noRunningTotals: "نمایش ارزش های فردی",
|
|
7809
|
+
// [Auto-translated] "Show running totals"
|
|
7810
|
+
runningTotals: "نمایش مجموع در حال اجرا",
|
|
7811
|
+
// [Auto-translated] "Compare periods"
|
|
7812
|
+
groupDateSeries: "دوره ها را مقایسه کنید",
|
|
7813
|
+
// [Auto-translated] "View timeline"
|
|
7814
|
+
ungroupDateSeries: "مشاهده جدول زمانی",
|
|
7815
|
+
// [Auto-translated] "None"
|
|
7816
|
+
noneAggregateText: "هیچ کدام",
|
|
7817
|
+
// [Auto-translated] "Aggregate:"
|
|
7818
|
+
selectAggregateText: "مجموع:",
|
|
7819
|
+
// [Auto-translated] "Year ends with"
|
|
7820
|
+
groupedYearsAxisTitle: "سال به پایان می رسد با"
|
|
7709
7821
|
};
|
|
7710
7822
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fa", strings: farsiStrings, nativeName: "فارسی" });
|
|
7711
7823
|
|
|
@@ -7889,7 +8001,39 @@ var finnishStrings = {
|
|
|
7889
8001
|
// [Auto-translated] "Groups:"
|
|
7890
8002
|
axisYAlternativeSelectorTitle: "Ryhmät:",
|
|
7891
8003
|
// [Auto-translated] "Not selected"
|
|
7892
|
-
notSelected: "Ei valittu"
|
|
8004
|
+
notSelected: "Ei valittu",
|
|
8005
|
+
// [Auto-translated] "Default"
|
|
8006
|
+
intervalMode_default: "Laiminlyönti",
|
|
8007
|
+
// [Auto-translated] "Decades"
|
|
8008
|
+
intervalMode_decades: "Vuosikymmeniä",
|
|
8009
|
+
// [Auto-translated] "Years"
|
|
8010
|
+
intervalMode_years: "Vuosia",
|
|
8011
|
+
// [Auto-translated] "Quarters"
|
|
8012
|
+
intervalMode_quarters: "Neljäsosaa",
|
|
8013
|
+
// [Auto-translated] "Months"
|
|
8014
|
+
intervalMode_months: "Kuukautta",
|
|
8015
|
+
// [Auto-translated] "Days"
|
|
8016
|
+
intervalMode_days: "Päivää",
|
|
8017
|
+
// [Auto-translated] "Custom"
|
|
8018
|
+
intervalMode_custom: "Tapa",
|
|
8019
|
+
// [Auto-translated] "Auto"
|
|
8020
|
+
intervalMode_auto: "Auto",
|
|
8021
|
+
// [Auto-translated] "Intervals:"
|
|
8022
|
+
intervalModeTitle: "Välein:",
|
|
8023
|
+
// [Auto-translated] "Show individual values"
|
|
8024
|
+
noRunningTotals: "Näytä yksittäiset arvot",
|
|
8025
|
+
// [Auto-translated] "Show running totals"
|
|
8026
|
+
runningTotals: "Näytä juoksevat kokonaismäärät",
|
|
8027
|
+
// [Auto-translated] "Compare periods"
|
|
8028
|
+
groupDateSeries: "Vertaile kausia",
|
|
8029
|
+
// [Auto-translated] "View timeline"
|
|
8030
|
+
ungroupDateSeries: "Näytä aikajana",
|
|
8031
|
+
// [Auto-translated] "None"
|
|
8032
|
+
noneAggregateText: "Ei lainkaan",
|
|
8033
|
+
// [Auto-translated] "Aggregate:"
|
|
8034
|
+
selectAggregateText: "Aggregaatti:",
|
|
8035
|
+
// [Auto-translated] "Year ends with"
|
|
8036
|
+
groupedYearsAxisTitle: "Vuosi päättyy"
|
|
7893
8037
|
};
|
|
7894
8038
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fi", strings: finnishStrings, nativeName: "Suomi" });
|
|
7895
8039
|
|
|
@@ -8073,7 +8217,39 @@ var frenchStrings = {
|
|
|
8073
8217
|
// [Auto-translated] "Groups:"
|
|
8074
8218
|
axisYAlternativeSelectorTitle: "Groupe:",
|
|
8075
8219
|
// [Auto-translated] "Not selected"
|
|
8076
|
-
notSelected: "Non sélectionné"
|
|
8220
|
+
notSelected: "Non sélectionné",
|
|
8221
|
+
// [Auto-translated] "Default"
|
|
8222
|
+
intervalMode_default: "Faire défaut",
|
|
8223
|
+
// [Auto-translated] "Decades"
|
|
8224
|
+
intervalMode_decades: "Décennies",
|
|
8225
|
+
// [Auto-translated] "Years"
|
|
8226
|
+
intervalMode_years: "Années",
|
|
8227
|
+
// [Auto-translated] "Quarters"
|
|
8228
|
+
intervalMode_quarters: "Quartier",
|
|
8229
|
+
// [Auto-translated] "Months"
|
|
8230
|
+
intervalMode_months: "Mois",
|
|
8231
|
+
// [Auto-translated] "Days"
|
|
8232
|
+
intervalMode_days: "Jours",
|
|
8233
|
+
// [Auto-translated] "Custom"
|
|
8234
|
+
intervalMode_custom: "Coutume",
|
|
8235
|
+
// [Auto-translated] "Auto"
|
|
8236
|
+
intervalMode_auto: "Auto",
|
|
8237
|
+
// [Auto-translated] "Intervals:"
|
|
8238
|
+
intervalModeTitle: "Intervalles:",
|
|
8239
|
+
// [Auto-translated] "Show individual values"
|
|
8240
|
+
noRunningTotals: "Afficher les valeurs individuelles",
|
|
8241
|
+
// [Auto-translated] "Show running totals"
|
|
8242
|
+
runningTotals: "Afficher les totaux cumulés",
|
|
8243
|
+
// [Auto-translated] "Compare periods"
|
|
8244
|
+
groupDateSeries: "Comparer les périodes",
|
|
8245
|
+
// [Auto-translated] "View timeline"
|
|
8246
|
+
ungroupDateSeries: "Voir la chronologie",
|
|
8247
|
+
// [Auto-translated] "None"
|
|
8248
|
+
noneAggregateText: "Aucun",
|
|
8249
|
+
// [Auto-translated] "Aggregate:"
|
|
8250
|
+
selectAggregateText: "Agrégat:",
|
|
8251
|
+
// [Auto-translated] "Year ends with"
|
|
8252
|
+
groupedYearsAxisTitle: "L’exercice se termine avec"
|
|
8077
8253
|
};
|
|
8078
8254
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fr", strings: frenchStrings, nativeName: "Français" });
|
|
8079
8255
|
|
|
@@ -8257,7 +8433,39 @@ var germanStrings = {
|
|
|
8257
8433
|
// [Auto-translated] "Groups:"
|
|
8258
8434
|
axisYAlternativeSelectorTitle: "Gruppen:",
|
|
8259
8435
|
// [Auto-translated] "Not selected"
|
|
8260
|
-
notSelected: "Nicht ausgewählt"
|
|
8436
|
+
notSelected: "Nicht ausgewählt",
|
|
8437
|
+
// [Auto-translated] "Default"
|
|
8438
|
+
intervalMode_default: "Vorgabe",
|
|
8439
|
+
// [Auto-translated] "Decades"
|
|
8440
|
+
intervalMode_decades: "Dekaden",
|
|
8441
|
+
// [Auto-translated] "Years"
|
|
8442
|
+
intervalMode_years: "Jahre",
|
|
8443
|
+
// [Auto-translated] "Quarters"
|
|
8444
|
+
intervalMode_quarters: "Quartier",
|
|
8445
|
+
// [Auto-translated] "Months"
|
|
8446
|
+
intervalMode_months: "Monate",
|
|
8447
|
+
// [Auto-translated] "Days"
|
|
8448
|
+
intervalMode_days: "Tage",
|
|
8449
|
+
// [Auto-translated] "Custom"
|
|
8450
|
+
intervalMode_custom: "Gewohnheit",
|
|
8451
|
+
// [Auto-translated] "Auto"
|
|
8452
|
+
intervalMode_auto: "Auto",
|
|
8453
|
+
// [Auto-translated] "Intervals:"
|
|
8454
|
+
intervalModeTitle: "Intervalle:",
|
|
8455
|
+
// [Auto-translated] "Show individual values"
|
|
8456
|
+
noRunningTotals: "Einzelne Werte anzeigen",
|
|
8457
|
+
// [Auto-translated] "Show running totals"
|
|
8458
|
+
runningTotals: "Laufende Summen anzeigen",
|
|
8459
|
+
// [Auto-translated] "Compare periods"
|
|
8460
|
+
groupDateSeries: "Zeiträume vergleichen",
|
|
8461
|
+
// [Auto-translated] "View timeline"
|
|
8462
|
+
ungroupDateSeries: "Zeitleiste anzeigen",
|
|
8463
|
+
// [Auto-translated] "None"
|
|
8464
|
+
noneAggregateText: "Nichts",
|
|
8465
|
+
// [Auto-translated] "Aggregate:"
|
|
8466
|
+
selectAggregateText: "Aggregat:",
|
|
8467
|
+
// [Auto-translated] "Year ends with"
|
|
8468
|
+
groupedYearsAxisTitle: "Das Jahr endet mit"
|
|
8261
8469
|
};
|
|
8262
8470
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "de", strings: germanStrings, nativeName: "Deutsch" });
|
|
8263
8471
|
|
|
@@ -8441,7 +8649,39 @@ var italianStrings = {
|
|
|
8441
8649
|
// [Auto-translated] "Groups:"
|
|
8442
8650
|
axisYAlternativeSelectorTitle: "Gruppi:",
|
|
8443
8651
|
// [Auto-translated] "Not selected"
|
|
8444
|
-
notSelected: "Non selezionato"
|
|
8652
|
+
notSelected: "Non selezionato",
|
|
8653
|
+
// [Auto-translated] "Default"
|
|
8654
|
+
intervalMode_default: "Default",
|
|
8655
|
+
// [Auto-translated] "Decades"
|
|
8656
|
+
intervalMode_decades: "Decenni",
|
|
8657
|
+
// [Auto-translated] "Years"
|
|
8658
|
+
intervalMode_years: "Anni",
|
|
8659
|
+
// [Auto-translated] "Quarters"
|
|
8660
|
+
intervalMode_quarters: "Quarti",
|
|
8661
|
+
// [Auto-translated] "Months"
|
|
8662
|
+
intervalMode_months: "Mesi",
|
|
8663
|
+
// [Auto-translated] "Days"
|
|
8664
|
+
intervalMode_days: "Giorni",
|
|
8665
|
+
// [Auto-translated] "Custom"
|
|
8666
|
+
intervalMode_custom: "Costume",
|
|
8667
|
+
// [Auto-translated] "Auto"
|
|
8668
|
+
intervalMode_auto: "Automatico",
|
|
8669
|
+
// [Auto-translated] "Intervals:"
|
|
8670
|
+
intervalModeTitle: "Intervalli:",
|
|
8671
|
+
// [Auto-translated] "Show individual values"
|
|
8672
|
+
noRunningTotals: "Mostra i singoli valori",
|
|
8673
|
+
// [Auto-translated] "Show running totals"
|
|
8674
|
+
runningTotals: "Mostra totali parziali",
|
|
8675
|
+
// [Auto-translated] "Compare periods"
|
|
8676
|
+
groupDateSeries: "Confronta i periodi",
|
|
8677
|
+
// [Auto-translated] "View timeline"
|
|
8678
|
+
ungroupDateSeries: "Visualizza la timeline",
|
|
8679
|
+
// [Auto-translated] "None"
|
|
8680
|
+
noneAggregateText: "Nessuno",
|
|
8681
|
+
// [Auto-translated] "Aggregate:"
|
|
8682
|
+
selectAggregateText: "Aggregato:",
|
|
8683
|
+
// [Auto-translated] "Year ends with"
|
|
8684
|
+
groupedYearsAxisTitle: "L'anno si chiude con"
|
|
8445
8685
|
};
|
|
8446
8686
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "it", strings: italianStrings, nativeName: "Italiano" });
|
|
8447
8687
|
|
|
@@ -8625,7 +8865,39 @@ var japaneseStrings = {
|
|
|
8625
8865
|
// [Auto-translated] "Groups:"
|
|
8626
8866
|
axisYAlternativeSelectorTitle: "グループ:",
|
|
8627
8867
|
// [Auto-translated] "Not selected"
|
|
8628
|
-
notSelected: "選択されていない"
|
|
8868
|
+
notSelected: "選択されていない",
|
|
8869
|
+
// [Auto-translated] "Default"
|
|
8870
|
+
intervalMode_default: "デフォルト",
|
|
8871
|
+
// [Auto-translated] "Decades"
|
|
8872
|
+
intervalMode_decades: "数 十 年",
|
|
8873
|
+
// [Auto-translated] "Years"
|
|
8874
|
+
intervalMode_years: "月日",
|
|
8875
|
+
// [Auto-translated] "Quarters"
|
|
8876
|
+
intervalMode_quarters: "四半期",
|
|
8877
|
+
// [Auto-translated] "Months"
|
|
8878
|
+
intervalMode_months: "月",
|
|
8879
|
+
// [Auto-translated] "Days"
|
|
8880
|
+
intervalMode_days: "日",
|
|
8881
|
+
// [Auto-translated] "Custom"
|
|
8882
|
+
intervalMode_custom: "習慣",
|
|
8883
|
+
// [Auto-translated] "Auto"
|
|
8884
|
+
intervalMode_auto: "自動",
|
|
8885
|
+
// [Auto-translated] "Intervals:"
|
|
8886
|
+
intervalModeTitle: "間隔:",
|
|
8887
|
+
// [Auto-translated] "Show individual values"
|
|
8888
|
+
noRunningTotals: "個々の値を表示する",
|
|
8889
|
+
// [Auto-translated] "Show running totals"
|
|
8890
|
+
runningTotals: "累計を表示する",
|
|
8891
|
+
// [Auto-translated] "Compare periods"
|
|
8892
|
+
groupDateSeries: "期間の比較",
|
|
8893
|
+
// [Auto-translated] "View timeline"
|
|
8894
|
+
ungroupDateSeries: "タイムラインの表示",
|
|
8895
|
+
// [Auto-translated] "None"
|
|
8896
|
+
noneAggregateText: "何一つ",
|
|
8897
|
+
// [Auto-translated] "Aggregate:"
|
|
8898
|
+
selectAggregateText: "骨材:",
|
|
8899
|
+
// [Auto-translated] "Year ends with"
|
|
8900
|
+
groupedYearsAxisTitle: "年末は"
|
|
8629
8901
|
};
|
|
8630
8902
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ja", strings: japaneseStrings, nativeName: "日本語" });
|
|
8631
8903
|
|
|
@@ -8809,7 +9081,39 @@ var norwegianStrings = {
|
|
|
8809
9081
|
// [Auto-translated] "Groups:"
|
|
8810
9082
|
axisYAlternativeSelectorTitle: "Grupper:",
|
|
8811
9083
|
// [Auto-translated] "Not selected"
|
|
8812
|
-
notSelected: "Ikke valgt"
|
|
9084
|
+
notSelected: "Ikke valgt",
|
|
9085
|
+
// [Auto-translated] "Default"
|
|
9086
|
+
intervalMode_default: "Standard",
|
|
9087
|
+
// [Auto-translated] "Decades"
|
|
9088
|
+
intervalMode_decades: "Tiår",
|
|
9089
|
+
// [Auto-translated] "Years"
|
|
9090
|
+
intervalMode_years: "År",
|
|
9091
|
+
// [Auto-translated] "Quarters"
|
|
9092
|
+
intervalMode_quarters: "Kvartaler",
|
|
9093
|
+
// [Auto-translated] "Months"
|
|
9094
|
+
intervalMode_months: "Måneder",
|
|
9095
|
+
// [Auto-translated] "Days"
|
|
9096
|
+
intervalMode_days: "Dager",
|
|
9097
|
+
// [Auto-translated] "Custom"
|
|
9098
|
+
intervalMode_custom: "Skikk",
|
|
9099
|
+
// [Auto-translated] "Auto"
|
|
9100
|
+
intervalMode_auto: "Auto",
|
|
9101
|
+
// [Auto-translated] "Intervals:"
|
|
9102
|
+
intervalModeTitle: "Intervaller:",
|
|
9103
|
+
// [Auto-translated] "Show individual values"
|
|
9104
|
+
noRunningTotals: "Vis individuelle verdier",
|
|
9105
|
+
// [Auto-translated] "Show running totals"
|
|
9106
|
+
runningTotals: "Vis løpende totaler",
|
|
9107
|
+
// [Auto-translated] "Compare periods"
|
|
9108
|
+
groupDateSeries: "Sammenlign perioder",
|
|
9109
|
+
// [Auto-translated] "View timeline"
|
|
9110
|
+
ungroupDateSeries: "Vis tidslinje",
|
|
9111
|
+
// [Auto-translated] "None"
|
|
9112
|
+
noneAggregateText: "Ingen",
|
|
9113
|
+
// [Auto-translated] "Aggregate:"
|
|
9114
|
+
selectAggregateText: "Samlet:",
|
|
9115
|
+
// [Auto-translated] "Year ends with"
|
|
9116
|
+
groupedYearsAxisTitle: "Året avsluttes med"
|
|
8813
9117
|
};
|
|
8814
9118
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "no", strings: norwegianStrings, nativeName: "Norsk" });
|
|
8815
9119
|
|
|
@@ -8993,7 +9297,39 @@ var plStrings = {
|
|
|
8993
9297
|
// [Auto-translated] "Groups:"
|
|
8994
9298
|
axisYAlternativeSelectorTitle: "Grupy:",
|
|
8995
9299
|
// [Auto-translated] "Not selected"
|
|
8996
|
-
notSelected: "Nie wybrano"
|
|
9300
|
+
notSelected: "Nie wybrano",
|
|
9301
|
+
// [Auto-translated] "Default"
|
|
9302
|
+
intervalMode_default: "Domyślny",
|
|
9303
|
+
// [Auto-translated] "Decades"
|
|
9304
|
+
intervalMode_decades: "Dziesięciolecia",
|
|
9305
|
+
// [Auto-translated] "Years"
|
|
9306
|
+
intervalMode_years: "Lata",
|
|
9307
|
+
// [Auto-translated] "Quarters"
|
|
9308
|
+
intervalMode_quarters: "Kwartałów",
|
|
9309
|
+
// [Auto-translated] "Months"
|
|
9310
|
+
intervalMode_months: "Miesiące",
|
|
9311
|
+
// [Auto-translated] "Days"
|
|
9312
|
+
intervalMode_days: "Dni",
|
|
9313
|
+
// [Auto-translated] "Custom"
|
|
9314
|
+
intervalMode_custom: "Zwyczaj",
|
|
9315
|
+
// [Auto-translated] "Auto"
|
|
9316
|
+
intervalMode_auto: "Automatycznie",
|
|
9317
|
+
// [Auto-translated] "Intervals:"
|
|
9318
|
+
intervalModeTitle: "Odstępach czasu:",
|
|
9319
|
+
// [Auto-translated] "Show individual values"
|
|
9320
|
+
noRunningTotals: "Pokaż poszczególne wartości",
|
|
9321
|
+
// [Auto-translated] "Show running totals"
|
|
9322
|
+
runningTotals: "Pokazywanie sum bieżących",
|
|
9323
|
+
// [Auto-translated] "Compare periods"
|
|
9324
|
+
groupDateSeries: "Porównywanie okresów",
|
|
9325
|
+
// [Auto-translated] "View timeline"
|
|
9326
|
+
ungroupDateSeries: "Wyświetl oś czasu",
|
|
9327
|
+
// [Auto-translated] "None"
|
|
9328
|
+
noneAggregateText: "Żaden",
|
|
9329
|
+
// [Auto-translated] "Aggregate:"
|
|
9330
|
+
selectAggregateText: "Kruszywo:",
|
|
9331
|
+
// [Auto-translated] "Year ends with"
|
|
9332
|
+
groupedYearsAxisTitle: "Rok kończy się na"
|
|
8997
9333
|
};
|
|
8998
9334
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "pl", strings: plStrings, nativeName: "Polski" });
|
|
8999
9335
|
|
|
@@ -9177,7 +9513,39 @@ var portugueseStrings = {
|
|
|
9177
9513
|
// [Auto-translated] "Groups:"
|
|
9178
9514
|
axisYAlternativeSelectorTitle: "Grupos:",
|
|
9179
9515
|
// [Auto-translated] "Not selected"
|
|
9180
|
-
notSelected: "Não selecionado"
|
|
9516
|
+
notSelected: "Não selecionado",
|
|
9517
|
+
// [Auto-translated] "Default"
|
|
9518
|
+
intervalMode_default: "Inadimplência",
|
|
9519
|
+
// [Auto-translated] "Decades"
|
|
9520
|
+
intervalMode_decades: "Décadas",
|
|
9521
|
+
// [Auto-translated] "Years"
|
|
9522
|
+
intervalMode_years: "Anos",
|
|
9523
|
+
// [Auto-translated] "Quarters"
|
|
9524
|
+
intervalMode_quarters: "Quartos",
|
|
9525
|
+
// [Auto-translated] "Months"
|
|
9526
|
+
intervalMode_months: "Meses",
|
|
9527
|
+
// [Auto-translated] "Days"
|
|
9528
|
+
intervalMode_days: "Dias",
|
|
9529
|
+
// [Auto-translated] "Custom"
|
|
9530
|
+
intervalMode_custom: "Costume",
|
|
9531
|
+
// [Auto-translated] "Auto"
|
|
9532
|
+
intervalMode_auto: "Automático",
|
|
9533
|
+
// [Auto-translated] "Intervals:"
|
|
9534
|
+
intervalModeTitle: "Intervalos:",
|
|
9535
|
+
// [Auto-translated] "Show individual values"
|
|
9536
|
+
noRunningTotals: "Mostrar valores individuais",
|
|
9537
|
+
// [Auto-translated] "Show running totals"
|
|
9538
|
+
runningTotals: "Mostrar totais acumulados",
|
|
9539
|
+
// [Auto-translated] "Compare periods"
|
|
9540
|
+
groupDateSeries: "Comparar períodos",
|
|
9541
|
+
// [Auto-translated] "View timeline"
|
|
9542
|
+
ungroupDateSeries: "Ver linha do tempo",
|
|
9543
|
+
// [Auto-translated] "None"
|
|
9544
|
+
noneAggregateText: "Nenhum",
|
|
9545
|
+
// [Auto-translated] "Aggregate:"
|
|
9546
|
+
selectAggregateText: "Agregado:",
|
|
9547
|
+
// [Auto-translated] "Year ends with"
|
|
9548
|
+
groupedYearsAxisTitle: "O ano termina com"
|
|
9181
9549
|
};
|
|
9182
9550
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "pt", strings: portugueseStrings, nativeName: "Português" });
|
|
9183
9551
|
|
|
@@ -9361,7 +9729,39 @@ var russianStrings = {
|
|
|
9361
9729
|
// [Auto-translated] "Groups:"
|
|
9362
9730
|
axisYAlternativeSelectorTitle: "Группы:",
|
|
9363
9731
|
// [Auto-translated] "Not selected"
|
|
9364
|
-
notSelected: "Не выбрано"
|
|
9732
|
+
notSelected: "Не выбрано",
|
|
9733
|
+
// [Auto-translated] "Default"
|
|
9734
|
+
intervalMode_default: "По умолчанию",
|
|
9735
|
+
// [Auto-translated] "Decades"
|
|
9736
|
+
intervalMode_decades: "Десятилетий",
|
|
9737
|
+
// [Auto-translated] "Years"
|
|
9738
|
+
intervalMode_years: "Годы",
|
|
9739
|
+
// [Auto-translated] "Quarters"
|
|
9740
|
+
intervalMode_quarters: "Квартира",
|
|
9741
|
+
// [Auto-translated] "Months"
|
|
9742
|
+
intervalMode_months: "Месяцы",
|
|
9743
|
+
// [Auto-translated] "Days"
|
|
9744
|
+
intervalMode_days: "Дни недели",
|
|
9745
|
+
// [Auto-translated] "Custom"
|
|
9746
|
+
intervalMode_custom: "Обычай",
|
|
9747
|
+
// [Auto-translated] "Auto"
|
|
9748
|
+
intervalMode_auto: "Авто",
|
|
9749
|
+
// [Auto-translated] "Intervals:"
|
|
9750
|
+
intervalModeTitle: "Интервалы:",
|
|
9751
|
+
// [Auto-translated] "Show individual values"
|
|
9752
|
+
noRunningTotals: "Отображение отдельных значений",
|
|
9753
|
+
// [Auto-translated] "Show running totals"
|
|
9754
|
+
runningTotals: "Показать промежуточные итоги",
|
|
9755
|
+
// [Auto-translated] "Compare periods"
|
|
9756
|
+
groupDateSeries: "Сравнение периодов",
|
|
9757
|
+
// [Auto-translated] "View timeline"
|
|
9758
|
+
ungroupDateSeries: "Просмотр временной шкалы",
|
|
9759
|
+
// [Auto-translated] "None"
|
|
9760
|
+
noneAggregateText: "Никакой",
|
|
9761
|
+
// [Auto-translated] "Aggregate:"
|
|
9762
|
+
selectAggregateText: "Совокупность:",
|
|
9763
|
+
// [Auto-translated] "Year ends with"
|
|
9764
|
+
groupedYearsAxisTitle: "Год заканчивается с"
|
|
9365
9765
|
};
|
|
9366
9766
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ru", strings: russianStrings, nativeName: "Русский" });
|
|
9367
9767
|
|
|
@@ -9545,7 +9945,39 @@ var spanishStrings = {
|
|
|
9545
9945
|
// [Auto-translated] "Groups:"
|
|
9546
9946
|
axisYAlternativeSelectorTitle: "Grupos:",
|
|
9547
9947
|
// [Auto-translated] "Not selected"
|
|
9548
|
-
notSelected: "No seleccionado"
|
|
9948
|
+
notSelected: "No seleccionado",
|
|
9949
|
+
// [Auto-translated] "Default"
|
|
9950
|
+
intervalMode_default: "Predeterminado",
|
|
9951
|
+
// [Auto-translated] "Decades"
|
|
9952
|
+
intervalMode_decades: "Décadas",
|
|
9953
|
+
// [Auto-translated] "Years"
|
|
9954
|
+
intervalMode_years: "Años",
|
|
9955
|
+
// [Auto-translated] "Quarters"
|
|
9956
|
+
intervalMode_quarters: "Alojamiento",
|
|
9957
|
+
// [Auto-translated] "Months"
|
|
9958
|
+
intervalMode_months: "Meses",
|
|
9959
|
+
// [Auto-translated] "Days"
|
|
9960
|
+
intervalMode_days: "Días",
|
|
9961
|
+
// [Auto-translated] "Custom"
|
|
9962
|
+
intervalMode_custom: "Costumbre",
|
|
9963
|
+
// [Auto-translated] "Auto"
|
|
9964
|
+
intervalMode_auto: "Automático",
|
|
9965
|
+
// [Auto-translated] "Intervals:"
|
|
9966
|
+
intervalModeTitle: "Intervalos:",
|
|
9967
|
+
// [Auto-translated] "Show individual values"
|
|
9968
|
+
noRunningTotals: "Mostrar valores individuales",
|
|
9969
|
+
// [Auto-translated] "Show running totals"
|
|
9970
|
+
runningTotals: "Mostrar totales acumulados",
|
|
9971
|
+
// [Auto-translated] "Compare periods"
|
|
9972
|
+
groupDateSeries: "Comparar períodos",
|
|
9973
|
+
// [Auto-translated] "View timeline"
|
|
9974
|
+
ungroupDateSeries: "Ver cronograma",
|
|
9975
|
+
// [Auto-translated] "None"
|
|
9976
|
+
noneAggregateText: "Ninguno",
|
|
9977
|
+
// [Auto-translated] "Aggregate:"
|
|
9978
|
+
selectAggregateText: "Agregado:",
|
|
9979
|
+
// [Auto-translated] "Year ends with"
|
|
9980
|
+
groupedYearsAxisTitle: "El año termina con"
|
|
9549
9981
|
};
|
|
9550
9982
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "es", strings: spanishStrings, nativeName: "Español" });
|
|
9551
9983
|
|
|
@@ -9729,7 +10161,39 @@ var swedishStrings = {
|
|
|
9729
10161
|
// [Auto-translated] "Groups:"
|
|
9730
10162
|
axisYAlternativeSelectorTitle: "Grupper:",
|
|
9731
10163
|
// [Auto-translated] "Not selected"
|
|
9732
|
-
notSelected: "Inte valt"
|
|
10164
|
+
notSelected: "Inte valt",
|
|
10165
|
+
// [Auto-translated] "Default"
|
|
10166
|
+
intervalMode_default: "Standard",
|
|
10167
|
+
// [Auto-translated] "Decades"
|
|
10168
|
+
intervalMode_decades: "Årtionden",
|
|
10169
|
+
// [Auto-translated] "Years"
|
|
10170
|
+
intervalMode_years: "År",
|
|
10171
|
+
// [Auto-translated] "Quarters"
|
|
10172
|
+
intervalMode_quarters: "Bostad",
|
|
10173
|
+
// [Auto-translated] "Months"
|
|
10174
|
+
intervalMode_months: "Månader",
|
|
10175
|
+
// [Auto-translated] "Days"
|
|
10176
|
+
intervalMode_days: "Dagar",
|
|
10177
|
+
// [Auto-translated] "Custom"
|
|
10178
|
+
intervalMode_custom: "Sed",
|
|
10179
|
+
// [Auto-translated] "Auto"
|
|
10180
|
+
intervalMode_auto: "Bil",
|
|
10181
|
+
// [Auto-translated] "Intervals:"
|
|
10182
|
+
intervalModeTitle: "Mellanrum:",
|
|
10183
|
+
// [Auto-translated] "Show individual values"
|
|
10184
|
+
noRunningTotals: "Visa individuella värden",
|
|
10185
|
+
// [Auto-translated] "Show running totals"
|
|
10186
|
+
runningTotals: "Visa löpande totaler",
|
|
10187
|
+
// [Auto-translated] "Compare periods"
|
|
10188
|
+
groupDateSeries: "Jämför perioder",
|
|
10189
|
+
// [Auto-translated] "View timeline"
|
|
10190
|
+
ungroupDateSeries: "Visa tidslinjen",
|
|
10191
|
+
// [Auto-translated] "None"
|
|
10192
|
+
noneAggregateText: "Ingen",
|
|
10193
|
+
// [Auto-translated] "Aggregate:"
|
|
10194
|
+
selectAggregateText: "Aggregat:",
|
|
10195
|
+
// [Auto-translated] "Year ends with"
|
|
10196
|
+
groupedYearsAxisTitle: "Året slutar med"
|
|
9733
10197
|
};
|
|
9734
10198
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "sv", strings: swedishStrings, nativeName: "Svenska" });
|
|
9735
10199
|
|
|
@@ -9841,6 +10305,10 @@ var DataProvider = /** @class */ (function () {
|
|
|
9841
10305
|
if (_data === void 0) { _data = []; }
|
|
9842
10306
|
this._data = _data;
|
|
9843
10307
|
this.filterValues = {};
|
|
10308
|
+
/**
|
|
10309
|
+
* Fires when data has been changed.
|
|
10310
|
+
*/
|
|
10311
|
+
this.onFilterChanged = new survey_core__WEBPACK_IMPORTED_MODULE_0__.Event();
|
|
9844
10312
|
/**
|
|
9845
10313
|
* Fires when data has been changed.
|
|
9846
10314
|
*/
|
|
@@ -9887,13 +10355,17 @@ var DataProvider = /** @class */ (function () {
|
|
|
9887
10355
|
var filterValueType = typeof filterValue;
|
|
9888
10356
|
var questionValue = item[key];
|
|
9889
10357
|
if (Array.isArray(questionValue)) {
|
|
9890
|
-
if (filterValueType
|
|
10358
|
+
if (filterValueType === "object") {
|
|
10359
|
+
return !questionArrayValueContainsValue(questionValue, filterValue);
|
|
10360
|
+
}
|
|
10361
|
+
else {
|
|
9891
10362
|
return questionValue.indexOf(filterValue) == -1;
|
|
10363
|
+
}
|
|
9892
10364
|
}
|
|
9893
10365
|
if (typeof questionValue === "object") {
|
|
9894
10366
|
if (filterValueType !== "object")
|
|
9895
10367
|
return true;
|
|
9896
|
-
return !
|
|
10368
|
+
return !questionValueContainsValue(questionValue, filterValue);
|
|
9897
10369
|
}
|
|
9898
10370
|
var seriesValue = item[DataProvider.seriesMarkerKey];
|
|
9899
10371
|
if (!!seriesValue && filterValueType === "object") {
|
|
@@ -9929,16 +10401,38 @@ var DataProvider = /** @class */ (function () {
|
|
|
9929
10401
|
var filterChanged = true;
|
|
9930
10402
|
if (selectedValue !== undefined) {
|
|
9931
10403
|
filterChanged = this.filterValues[questionName] !== selectedValue;
|
|
9932
|
-
|
|
10404
|
+
if (filterChanged) {
|
|
10405
|
+
this.filterValues[questionName] = selectedValue;
|
|
10406
|
+
}
|
|
9933
10407
|
}
|
|
9934
10408
|
else {
|
|
9935
10409
|
filterChanged = this.filterValues[questionName] !== undefined;
|
|
9936
|
-
|
|
10410
|
+
if (filterChanged) {
|
|
10411
|
+
delete this.filterValues[questionName];
|
|
10412
|
+
}
|
|
9937
10413
|
}
|
|
9938
10414
|
if (filterChanged) {
|
|
10415
|
+
this.raiseFilterChanged(questionName, selectedValue);
|
|
9939
10416
|
this.raiseDataChanged();
|
|
9940
10417
|
}
|
|
9941
10418
|
};
|
|
10419
|
+
/**
|
|
10420
|
+
* Resets filter.
|
|
10421
|
+
*/
|
|
10422
|
+
DataProvider.prototype.resetFilter = function () {
|
|
10423
|
+
var _this = this;
|
|
10424
|
+
if (Object.keys(this.filterValues).length === 0) {
|
|
10425
|
+
return;
|
|
10426
|
+
}
|
|
10427
|
+
Object.keys(this.filterValues).forEach(function (key) { return delete _this.filterValues[key]; });
|
|
10428
|
+
this.raiseFilterChanged();
|
|
10429
|
+
this.raiseDataChanged();
|
|
10430
|
+
};
|
|
10431
|
+
DataProvider.prototype.raiseFilterChanged = function (questionName, selectedValue) {
|
|
10432
|
+
if (!this.onFilterChanged.isEmpty) {
|
|
10433
|
+
this.onFilterChanged.fire(this, { questionName: questionName, selectedValue: selectedValue });
|
|
10434
|
+
}
|
|
10435
|
+
};
|
|
9942
10436
|
DataProvider.prototype.raiseDataChanged = function (questionName) {
|
|
9943
10437
|
this._filteredData = undefined;
|
|
9944
10438
|
if (!this.onDataChanged.isEmpty) {
|
|
@@ -9949,11 +10443,33 @@ var DataProvider = /** @class */ (function () {
|
|
|
9949
10443
|
var _this = this;
|
|
9950
10444
|
return Object.keys(this.filterValues).map(function (key) { return ({ field: key, type: "=", value: _this.filterValues[key] }); });
|
|
9951
10445
|
};
|
|
10446
|
+
DataProvider.prototype.fixDropdownData = function (dataNames) {
|
|
10447
|
+
(this.data || []).forEach(function (dataItem) {
|
|
10448
|
+
var rawDataItem = dataItem[dataNames[0]];
|
|
10449
|
+
if (!!rawDataItem && typeof rawDataItem === "object" && !Array.isArray(rawDataItem)) {
|
|
10450
|
+
var arrayData_1 = [];
|
|
10451
|
+
Object.keys(rawDataItem).forEach(function (key) {
|
|
10452
|
+
var nestedDataItem = Object.assign({}, rawDataItem[key]);
|
|
10453
|
+
nestedDataItem[DataProvider.seriesMarkerKey] = key;
|
|
10454
|
+
arrayData_1.push(nestedDataItem);
|
|
10455
|
+
});
|
|
10456
|
+
dataItem[dataNames[0]] = arrayData_1;
|
|
10457
|
+
}
|
|
10458
|
+
});
|
|
10459
|
+
};
|
|
9952
10460
|
DataProvider.seriesMarkerKey = "__sa_series_name";
|
|
9953
10461
|
return DataProvider;
|
|
9954
10462
|
}());
|
|
9955
10463
|
|
|
9956
|
-
function
|
|
10464
|
+
function questionArrayValueContainsValue(questionValues, filterValue) {
|
|
10465
|
+
for (var i = 0; i < questionValues.length; i++) {
|
|
10466
|
+
if (questionValueContainsValue(questionValues[i], filterValue)) {
|
|
10467
|
+
return true;
|
|
10468
|
+
}
|
|
10469
|
+
}
|
|
10470
|
+
return false;
|
|
10471
|
+
}
|
|
10472
|
+
function questionValueContainsValue(questionValue, filterValue) {
|
|
9957
10473
|
var questionValueKeys = Object.keys(questionValue);
|
|
9958
10474
|
var filterValueKeys = Object.keys(filterValue);
|
|
9959
10475
|
if (filterValueKeys.length > questionValueKeys.length)
|
|
@@ -10007,7 +10523,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10007
10523
|
/* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_16__.VisualizerFactory),
|
|
10008
10524
|
/* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloud),
|
|
10009
10525
|
/* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloudAdapter),
|
|
10526
|
+
/* harmony export */ getBestIntervalMode: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.getBestIntervalMode),
|
|
10010
10527
|
/* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
|
|
10528
|
+
/* harmony export */ intervalCalculators: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.intervalCalculators),
|
|
10011
10529
|
/* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
|
|
10012
10530
|
/* harmony export */ setupLocale: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale),
|
|
10013
10531
|
/* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
|
|
@@ -10154,7 +10672,9 @@ var FilterInfo = /** @class */ (function () {
|
|
|
10154
10672
|
"use strict";
|
|
10155
10673
|
__webpack_require__.r(__webpack_exports__);
|
|
10156
10674
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10157
|
-
/* harmony export */ HistogramModel: () => (/* binding */ HistogramModel)
|
|
10675
|
+
/* harmony export */ HistogramModel: () => (/* binding */ HistogramModel),
|
|
10676
|
+
/* harmony export */ getBestIntervalMode: () => (/* binding */ getBestIntervalMode),
|
|
10677
|
+
/* harmony export */ intervalCalculators: () => (/* binding */ intervalCalculators)
|
|
10158
10678
|
/* harmony export */ });
|
|
10159
10679
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
|
|
10160
10680
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
@@ -10163,12 +10683,154 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10163
10683
|
/* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
|
|
10164
10684
|
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
10165
10685
|
/* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
|
|
10686
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
|
|
10687
|
+
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
|
|
10688
|
+
|
|
10689
|
+
|
|
10166
10690
|
|
|
10167
10691
|
|
|
10168
10692
|
|
|
10169
10693
|
|
|
10170
10694
|
|
|
10171
10695
|
|
|
10696
|
+
function getQuarter(date) {
|
|
10697
|
+
switch (Math.floor(date.getMonth() / 3) + 1) {
|
|
10698
|
+
case 1: return "I";
|
|
10699
|
+
case 2: return "II";
|
|
10700
|
+
case 3: return "III";
|
|
10701
|
+
case 4: return "IV";
|
|
10702
|
+
}
|
|
10703
|
+
}
|
|
10704
|
+
function getBestIntervalMode(min, max) {
|
|
10705
|
+
var start = new Date(min);
|
|
10706
|
+
var end = new Date(max);
|
|
10707
|
+
var totalMonths = (end.getFullYear() - start.getFullYear()) * 12 + (end.getMonth() - start.getMonth());
|
|
10708
|
+
if (totalMonths > 10 * 12)
|
|
10709
|
+
return "decades";
|
|
10710
|
+
if (totalMonths > 2 * 12)
|
|
10711
|
+
return "years";
|
|
10712
|
+
if (totalMonths > 1 * 12)
|
|
10713
|
+
return "quarters";
|
|
10714
|
+
if (totalMonths > 4)
|
|
10715
|
+
return "months";
|
|
10716
|
+
return "days";
|
|
10717
|
+
}
|
|
10718
|
+
var intervalCalculators = {
|
|
10719
|
+
decades: function (min, max) {
|
|
10720
|
+
var intervals = [];
|
|
10721
|
+
var start = new Date(min);
|
|
10722
|
+
start.setFullYear(Math.floor(start.getFullYear() / 10) * 10);
|
|
10723
|
+
start.setMonth(0);
|
|
10724
|
+
start.setDate(1);
|
|
10725
|
+
start.setHours(0, 0, 0, 0);
|
|
10726
|
+
var startYear = start.getFullYear();
|
|
10727
|
+
var end = new Date(max);
|
|
10728
|
+
var endYear = end.getFullYear();
|
|
10729
|
+
while (startYear <= endYear) {
|
|
10730
|
+
var intervalStart = new Date(startYear, 0, 1);
|
|
10731
|
+
var intervalEnd = new Date(startYear + 10, 0, 1);
|
|
10732
|
+
intervals.push({
|
|
10733
|
+
start: intervalStart.getTime(),
|
|
10734
|
+
end: intervalEnd.getTime(),
|
|
10735
|
+
label: "" + startYear + "s"
|
|
10736
|
+
});
|
|
10737
|
+
startYear += 10;
|
|
10738
|
+
}
|
|
10739
|
+
return intervals;
|
|
10740
|
+
},
|
|
10741
|
+
years: function (min, max) {
|
|
10742
|
+
var intervals = [];
|
|
10743
|
+
var start = new Date(min);
|
|
10744
|
+
start.setMonth(0);
|
|
10745
|
+
start.setDate(1);
|
|
10746
|
+
start.setHours(0, 0, 0, 0);
|
|
10747
|
+
var startYear = start.getFullYear();
|
|
10748
|
+
var end = new Date(max);
|
|
10749
|
+
var endYear = end.getFullYear();
|
|
10750
|
+
while (startYear <= endYear) {
|
|
10751
|
+
var intervalStart = new Date(startYear, 0, 1);
|
|
10752
|
+
var intervalEnd = new Date(startYear + 1, 0, 1);
|
|
10753
|
+
intervals.push({
|
|
10754
|
+
start: intervalStart.getTime(),
|
|
10755
|
+
end: intervalEnd.getTime(),
|
|
10756
|
+
label: "" + startYear
|
|
10757
|
+
});
|
|
10758
|
+
startYear++;
|
|
10759
|
+
}
|
|
10760
|
+
return intervals;
|
|
10761
|
+
},
|
|
10762
|
+
months: function (min, max) {
|
|
10763
|
+
var intervals = [];
|
|
10764
|
+
var start = new Date(min);
|
|
10765
|
+
start.setDate(1);
|
|
10766
|
+
start.setHours(0, 0, 0, 0);
|
|
10767
|
+
var startYear = start.getFullYear();
|
|
10768
|
+
var startMonth = start.getMonth();
|
|
10769
|
+
var end = new Date(max);
|
|
10770
|
+
var endYear = end.getFullYear();
|
|
10771
|
+
var endMonth = end.getMonth();
|
|
10772
|
+
while (startYear < endYear || (startYear === endYear && startMonth <= endMonth)) {
|
|
10773
|
+
var intervalStart = new Date(startYear, startMonth, 1);
|
|
10774
|
+
var intervalEnd = new Date(startYear, startMonth + 1, 1);
|
|
10775
|
+
intervals.push({
|
|
10776
|
+
start: intervalStart.getTime(),
|
|
10777
|
+
end: intervalEnd.getTime(),
|
|
10778
|
+
label: intervalStart.toLocaleDateString(undefined, { year: "numeric", month: "short" })
|
|
10779
|
+
});
|
|
10780
|
+
startMonth++;
|
|
10781
|
+
if (startMonth >= 12) {
|
|
10782
|
+
startMonth = 0;
|
|
10783
|
+
startYear++;
|
|
10784
|
+
}
|
|
10785
|
+
}
|
|
10786
|
+
return intervals;
|
|
10787
|
+
},
|
|
10788
|
+
quarters: function (min, max) {
|
|
10789
|
+
var intervals = [];
|
|
10790
|
+
var start = new Date(min);
|
|
10791
|
+
start.setDate(1);
|
|
10792
|
+
start.setHours(0, 0, 0, 0);
|
|
10793
|
+
var startYear = start.getFullYear();
|
|
10794
|
+
var startMonth = start.getMonth();
|
|
10795
|
+
var end = new Date(max);
|
|
10796
|
+
var endYear = end.getFullYear();
|
|
10797
|
+
var endMonth = end.getMonth();
|
|
10798
|
+
while (startYear < endYear || (startYear === endYear && startMonth <= endMonth)) {
|
|
10799
|
+
var intervalStart = new Date(startYear, startMonth, 1);
|
|
10800
|
+
var intervalEnd = new Date(startYear, startMonth + 3, 1);
|
|
10801
|
+
intervals.push({
|
|
10802
|
+
start: intervalStart.getTime(),
|
|
10803
|
+
end: intervalEnd.getTime(),
|
|
10804
|
+
label: getQuarter(intervalStart) + " " + intervalStart.getFullYear().toString()
|
|
10805
|
+
});
|
|
10806
|
+
startMonth += 3;
|
|
10807
|
+
if (startMonth >= 12) {
|
|
10808
|
+
startMonth = startMonth % 12;
|
|
10809
|
+
startYear++;
|
|
10810
|
+
}
|
|
10811
|
+
}
|
|
10812
|
+
return intervals;
|
|
10813
|
+
},
|
|
10814
|
+
days: function (min, max) {
|
|
10815
|
+
var intervals = [];
|
|
10816
|
+
var start = new Date(min);
|
|
10817
|
+
start.setHours(0, 0, 0, 0);
|
|
10818
|
+
var end = new Date(max);
|
|
10819
|
+
end.setHours(0, 0, 0, 0);
|
|
10820
|
+
while (start <= end) {
|
|
10821
|
+
var intervalStart = new Date(start);
|
|
10822
|
+
var intervalEnd = new Date(start);
|
|
10823
|
+
intervalEnd.setDate(intervalEnd.getDate() + 1);
|
|
10824
|
+
intervals.push({
|
|
10825
|
+
start: intervalStart.getTime(),
|
|
10826
|
+
end: intervalEnd.getTime(),
|
|
10827
|
+
label: intervalStart.toLocaleDateString()
|
|
10828
|
+
});
|
|
10829
|
+
start.setDate(start.getDate() + 1);
|
|
10830
|
+
}
|
|
10831
|
+
return intervals;
|
|
10832
|
+
}
|
|
10833
|
+
};
|
|
10172
10834
|
var HistogramModel = /** @class */ (function (_super) {
|
|
10173
10835
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(HistogramModel, _super);
|
|
10174
10836
|
function HistogramModel(question, data, options, name) {
|
|
@@ -10178,6 +10840,14 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10178
10840
|
_this._continuousData = undefined;
|
|
10179
10841
|
_this._cachedIntervals = undefined;
|
|
10180
10842
|
_this._intervalPrecision = 2;
|
|
10843
|
+
_this.showRunningTotalsBtn = undefined;
|
|
10844
|
+
_this.showGroupedBtn = undefined;
|
|
10845
|
+
_this.changeIntervalsModeSelector = undefined;
|
|
10846
|
+
_this.aggregateDataNameSelector = undefined;
|
|
10847
|
+
_this.intervalModes = ["auto", "decades", "years", "quarters", "months", "days"];
|
|
10848
|
+
_this._showRunningTotals = false;
|
|
10849
|
+
_this._showGrouped = false;
|
|
10850
|
+
_this._aggregateDataName = "";
|
|
10181
10851
|
_this._transposeData = false;
|
|
10182
10852
|
if (_this.options.intervalPrecision !== undefined) {
|
|
10183
10853
|
_this._intervalPrecision = _this.options.intervalPrecision;
|
|
@@ -10189,8 +10859,63 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10189
10859
|
else {
|
|
10190
10860
|
_this.valueType = "number";
|
|
10191
10861
|
}
|
|
10862
|
+
_this._intervalsMode = _this.valueType === "date" ? "auto" : "default";
|
|
10863
|
+
if (_this.allowChangeIntervals) {
|
|
10864
|
+
_this.registerToolbarItem("changeIntervalsMode", function () {
|
|
10865
|
+
_this.changeIntervalsModeSelector = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createSelector(_this.intervalModes.map(function (intervalModeValue) {
|
|
10866
|
+
return {
|
|
10867
|
+
value: intervalModeValue,
|
|
10868
|
+
text: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("intervalMode_" + intervalModeValue),
|
|
10869
|
+
};
|
|
10870
|
+
}), function (option) { return _this.intervalsMode === option.value; }, function (e) {
|
|
10871
|
+
_this.intervalsMode = e.target.value;
|
|
10872
|
+
}, _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("intervalModeTitle"));
|
|
10873
|
+
return _this.changeIntervalsModeSelector;
|
|
10874
|
+
});
|
|
10875
|
+
}
|
|
10876
|
+
if (_this.possibleAggregateDataNames.length > 0) {
|
|
10877
|
+
_this.registerToolbarItem("aggregateDataName", function () {
|
|
10878
|
+
var choices = _this.possibleAggregateDataNames.map(function (dataName) {
|
|
10879
|
+
return typeof dataName === "string" ? { value: dataName, text: dataName } : dataName;
|
|
10880
|
+
});
|
|
10881
|
+
choices.unshift({ value: "", text: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("noneAggregateText") }),
|
|
10882
|
+
_this.aggregateDataNameSelector = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createSelector(choices, function (option) { return _this.aggregateDataName === option.value; }, function (e) {
|
|
10883
|
+
_this.aggregateDataName = e.target.value;
|
|
10884
|
+
}, _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("selectAggregateText"));
|
|
10885
|
+
_this.updateAggregateDataNameSelector();
|
|
10886
|
+
return _this.aggregateDataNameSelector;
|
|
10887
|
+
});
|
|
10888
|
+
}
|
|
10889
|
+
if (_this.allowChangeIntervals && _this.options.allowRunningTotals) {
|
|
10890
|
+
_this.registerToolbarItem("showRunningTotals", function () {
|
|
10891
|
+
_this.showRunningTotalsBtn = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createButton(function () {
|
|
10892
|
+
_this.showRunningTotals = !_this.showRunningTotals;
|
|
10893
|
+
});
|
|
10894
|
+
_this.updateShowRunningTotalsBtn();
|
|
10895
|
+
return _this.showRunningTotalsBtn;
|
|
10896
|
+
});
|
|
10897
|
+
}
|
|
10898
|
+
if (_this.allowChangeIntervals && _this.options.allowCompareDatePeriods) {
|
|
10899
|
+
_this.registerToolbarItem("showGrouped", function () {
|
|
10900
|
+
_this.showGroupedBtn = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createButton(function () {
|
|
10901
|
+
_this.showGrouped = !_this.showGrouped;
|
|
10902
|
+
});
|
|
10903
|
+
_this.updateShowGroupedBtn();
|
|
10904
|
+
return _this.showGroupedBtn;
|
|
10905
|
+
});
|
|
10906
|
+
}
|
|
10192
10907
|
return _this;
|
|
10193
10908
|
}
|
|
10909
|
+
HistogramModel.prototype.updateIntervalsModeSelector = function () {
|
|
10910
|
+
if (!!this.changeIntervalsModeSelector) {
|
|
10911
|
+
this.changeIntervalsModeSelector.getElementsByTagName("select")[0].value = this.intervalsMode;
|
|
10912
|
+
}
|
|
10913
|
+
};
|
|
10914
|
+
HistogramModel.prototype.updateAggregateDataNameSelector = function () {
|
|
10915
|
+
if (!!this.aggregateDataNameSelector) {
|
|
10916
|
+
this.aggregateDataNameSelector.getElementsByTagName("select")[0].value = this.aggregateDataName;
|
|
10917
|
+
}
|
|
10918
|
+
};
|
|
10194
10919
|
HistogramModel.prototype.reset = function () {
|
|
10195
10920
|
this._continuousData = undefined;
|
|
10196
10921
|
this._cachedValues = undefined;
|
|
@@ -10232,6 +10957,17 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10232
10957
|
this.reset();
|
|
10233
10958
|
_super.prototype.onDataChanged.call(this);
|
|
10234
10959
|
};
|
|
10960
|
+
HistogramModel.prototype.onSelectionChanged = function (item) {
|
|
10961
|
+
if (item !== undefined && this.onDataItemSelected !== undefined) {
|
|
10962
|
+
if (this.valueType === "date") {
|
|
10963
|
+
var currIntervalCalueIndex = this.intervalModes.indexOf(this.intervalsMode);
|
|
10964
|
+
if (currIntervalCalueIndex > 0 && currIntervalCalueIndex < this.intervalModes.length - 1) {
|
|
10965
|
+
this.intervalsMode = this.intervalModes[currIntervalCalueIndex + 1];
|
|
10966
|
+
}
|
|
10967
|
+
}
|
|
10968
|
+
}
|
|
10969
|
+
_super.prototype.onSelectionChanged.call(this, item);
|
|
10970
|
+
};
|
|
10235
10971
|
HistogramModel.prototype.getContinuousValues = function () {
|
|
10236
10972
|
var _this = this;
|
|
10237
10973
|
if (this._cachedValues === undefined) {
|
|
@@ -10242,20 +10978,26 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10242
10978
|
this._continuousData = {};
|
|
10243
10979
|
series.forEach(function (seriesValue) { return _this._continuousData[seriesValue] = []; });
|
|
10244
10980
|
var hash_1 = {};
|
|
10245
|
-
this.data.forEach(function (
|
|
10246
|
-
var
|
|
10247
|
-
|
|
10248
|
-
var
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10981
|
+
this.data.forEach(function (dataRow) {
|
|
10982
|
+
var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.getNestedDataRows)(dataRow, _this);
|
|
10983
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
10984
|
+
var answerData = nestedDataRow[_this.dataNames[0]];
|
|
10985
|
+
if (answerData !== undefined) {
|
|
10986
|
+
var seriesValue = nestedDataRow[_dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider.seriesMarkerKey] || "";
|
|
10987
|
+
// TODO: _continuousData should be sorted in order to speed-up statistics calculation in the getData function
|
|
10988
|
+
_this._continuousData[seriesValue].push({ continuous: _this.getContinuousValue(answerData), row: nestedDataRow });
|
|
10989
|
+
hash_1[answerData] = answerData;
|
|
10990
|
+
}
|
|
10991
|
+
});
|
|
10253
10992
|
});
|
|
10254
|
-
this._cachedValues = Object.keys(hash_1).map(function (key) { return ({ original: hash_1[key], continuous: _this.getContinuousValue(key) }); });
|
|
10993
|
+
this._cachedValues = Object.keys(hash_1).map(function (key) { return ({ original: hash_1[key], continuous: _this.getContinuousValue(key), row: hash_1[key].row }); });
|
|
10255
10994
|
this._cachedValues.sort(function (a, b) { return a.continuous - b.continuous; });
|
|
10256
10995
|
}
|
|
10257
10996
|
return this._cachedValues;
|
|
10258
10997
|
};
|
|
10998
|
+
HistogramModel.prototype.isSupportSoftUpdateContent = function () {
|
|
10999
|
+
return false;
|
|
11000
|
+
};
|
|
10259
11001
|
HistogramModel.prototype.isSupportMissingAnswers = function () {
|
|
10260
11002
|
return false;
|
|
10261
11003
|
};
|
|
@@ -10312,18 +11054,24 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10312
11054
|
if (continuousValues.length) {
|
|
10313
11055
|
var start = continuousValues[0].continuous;
|
|
10314
11056
|
var end = continuousValues[continuousValues.length - 1].continuous;
|
|
10315
|
-
var
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
var
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
11057
|
+
var intervalsMode = this.intervalsMode === "auto" ? getBestIntervalMode(start, end) : this.intervalsMode;
|
|
11058
|
+
if (intervalCalculators[intervalsMode] !== undefined) {
|
|
11059
|
+
this._cachedIntervals = intervalCalculators[intervalsMode](start, end);
|
|
11060
|
+
}
|
|
11061
|
+
else {
|
|
11062
|
+
var intervalsCount = HistogramModel.IntervalsCount;
|
|
11063
|
+
var delta = (end - start) / intervalsCount;
|
|
11064
|
+
for (var i = 0; i < intervalsCount; ++i) {
|
|
11065
|
+
var next = start + delta;
|
|
11066
|
+
var istart = this.toPrecision(start);
|
|
11067
|
+
var inext = this.toPrecision(next);
|
|
11068
|
+
this._cachedIntervals.push({
|
|
11069
|
+
start: istart,
|
|
11070
|
+
end: i < intervalsCount - 1 ? inext : inext + delta / 100,
|
|
11071
|
+
label: "" + this.getString(istart) + "-" + this.getString(inext)
|
|
11072
|
+
});
|
|
11073
|
+
start = next;
|
|
11074
|
+
}
|
|
10327
11075
|
}
|
|
10328
11076
|
}
|
|
10329
11077
|
}
|
|
@@ -10332,12 +11080,241 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10332
11080
|
enumerable: false,
|
|
10333
11081
|
configurable: true
|
|
10334
11082
|
});
|
|
11083
|
+
Object.defineProperty(HistogramModel.prototype, "intervalsMode", {
|
|
11084
|
+
get: function () {
|
|
11085
|
+
if (this.hasCustomIntervals)
|
|
11086
|
+
return "custom";
|
|
11087
|
+
return this._intervalsMode;
|
|
11088
|
+
},
|
|
11089
|
+
set: function (val) {
|
|
11090
|
+
if (this.allowChangeIntervals && this._intervalsMode !== val) {
|
|
11091
|
+
this._intervalsMode = val;
|
|
11092
|
+
if (!this.canShowGroupedDateSeries) {
|
|
11093
|
+
this._showGrouped = false;
|
|
11094
|
+
}
|
|
11095
|
+
this.updateIntervalsModeSelector();
|
|
11096
|
+
this.updateShowGroupedBtn();
|
|
11097
|
+
this.onDataChanged();
|
|
11098
|
+
}
|
|
11099
|
+
},
|
|
11100
|
+
enumerable: false,
|
|
11101
|
+
configurable: true
|
|
11102
|
+
});
|
|
11103
|
+
Object.defineProperty(HistogramModel.prototype, "allowChangeIntervals", {
|
|
11104
|
+
get: function () {
|
|
11105
|
+
return this.valueType === "date" && !this.hasCustomIntervals && this.options.allowChangeIntervals === true;
|
|
11106
|
+
},
|
|
11107
|
+
enumerable: false,
|
|
11108
|
+
configurable: true
|
|
11109
|
+
});
|
|
11110
|
+
Object.defineProperty(HistogramModel.prototype, "showRunningTotals", {
|
|
11111
|
+
get: function () {
|
|
11112
|
+
return this._showRunningTotals;
|
|
11113
|
+
},
|
|
11114
|
+
set: function (val) {
|
|
11115
|
+
this._showRunningTotals = val;
|
|
11116
|
+
this.updateShowRunningTotalsBtn();
|
|
11117
|
+
this.stateChanged("showRunningTotals", val);
|
|
11118
|
+
this.refreshContent();
|
|
11119
|
+
},
|
|
11120
|
+
enumerable: false,
|
|
11121
|
+
configurable: true
|
|
11122
|
+
});
|
|
11123
|
+
HistogramModel.prototype.updateShowRunningTotalsBtn = function () {
|
|
11124
|
+
if (!!this.showRunningTotalsBtn) {
|
|
11125
|
+
this.showRunningTotalsBtn.innerText = this.showRunningTotals
|
|
11126
|
+
? _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("noRunningTotals")
|
|
11127
|
+
: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("runningTotals");
|
|
11128
|
+
}
|
|
11129
|
+
};
|
|
11130
|
+
Object.defineProperty(HistogramModel.prototype, "showGrouped", {
|
|
11131
|
+
get: function () {
|
|
11132
|
+
return this._showGrouped;
|
|
11133
|
+
},
|
|
11134
|
+
set: function (val) {
|
|
11135
|
+
this._showGrouped = val;
|
|
11136
|
+
this.updateShowGroupedBtn();
|
|
11137
|
+
this.stateChanged("showGrouped", val);
|
|
11138
|
+
this.refreshContent();
|
|
11139
|
+
},
|
|
11140
|
+
enumerable: false,
|
|
11141
|
+
configurable: true
|
|
11142
|
+
});
|
|
11143
|
+
HistogramModel.prototype.updateShowGroupedBtn = function () {
|
|
11144
|
+
if (!!this.showGroupedBtn) {
|
|
11145
|
+
this.showGroupedBtn.innerText = this.showGrouped
|
|
11146
|
+
? _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("ungroupDateSeries")
|
|
11147
|
+
: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("groupDateSeries");
|
|
11148
|
+
this.showGroupedBtn.style.display = this.canShowGroupedDateSeries ? "inline" : "none";
|
|
11149
|
+
}
|
|
11150
|
+
};
|
|
11151
|
+
Object.defineProperty(HistogramModel.prototype, "canShowGroupedDateSeries", {
|
|
11152
|
+
get: function () {
|
|
11153
|
+
return ["years", "quarters", "months"].indexOf(this.intervalsMode) !== -1;
|
|
11154
|
+
},
|
|
11155
|
+
enumerable: false,
|
|
11156
|
+
configurable: true
|
|
11157
|
+
});
|
|
11158
|
+
Object.defineProperty(HistogramModel.prototype, "aggregateDataName", {
|
|
11159
|
+
get: function () {
|
|
11160
|
+
return this._aggregateDataName;
|
|
11161
|
+
},
|
|
11162
|
+
set: function (val) {
|
|
11163
|
+
if (this._aggregateDataName !== val) {
|
|
11164
|
+
this._aggregateDataName = val;
|
|
11165
|
+
this.onDataChanged();
|
|
11166
|
+
}
|
|
11167
|
+
},
|
|
11168
|
+
enumerable: false,
|
|
11169
|
+
configurable: true
|
|
11170
|
+
});
|
|
11171
|
+
Object.defineProperty(HistogramModel.prototype, "possibleAggregateDataNames", {
|
|
11172
|
+
get: function () {
|
|
11173
|
+
var _a, _b;
|
|
11174
|
+
return (_b = (_a = this.questionOptions) === null || _a === void 0 ? void 0 : _a.aggregateDataNames) !== null && _b !== void 0 ? _b : [];
|
|
11175
|
+
},
|
|
11176
|
+
enumerable: false,
|
|
11177
|
+
configurable: true
|
|
11178
|
+
});
|
|
10335
11179
|
HistogramModel.prototype.convertFromExternalData = function (externalCalculatedData) {
|
|
10336
11180
|
return [externalCalculatedData];
|
|
10337
11181
|
};
|
|
10338
11182
|
HistogramModel.prototype.getCalculatedValuesCore = function () {
|
|
10339
11183
|
var continuousValues = this.getContinuousValues();
|
|
10340
|
-
return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.histogramStatisticsCalculator)(this._continuousData, this.intervals, this.
|
|
11184
|
+
return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.histogramStatisticsCalculator)(this._continuousData, this.intervals, this, [this.aggregateDataName].filter(function (name) { return !!name; }));
|
|
11185
|
+
};
|
|
11186
|
+
HistogramModel.prototype.getCalculatedValues = function () {
|
|
11187
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11188
|
+
var values, result, i, j;
|
|
11189
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11190
|
+
switch (_a.label) {
|
|
11191
|
+
case 0: return [4 /*yield*/, _super.prototype.getCalculatedValues.call(this)];
|
|
11192
|
+
case 1:
|
|
11193
|
+
values = _a.sent();
|
|
11194
|
+
result = JSON.parse(JSON.stringify(values));
|
|
11195
|
+
if (this.showRunningTotals) {
|
|
11196
|
+
for (i = 0; i < result.length; i++) {
|
|
11197
|
+
for (j = 1; j < result[i].length; j++) {
|
|
11198
|
+
result[i][j] += result[i][j - 1];
|
|
11199
|
+
}
|
|
11200
|
+
}
|
|
11201
|
+
}
|
|
11202
|
+
return [2 /*return*/, result];
|
|
11203
|
+
}
|
|
11204
|
+
});
|
|
11205
|
+
});
|
|
11206
|
+
};
|
|
11207
|
+
HistogramModel.prototype.getGroupedDateAnswersData = function () {
|
|
11208
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11209
|
+
var datasets, colors, labels, seriesLabels, intervals, start, end, startYear, endYear, groupedDatasets, year, i, interval, intervalDate, decade, yearInDecade, decadeIndex, groupedDatasets, year, i, interval, intervalDate, quarter, year, yearIndex, groupedDatasets, year, i, interval, intervalDate, month, year, yearIndex, texts;
|
|
11210
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11211
|
+
switch (_a.label) {
|
|
11212
|
+
case 0: return [4 /*yield*/, this.getCalculatedValues()];
|
|
11213
|
+
case 1:
|
|
11214
|
+
datasets = (_a.sent());
|
|
11215
|
+
colors = this.getColors();
|
|
11216
|
+
labels = this.getLabels();
|
|
11217
|
+
seriesLabels = this.getSeriesLabels();
|
|
11218
|
+
intervals = [].concat(this.intervals);
|
|
11219
|
+
start = new Date(intervals[0].start);
|
|
11220
|
+
end = new Date(intervals[intervals.length - 1].end);
|
|
11221
|
+
startYear = start.getFullYear();
|
|
11222
|
+
endYear = end.getFullYear();
|
|
11223
|
+
if (this.intervalsMode === "years") {
|
|
11224
|
+
seriesLabels = [];
|
|
11225
|
+
groupedDatasets = [];
|
|
11226
|
+
for (year = Math.floor(startYear / 10) * 10; year <= endYear; year += 10) {
|
|
11227
|
+
seriesLabels.push(year.toString() + "s");
|
|
11228
|
+
groupedDatasets.push(new Array(10).fill(0));
|
|
11229
|
+
}
|
|
11230
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11231
|
+
interval = intervals[i];
|
|
11232
|
+
intervalDate = new Date(interval.start);
|
|
11233
|
+
decade = Math.floor(intervalDate.getFullYear() / 10) * 10;
|
|
11234
|
+
yearInDecade = intervalDate.getFullYear() - decade;
|
|
11235
|
+
decadeIndex = Math.floor((decade - Math.floor(startYear / 10) * 10) / 10);
|
|
11236
|
+
groupedDatasets[decadeIndex][yearInDecade] = datasets[0][i];
|
|
11237
|
+
}
|
|
11238
|
+
datasets = groupedDatasets;
|
|
11239
|
+
labels = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
11240
|
+
}
|
|
11241
|
+
else if (this.intervalsMode === "quarters") {
|
|
11242
|
+
seriesLabels = [];
|
|
11243
|
+
groupedDatasets = [];
|
|
11244
|
+
for (year = startYear; year <= endYear; year++) {
|
|
11245
|
+
seriesLabels.push(year.toString());
|
|
11246
|
+
groupedDatasets.push(new Array(4).fill(0));
|
|
11247
|
+
}
|
|
11248
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11249
|
+
interval = intervals[i];
|
|
11250
|
+
intervalDate = new Date(interval.start);
|
|
11251
|
+
quarter = Math.floor(intervalDate.getMonth() / 3);
|
|
11252
|
+
year = intervalDate.getFullYear();
|
|
11253
|
+
yearIndex = year - startYear;
|
|
11254
|
+
groupedDatasets[yearIndex][quarter] = datasets[0][i];
|
|
11255
|
+
}
|
|
11256
|
+
datasets = groupedDatasets;
|
|
11257
|
+
labels = ["I", "II", "III", "IV"];
|
|
11258
|
+
}
|
|
11259
|
+
else if (this.intervalsMode === "months") {
|
|
11260
|
+
seriesLabels = [];
|
|
11261
|
+
groupedDatasets = [];
|
|
11262
|
+
for (year = startYear; year <= endYear; year++) {
|
|
11263
|
+
seriesLabels.push(year.toString());
|
|
11264
|
+
groupedDatasets.push(new Array(12).fill(0));
|
|
11265
|
+
}
|
|
11266
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11267
|
+
interval = intervals[i];
|
|
11268
|
+
intervalDate = new Date(interval.start);
|
|
11269
|
+
month = intervalDate.getMonth();
|
|
11270
|
+
year = intervalDate.getFullYear();
|
|
11271
|
+
yearIndex = year - startYear;
|
|
11272
|
+
groupedDatasets[yearIndex][month] = datasets[0][i];
|
|
11273
|
+
}
|
|
11274
|
+
datasets = groupedDatasets;
|
|
11275
|
+
labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
11276
|
+
}
|
|
11277
|
+
texts = datasets;
|
|
11278
|
+
return [2 /*return*/, {
|
|
11279
|
+
datasets: datasets,
|
|
11280
|
+
labels: labels,
|
|
11281
|
+
colors: colors,
|
|
11282
|
+
texts: texts,
|
|
11283
|
+
seriesLabels: seriesLabels,
|
|
11284
|
+
}];
|
|
11285
|
+
}
|
|
11286
|
+
});
|
|
11287
|
+
});
|
|
11288
|
+
};
|
|
11289
|
+
/**
|
|
11290
|
+
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
11291
|
+
*/
|
|
11292
|
+
HistogramModel.prototype.getAnswersData = function () {
|
|
11293
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11294
|
+
var answersData, continuousValues, start, end, intervalsMode;
|
|
11295
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11296
|
+
switch (_a.label) {
|
|
11297
|
+
case 0:
|
|
11298
|
+
if (!this.showGrouped) {
|
|
11299
|
+
return [2 /*return*/, _super.prototype.getAnswersData.call(this)];
|
|
11300
|
+
}
|
|
11301
|
+
return [4 /*yield*/, this.getGroupedDateAnswersData()];
|
|
11302
|
+
case 1:
|
|
11303
|
+
answersData = _a.sent();
|
|
11304
|
+
continuousValues = this.getContinuousValues();
|
|
11305
|
+
if (continuousValues.length) {
|
|
11306
|
+
start = continuousValues[0].continuous;
|
|
11307
|
+
end = continuousValues[continuousValues.length - 1].continuous;
|
|
11308
|
+
intervalsMode = this.intervalsMode === "auto" ? getBestIntervalMode(start, end) : this.intervalsMode;
|
|
11309
|
+
if (intervalsMode === "years" && this.showGrouped) {
|
|
11310
|
+
answersData.labelsTitle = _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("groupedYearsAxisTitle");
|
|
11311
|
+
}
|
|
11312
|
+
}
|
|
11313
|
+
this.onAnswersDataReady.fire(this, answersData);
|
|
11314
|
+
return [2 /*return*/, answersData];
|
|
11315
|
+
}
|
|
11316
|
+
});
|
|
11317
|
+
});
|
|
10341
11318
|
};
|
|
10342
11319
|
HistogramModel.prototype.getValueType = function () {
|
|
10343
11320
|
return this.valueType;
|
|
@@ -10890,6 +11867,7 @@ var MatrixDropdownGrouped = /** @class */ (function (_super) {
|
|
|
10890
11867
|
var statistics = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_2__.defaultStatisticsCalculator)(this.surveyData, {
|
|
10891
11868
|
name: this.name,
|
|
10892
11869
|
dataNames: series,
|
|
11870
|
+
dataPath: this.dataPath,
|
|
10893
11871
|
getValues: function () { return values; },
|
|
10894
11872
|
getLabels: function () { return values; },
|
|
10895
11873
|
getSeriesValues: function () { return rows; },
|
|
@@ -11238,7 +12216,7 @@ var NumberModel = /** @class */ (function (_super) {
|
|
|
11238
12216
|
if (this._resultAverage === undefined ||
|
|
11239
12217
|
this._resultMin === undefined ||
|
|
11240
12218
|
this._resultMax === undefined) {
|
|
11241
|
-
_a = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.mathStatisticsCalculator)(this.surveyData, this
|
|
12219
|
+
_a = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.mathStatisticsCalculator)(this.surveyData, this), this._resultAverage = _a[0], this._resultMin = _a[1], this._resultMax = _a[2];
|
|
11242
12220
|
}
|
|
11243
12221
|
return [this._resultAverage, this._resultMin, this._resultMax];
|
|
11244
12222
|
};
|
|
@@ -12203,7 +13181,7 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12203
13181
|
var lineHeight = 30;
|
|
12204
13182
|
var topMargin = 30;
|
|
12205
13183
|
var bottomMargin = 30;
|
|
12206
|
-
var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels;
|
|
13184
|
+
var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels, labelsTitle = answersData.labelsTitle, valuesTitle = answersData.valuesTitle;
|
|
12207
13185
|
var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
|
|
12208
13186
|
var traces = [];
|
|
12209
13187
|
var traceConfig = {
|
|
@@ -12281,6 +13259,12 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12281
13259
|
}),
|
|
12282
13260
|
},
|
|
12283
13261
|
};
|
|
13262
|
+
if (labelsTitle) {
|
|
13263
|
+
layout.yaxis.title = { text: labelsTitle };
|
|
13264
|
+
}
|
|
13265
|
+
if (valuesTitle) {
|
|
13266
|
+
layout.xaxis.title = { text: valuesTitle };
|
|
13267
|
+
}
|
|
12284
13268
|
if (hasSeries && model.chartType !== "stackedbar") {
|
|
12285
13269
|
layout.height =
|
|
12286
13270
|
(labels.length * seriesLabels.length + 1) * lineHeight +
|
|
@@ -12302,7 +13286,7 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12302
13286
|
PlotlySetup.setupVBar = function (model, answersData) {
|
|
12303
13287
|
var topMargin = 30;
|
|
12304
13288
|
var bottomMargin = 30;
|
|
12305
|
-
var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels;
|
|
13289
|
+
var datasets = answersData.datasets, labels = answersData.labels, colors = answersData.colors, texts = answersData.texts, seriesLabels = answersData.seriesLabels, labelsTitle = answersData.labelsTitle, valuesTitle = answersData.valuesTitle;
|
|
12306
13290
|
var hasSeries = seriesLabels.length > 1 || model.question.getType() === "matrix";
|
|
12307
13291
|
if (model.type !== "histogram" && model.type !== "pivot") {
|
|
12308
13292
|
labels = [].concat(labels).reverse();
|
|
@@ -12328,7 +13312,7 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12328
13312
|
orientation: "v",
|
|
12329
13313
|
textposition: "none",
|
|
12330
13314
|
};
|
|
12331
|
-
if (
|
|
13315
|
+
if (!hasSeries) {
|
|
12332
13316
|
traceConfig.width = 0.5;
|
|
12333
13317
|
traceConfig.bargap = 0.5;
|
|
12334
13318
|
traceConfig.mode = "markers",
|
|
@@ -12351,6 +13335,8 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12351
13335
|
}
|
|
12352
13336
|
traces.push(trace);
|
|
12353
13337
|
});
|
|
13338
|
+
var maxTicks = 50;
|
|
13339
|
+
var tickStep = Math.ceil(labels.length / maxTicks);
|
|
12354
13340
|
var layout = {
|
|
12355
13341
|
font: {
|
|
12356
13342
|
family: "Segoe UI, sans-serif",
|
|
@@ -12377,11 +13363,20 @@ var PlotlySetup = /** @class */ (function () {
|
|
|
12377
13363
|
type: "category",
|
|
12378
13364
|
tickmode: "array",
|
|
12379
13365
|
tickvals: labels,
|
|
12380
|
-
ticktext: labels.map(function (label) {
|
|
12381
|
-
|
|
13366
|
+
ticktext: labels.map(function (label, index) {
|
|
13367
|
+
if (labels.length > maxTicks && index % tickStep !== 0) {
|
|
13368
|
+
return "";
|
|
13369
|
+
}
|
|
13370
|
+
return PlotlySetup.getTruncatedLabel(label, model.labelTruncateLength);
|
|
12382
13371
|
}),
|
|
12383
13372
|
},
|
|
12384
13373
|
};
|
|
13374
|
+
if (labelsTitle) {
|
|
13375
|
+
layout.xaxis.title = { text: labelsTitle };
|
|
13376
|
+
}
|
|
13377
|
+
if (valuesTitle) {
|
|
13378
|
+
layout.yaxis.title = { text: valuesTitle };
|
|
13379
|
+
}
|
|
12385
13380
|
if (model.showPercentages && model.showOnlyPercentages) {
|
|
12386
13381
|
layout.yaxis = {
|
|
12387
13382
|
automargin: true,
|
|
@@ -13034,14 +14029,17 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
13034
14029
|
return selBase.choices.filter(function (choice) { return choice.text === itemText; })[0];
|
|
13035
14030
|
}
|
|
13036
14031
|
};
|
|
13037
|
-
SelectBase.prototype.
|
|
14032
|
+
SelectBase.prototype.onSelectionChanged = function (item) {
|
|
13038
14033
|
var _a;
|
|
14034
|
+
if (this.onDataItemSelected !== undefined) {
|
|
14035
|
+
this.onDataItemSelected(item !== undefined ? item.value : undefined, item !== undefined ? item.text : "");
|
|
14036
|
+
}
|
|
14037
|
+
this.stateChanged("filter", (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value);
|
|
14038
|
+
};
|
|
14039
|
+
SelectBase.prototype.setSelection = function (item) {
|
|
13039
14040
|
if (this.selectedItem !== item) {
|
|
13040
14041
|
this.selectedItem = item;
|
|
13041
|
-
|
|
13042
|
-
this.onDataItemSelected(item !== undefined ? item.value : undefined, item !== undefined ? item.text : "");
|
|
13043
|
-
}
|
|
13044
|
-
this.stateChanged("filter", (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value);
|
|
14042
|
+
this.onSelectionChanged(item);
|
|
13045
14043
|
}
|
|
13046
14044
|
};
|
|
13047
14045
|
Object.defineProperty(SelectBase.prototype, "selection", {
|
|
@@ -13266,22 +14264,6 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
13266
14264
|
}
|
|
13267
14265
|
return percentages;
|
|
13268
14266
|
};
|
|
13269
|
-
SelectBase.prototype.answersDataReady = function (answersData) {
|
|
13270
|
-
var result = {};
|
|
13271
|
-
if (this.hideEmptyAnswers) {
|
|
13272
|
-
result = hideEmptyAnswersInData(answersData);
|
|
13273
|
-
}
|
|
13274
|
-
else {
|
|
13275
|
-
result = answersData;
|
|
13276
|
-
}
|
|
13277
|
-
if (this.topN > 0) {
|
|
13278
|
-
result.datasets[0] = result.datasets[0].slice(-this.topN);
|
|
13279
|
-
result.labels = result.labels.slice(-this.topN);
|
|
13280
|
-
result.colors = result.colors.slice(-this.topN);
|
|
13281
|
-
result.texts[0] = result.texts[0].slice(-this.topN);
|
|
13282
|
-
}
|
|
13283
|
-
return result;
|
|
13284
|
-
};
|
|
13285
14267
|
/**
|
|
13286
14268
|
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
13287
14269
|
*/
|
|
@@ -13323,7 +14305,15 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
13323
14305
|
texts: texts,
|
|
13324
14306
|
seriesLabels: seriesLabels,
|
|
13325
14307
|
};
|
|
13326
|
-
|
|
14308
|
+
if (this.hideEmptyAnswers) {
|
|
14309
|
+
answersData = hideEmptyAnswersInData(answersData);
|
|
14310
|
+
}
|
|
14311
|
+
if (this.topN > 0) {
|
|
14312
|
+
answersData.datasets[0] = answersData.datasets[0].slice(-this.topN);
|
|
14313
|
+
answersData.labels = answersData.labels.slice(-this.topN);
|
|
14314
|
+
answersData.colors = answersData.colors.slice(-this.topN);
|
|
14315
|
+
answersData.texts[0] = answersData.texts[0].slice(-this.topN);
|
|
14316
|
+
}
|
|
13327
14317
|
this.onAnswersDataReady.fire(this, answersData);
|
|
13328
14318
|
return [2 /*return*/, answersData];
|
|
13329
14319
|
}
|
|
@@ -13426,6 +14416,7 @@ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.register
|
|
|
13426
14416
|
__webpack_require__.r(__webpack_exports__);
|
|
13427
14417
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13428
14418
|
/* harmony export */ defaultStatisticsCalculator: () => (/* binding */ defaultStatisticsCalculator),
|
|
14419
|
+
/* harmony export */ getNestedDataRows: () => (/* binding */ getNestedDataRows),
|
|
13429
14420
|
/* harmony export */ histogramStatisticsCalculator: () => (/* binding */ histogramStatisticsCalculator),
|
|
13430
14421
|
/* harmony export */ mathStatisticsCalculator: () => (/* binding */ mathStatisticsCalculator)
|
|
13431
14422
|
/* harmony export */ });
|
|
@@ -13458,51 +14449,59 @@ function defaultStatisticsCalculator(data, dataInfo) {
|
|
|
13458
14449
|
return valuesIndex[val.value];
|
|
13459
14450
|
return valuesIndex[val];
|
|
13460
14451
|
};
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
});
|
|
13475
|
-
}
|
|
13476
|
-
else {
|
|
13477
|
-
// Series are the keys in question value (matrix question)
|
|
13478
|
-
// TODO: think about the de-normalization and combine with the previous case
|
|
13479
|
-
rowValues.forEach(function (val) {
|
|
13480
|
-
series.forEach(function (seriesName) {
|
|
13481
|
-
if (val[seriesName] !== undefined) {
|
|
13482
|
-
var seriesNo_2 = seriesIndex[seriesName] || 0;
|
|
13483
|
-
var values_1 = Array.isArray(val[seriesName]) ? val[seriesName] : [val[seriesName]];
|
|
13484
|
-
values_1.forEach(function (value) {
|
|
13485
|
-
var valIndex = getValueIndex(value);
|
|
13486
|
-
statistics[index][seriesNo_2][valIndex]++;
|
|
13487
|
-
});
|
|
13488
|
-
}
|
|
13489
|
-
});
|
|
13490
|
-
});
|
|
13491
|
-
}
|
|
14452
|
+
var processDataRow = function (dataRow, dataName, index) {
|
|
14453
|
+
var rowValue = dataRow[dataName];
|
|
14454
|
+
if (rowValue !== undefined || processMissingAnswers) {
|
|
14455
|
+
var rowValues = Array.isArray(rowValue) ? rowValue : [rowValue];
|
|
14456
|
+
if (series.length > 0) {
|
|
14457
|
+
var rowName = dataRow[_dataProvider__WEBPACK_IMPORTED_MODULE_0__.DataProvider.seriesMarkerKey];
|
|
14458
|
+
if (rowName !== undefined) {
|
|
14459
|
+
// Series are labelled by seriesMarkerKey in row data
|
|
14460
|
+
var seriesNo_1 = seriesIndex[rowName] || 0;
|
|
14461
|
+
rowValues.forEach(function (val) {
|
|
14462
|
+
var valIndex = getValueIndex(val);
|
|
14463
|
+
statistics[index][seriesNo_1][valIndex]++;
|
|
14464
|
+
});
|
|
13492
14465
|
}
|
|
13493
14466
|
else {
|
|
13494
|
-
//
|
|
14467
|
+
// Series are the keys in question value (matrix question)
|
|
14468
|
+
// TODO: think about the de-normalization and combine with the previous case
|
|
13495
14469
|
rowValues.forEach(function (val) {
|
|
13496
|
-
|
|
13497
|
-
|
|
14470
|
+
series.forEach(function (seriesName) {
|
|
14471
|
+
if (val[seriesName] !== undefined) {
|
|
14472
|
+
var seriesNo_2 = seriesIndex[seriesName] || 0;
|
|
14473
|
+
var values_1 = Array.isArray(val[seriesName]) ? val[seriesName] : [val[seriesName]];
|
|
14474
|
+
values_1.forEach(function (value) {
|
|
14475
|
+
var valIndex = getValueIndex(value);
|
|
14476
|
+
statistics[index][seriesNo_2][valIndex]++;
|
|
14477
|
+
});
|
|
14478
|
+
}
|
|
14479
|
+
});
|
|
13498
14480
|
});
|
|
13499
14481
|
}
|
|
13500
14482
|
}
|
|
14483
|
+
else {
|
|
14484
|
+
// No series
|
|
14485
|
+
rowValues.forEach(function (val) {
|
|
14486
|
+
var valIndex = getValueIndex(val);
|
|
14487
|
+
statistics[0][0][valIndex]++;
|
|
14488
|
+
});
|
|
14489
|
+
}
|
|
14490
|
+
}
|
|
14491
|
+
};
|
|
14492
|
+
data.forEach(function (dataRow) {
|
|
14493
|
+
var nestedDataRows = getNestedDataRows(dataRow, dataInfo);
|
|
14494
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
14495
|
+
dataNames.forEach(function (dataName, index) {
|
|
14496
|
+
processDataRow(nestedDataRow, dataName, index);
|
|
14497
|
+
});
|
|
13501
14498
|
});
|
|
13502
14499
|
});
|
|
13503
14500
|
return dataInfo.dataNames.length > 1 ? statistics : statistics[0];
|
|
13504
14501
|
}
|
|
13505
|
-
function histogramStatisticsCalculator(data, intervals,
|
|
14502
|
+
function histogramStatisticsCalculator(data, intervals, dataInfo, aggregateDataNames) {
|
|
14503
|
+
if (aggregateDataNames === void 0) { aggregateDataNames = []; }
|
|
14504
|
+
var seriesValues = dataInfo.getSeriesValues();
|
|
13506
14505
|
var statistics = [];
|
|
13507
14506
|
if (seriesValues.length === 0) {
|
|
13508
14507
|
seriesValues.push("");
|
|
@@ -13510,31 +14509,51 @@ function histogramStatisticsCalculator(data, intervals, seriesValues) {
|
|
|
13510
14509
|
for (var i = 0; i < seriesValues.length; ++i) {
|
|
13511
14510
|
statistics.push(intervals.map(function (i) { return 0; }));
|
|
13512
14511
|
data[seriesValues[i]].forEach(function (dataValue) {
|
|
14512
|
+
var _loop_1 = function (j) {
|
|
14513
|
+
if (intervals[j].start <= dataValue.continuous && (dataValue.continuous < intervals[j].end || j == intervals.length - 1)) {
|
|
14514
|
+
if (aggregateDataNames.length > 0) {
|
|
14515
|
+
aggregateDataNames.forEach(function (aggregateDataName) {
|
|
14516
|
+
var aggregateDataValue = dataValue.row[aggregateDataName];
|
|
14517
|
+
var numberValue = parseFloat(aggregateDataValue);
|
|
14518
|
+
if (aggregateDataValue !== undefined && !isNaN(numberValue)) {
|
|
14519
|
+
statistics[i][j] += numberValue;
|
|
14520
|
+
}
|
|
14521
|
+
});
|
|
14522
|
+
}
|
|
14523
|
+
else {
|
|
14524
|
+
statistics[i][j]++;
|
|
14525
|
+
}
|
|
14526
|
+
return "break";
|
|
14527
|
+
}
|
|
14528
|
+
};
|
|
13513
14529
|
for (var j = 0; j < intervals.length; ++j) {
|
|
13514
|
-
|
|
13515
|
-
|
|
14530
|
+
var state_1 = _loop_1(j);
|
|
14531
|
+
if (state_1 === "break")
|
|
13516
14532
|
break;
|
|
13517
|
-
}
|
|
13518
14533
|
}
|
|
13519
14534
|
});
|
|
13520
14535
|
}
|
|
13521
14536
|
return statistics;
|
|
13522
14537
|
}
|
|
13523
|
-
function mathStatisticsCalculator(data,
|
|
14538
|
+
function mathStatisticsCalculator(data, dataInfo) {
|
|
13524
14539
|
var resultMin = Number.MAX_VALUE, resultMax = -Number.MAX_VALUE, resultAverage = 0;
|
|
13525
14540
|
var actualAnswerCount = 0;
|
|
13526
|
-
data.forEach(function (
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
14541
|
+
data.forEach(function (dataRow) {
|
|
14542
|
+
var nestedDataRows = getNestedDataRows(dataRow, dataInfo);
|
|
14543
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
14544
|
+
var answerData = nestedDataRow[dataInfo.dataNames[0]];
|
|
14545
|
+
if (answerData !== undefined) {
|
|
14546
|
+
var questionValue = +answerData;
|
|
14547
|
+
actualAnswerCount++;
|
|
14548
|
+
resultAverage += questionValue;
|
|
14549
|
+
if (resultMin > questionValue) {
|
|
14550
|
+
resultMin = questionValue;
|
|
14551
|
+
}
|
|
14552
|
+
if (resultMax < questionValue) {
|
|
14553
|
+
resultMax = questionValue;
|
|
14554
|
+
}
|
|
13536
14555
|
}
|
|
13537
|
-
}
|
|
14556
|
+
});
|
|
13538
14557
|
});
|
|
13539
14558
|
if (actualAnswerCount > 0) {
|
|
13540
14559
|
resultAverage = resultAverage / actualAnswerCount;
|
|
@@ -13542,6 +14561,25 @@ function mathStatisticsCalculator(data, dataName) {
|
|
|
13542
14561
|
resultAverage = Math.ceil(resultAverage * 100) / 100;
|
|
13543
14562
|
return [resultAverage, resultMin, resultMax];
|
|
13544
14563
|
}
|
|
14564
|
+
function getNestedDataRows(dataRow, dataInfo) {
|
|
14565
|
+
var nestedDataRows = [];
|
|
14566
|
+
if (!dataInfo.dataPath) {
|
|
14567
|
+
nestedDataRows = [dataRow];
|
|
14568
|
+
}
|
|
14569
|
+
else {
|
|
14570
|
+
if (dataRow[dataInfo.dataPath] === undefined)
|
|
14571
|
+
return [];
|
|
14572
|
+
if (typeof dataRow[dataInfo.dataPath] !== "object")
|
|
14573
|
+
return [];
|
|
14574
|
+
if (Array.isArray(dataRow[dataInfo.dataPath])) {
|
|
14575
|
+
nestedDataRows = dataRow[dataInfo.dataPath];
|
|
14576
|
+
}
|
|
14577
|
+
else {
|
|
14578
|
+
nestedDataRows = [dataRow[dataInfo.dataPath]];
|
|
14579
|
+
}
|
|
14580
|
+
}
|
|
14581
|
+
return nestedDataRows;
|
|
14582
|
+
}
|
|
13545
14583
|
|
|
13546
14584
|
|
|
13547
14585
|
/***/ }),
|
|
@@ -14562,8 +15600,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14562
15600
|
/* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
|
|
14563
15601
|
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
14564
15602
|
/* harmony import */ var _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationPanel */ "./src/visualizationPanel.ts");
|
|
14565
|
-
/* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
|
|
14566
|
-
|
|
14567
15603
|
|
|
14568
15604
|
|
|
14569
15605
|
|
|
@@ -14584,28 +15620,29 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
14584
15620
|
function VisualizationMatrixDropdown(question, data, options, name) {
|
|
14585
15621
|
if (options === void 0) { options = {}; }
|
|
14586
15622
|
var _this = _super.call(this, question, data, options, name || "matrixDropdown") || this;
|
|
14587
|
-
_this.
|
|
15623
|
+
_this._contentVisualizer = undefined;
|
|
14588
15624
|
_this.onPanelAfterRenderCallback = function () {
|
|
14589
15625
|
_this.afterRender(_this.contentContainer);
|
|
14590
15626
|
};
|
|
14591
15627
|
_this.loadingData = false;
|
|
14592
15628
|
_this._childOptions = Object.assign({}, options);
|
|
14593
15629
|
_this._childOptions.disableLocaleSwitch = true;
|
|
14594
|
-
_this._childOptions.dataProvider = undefined;
|
|
14595
15630
|
_this._childOptions.allowDynamicLayout = false;
|
|
14596
15631
|
_this._childOptions.transposeData = true;
|
|
15632
|
+
_this._childOptions.dataProvider = _this.dataProvider;
|
|
15633
|
+
_this._childOptions.dataPath = _this.dataNames[0];
|
|
14597
15634
|
_this._childOptions.seriesValues = question.rows.map(function (row) { return row.value; });
|
|
14598
15635
|
_this._childOptions.seriesLabels = question.rows.map(function (row) { return row.text; });
|
|
15636
|
+
_this.dataProvider.fixDropdownData(_this.dataNames);
|
|
14599
15637
|
if (_this.canGroupColumns) {
|
|
14600
15638
|
var creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.getVisualizersByType("matrixdropdown-grouped");
|
|
14601
|
-
_this.
|
|
15639
|
+
_this._contentVisualizer = new creators[0](_this.question, [], _this._childOptions);
|
|
14602
15640
|
}
|
|
14603
15641
|
else {
|
|
14604
15642
|
var innerQuestions = _this.getQuestions();
|
|
14605
|
-
_this.
|
|
15643
|
+
_this._contentVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions, undefined, false);
|
|
14606
15644
|
}
|
|
14607
|
-
_this.
|
|
14608
|
-
_this.updateData(data);
|
|
15645
|
+
_this._contentVisualizer.onAfterRender.add(_this.onPanelAfterRenderCallback);
|
|
14609
15646
|
return _this;
|
|
14610
15647
|
}
|
|
14611
15648
|
Object.defineProperty(VisualizationMatrixDropdown.prototype, "canGroupColumns", {
|
|
@@ -14623,37 +15660,18 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
14623
15660
|
VisualizationMatrixDropdown.prototype.setLocale = function (newLocale) {
|
|
14624
15661
|
_super.prototype.setLocale.call(this, newLocale);
|
|
14625
15662
|
this._childOptions.seriesLabels = this.question.rows.map(function (row) { return row.text; });
|
|
14626
|
-
this.
|
|
15663
|
+
this._contentVisualizer.locale = newLocale;
|
|
14627
15664
|
};
|
|
14628
|
-
Object.defineProperty(VisualizationMatrixDropdown.prototype, "
|
|
15665
|
+
Object.defineProperty(VisualizationMatrixDropdown.prototype, "contentVisualizer", {
|
|
14629
15666
|
get: function () {
|
|
14630
|
-
return this.
|
|
15667
|
+
return this._contentVisualizer;
|
|
14631
15668
|
},
|
|
14632
15669
|
enumerable: false,
|
|
14633
15670
|
configurable: true
|
|
14634
15671
|
});
|
|
14635
|
-
VisualizationMatrixDropdown.prototype.updateDropdownVisualizerData = function () {
|
|
14636
|
-
var _this = this;
|
|
14637
|
-
var panelData = [];
|
|
14638
|
-
this.data.forEach(function (dataItem) {
|
|
14639
|
-
var rawDataItem = dataItem[_this.question.name];
|
|
14640
|
-
if (!!rawDataItem) {
|
|
14641
|
-
Object.keys(rawDataItem).forEach(function (key) {
|
|
14642
|
-
var nestedDataItem = Object.assign({}, rawDataItem[key]);
|
|
14643
|
-
nestedDataItem[_dataProvider__WEBPACK_IMPORTED_MODULE_4__.DataProvider.seriesMarkerKey] = key;
|
|
14644
|
-
panelData.push(nestedDataItem);
|
|
14645
|
-
});
|
|
14646
|
-
}
|
|
14647
|
-
});
|
|
14648
|
-
this._matrixDropdownVisualizer.updateData(panelData);
|
|
14649
|
-
};
|
|
14650
15672
|
VisualizationMatrixDropdown.prototype.updateData = function (data) {
|
|
14651
15673
|
_super.prototype.updateData.call(this, data);
|
|
14652
|
-
this.
|
|
14653
|
-
};
|
|
14654
|
-
VisualizationMatrixDropdown.prototype.onDataChanged = function () {
|
|
14655
|
-
this.updateDropdownVisualizerData();
|
|
14656
|
-
_super.prototype.onDataChanged.call(this);
|
|
15674
|
+
this.dataProvider.fixDropdownData(this.dataNames);
|
|
14657
15675
|
};
|
|
14658
15676
|
VisualizationMatrixDropdown.prototype.getQuestions = function () {
|
|
14659
15677
|
var matrixdropdown = this.question;
|
|
@@ -14666,15 +15684,15 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
14666
15684
|
});
|
|
14667
15685
|
};
|
|
14668
15686
|
VisualizationMatrixDropdown.prototype.destroyContent = function (container) {
|
|
14669
|
-
this.
|
|
15687
|
+
this._contentVisualizer.clear();
|
|
14670
15688
|
_super.prototype.destroyContent.call(this, this.contentContainer);
|
|
14671
15689
|
};
|
|
14672
15690
|
VisualizationMatrixDropdown.prototype.renderContent = function (container) {
|
|
14673
|
-
this.
|
|
15691
|
+
this._contentVisualizer.render(container);
|
|
14674
15692
|
};
|
|
14675
15693
|
VisualizationMatrixDropdown.prototype.destroy = function () {
|
|
14676
15694
|
_super.prototype.destroy.call(this);
|
|
14677
|
-
this.
|
|
15695
|
+
this._contentVisualizer.onAfterRender.remove(this.onPanelAfterRenderCallback);
|
|
14678
15696
|
};
|
|
14679
15697
|
return VisualizationMatrixDropdown;
|
|
14680
15698
|
}(_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase));
|
|
@@ -14755,9 +15773,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14755
15773
|
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
|
|
14756
15774
|
/* harmony import */ var _filterInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filterInfo */ "./src/filterInfo.ts");
|
|
14757
15775
|
/* harmony import */ var _layoutEngine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layoutEngine */ "./src/layoutEngine.ts");
|
|
14758
|
-
/* harmony import */ var
|
|
14759
|
-
/* harmony import */ var
|
|
14760
|
-
/* harmony import */ var
|
|
15776
|
+
/* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
|
|
15777
|
+
/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.ts");
|
|
15778
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
15779
|
+
/* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
|
|
15780
|
+
/* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
|
|
15781
|
+
|
|
15782
|
+
|
|
14761
15783
|
|
|
14762
15784
|
|
|
14763
15785
|
|
|
@@ -14776,7 +15798,7 @@ var questionLayoutedElementClassName = "sa-question-layouted";
|
|
|
14776
15798
|
if (!!document) {
|
|
14777
15799
|
var templateHolder = document.createElement("div");
|
|
14778
15800
|
templateHolder.style.display = "none";
|
|
14779
|
-
templateHolder.innerHTML =
|
|
15801
|
+
templateHolder.innerHTML = _svgbundle__WEBPACK_IMPORTED_MODULE_10__.svgTemplate;
|
|
14780
15802
|
document.head.appendChild(templateHolder);
|
|
14781
15803
|
}
|
|
14782
15804
|
/**
|
|
@@ -14807,7 +15829,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14807
15829
|
_this.renderedQuestionsCount = 0;
|
|
14808
15830
|
_this.onAfterRenderQuestionCallback = function (sender, options) {
|
|
14809
15831
|
_this.renderedQuestionsCount++;
|
|
14810
|
-
if (_this.renderedQuestionsCount == _this.
|
|
15832
|
+
if (_this.renderedQuestionsCount == _this.visibleElements.length) {
|
|
14811
15833
|
_this.renderedQuestionsCount = 0;
|
|
14812
15834
|
_this.layoutEngine.update();
|
|
14813
15835
|
_this.afterRender(_this.contentContainer);
|
|
@@ -14896,7 +15918,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14896
15918
|
_this._elements = _this.buildElements(questions);
|
|
14897
15919
|
}
|
|
14898
15920
|
_this.buildVisualizers(questions);
|
|
14899
|
-
_this.updateData(_this.surveyData);
|
|
14900
15921
|
if (!_this.haveCommercialLicense && _this.isRoot) {
|
|
14901
15922
|
_this.registerToolbarItem("commercialLicense", function () {
|
|
14902
15923
|
return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
|
|
@@ -14906,11 +15927,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14906
15927
|
if (_this.supportSelection !== false) {
|
|
14907
15928
|
_this.registerToolbarItem("resetFilter", function () {
|
|
14908
15929
|
return _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
|
|
14909
|
-
_this.
|
|
14910
|
-
if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
|
|
14911
|
-
visualizer.setSelection(undefined);
|
|
14912
|
-
}
|
|
14913
|
-
});
|
|
15930
|
+
_this.resetFilter();
|
|
14914
15931
|
}, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("resetFilter"));
|
|
14915
15932
|
}, 900);
|
|
14916
15933
|
}
|
|
@@ -14971,6 +15988,18 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14971
15988
|
}
|
|
14972
15989
|
return _this;
|
|
14973
15990
|
}
|
|
15991
|
+
VisualizationPanel.prototype.resetFilter = function () {
|
|
15992
|
+
var _a;
|
|
15993
|
+
(_a = this.dataProvider) === null || _a === void 0 ? void 0 : _a.resetFilter();
|
|
15994
|
+
this.visualizers.forEach(function (visualizer) {
|
|
15995
|
+
if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
|
|
15996
|
+
visualizer.setSelection(undefined);
|
|
15997
|
+
}
|
|
15998
|
+
if (visualizer instanceof _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_13__.VisualizationPanelDynamic) {
|
|
15999
|
+
visualizer.resetFilter();
|
|
16000
|
+
}
|
|
16001
|
+
});
|
|
16002
|
+
};
|
|
14974
16003
|
VisualizationPanel.prototype.reorderVisibleElements = function (order) {
|
|
14975
16004
|
var _this = this;
|
|
14976
16005
|
var newElements = [];
|
|
@@ -15081,13 +16110,15 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15081
16110
|
var _this = this;
|
|
15082
16111
|
questions.forEach(function (question) {
|
|
15083
16112
|
var visualizerOptions = Object.assign({}, _this.options);
|
|
15084
|
-
|
|
16113
|
+
if (visualizerOptions.dataProvider === undefined) {
|
|
16114
|
+
visualizerOptions.dataProvider = _this.dataProvider;
|
|
16115
|
+
}
|
|
15085
16116
|
var visualizer;
|
|
15086
16117
|
if (Array.isArray(question)) {
|
|
15087
|
-
visualizer = new (
|
|
16118
|
+
visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, [], visualizerOptions, undefined, false);
|
|
15088
16119
|
}
|
|
15089
16120
|
else {
|
|
15090
|
-
visualizer = _this.createVisualizer(question, visualizerOptions,
|
|
16121
|
+
visualizer = _this.createVisualizer(question, visualizerOptions, []);
|
|
15091
16122
|
}
|
|
15092
16123
|
if (!visualizer) {
|
|
15093
16124
|
return;
|
|
@@ -15417,7 +16448,24 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15417
16448
|
* @see IVisualizationPanelOptions.allowSelection
|
|
15418
16449
|
*/
|
|
15419
16450
|
VisualizationPanel.prototype.setFilter = function (questionName, selectedValue) {
|
|
15420
|
-
|
|
16451
|
+
var _a, _b;
|
|
16452
|
+
if (!this.dataPath) {
|
|
16453
|
+
this.dataProvider.setFilter(questionName, selectedValue);
|
|
16454
|
+
}
|
|
16455
|
+
else {
|
|
16456
|
+
if (selectedValue !== undefined && selectedValue !== null) {
|
|
16457
|
+
if (typeof selectedValue === "object" && Object.keys(selectedValue)[0]) {
|
|
16458
|
+
var seriesValue = Object.keys(selectedValue)[0];
|
|
16459
|
+
this.dataProvider.setFilter(this.dataPath, (_a = {}, _a[questionName] = selectedValue[seriesValue], _a[_dataProvider__WEBPACK_IMPORTED_MODULE_9__.DataProvider.seriesMarkerKey] = seriesValue, _a));
|
|
16460
|
+
}
|
|
16461
|
+
else {
|
|
16462
|
+
this.dataProvider.setFilter(this.dataPath, (_b = {}, _b[questionName] = selectedValue, _b));
|
|
16463
|
+
}
|
|
16464
|
+
}
|
|
16465
|
+
else {
|
|
16466
|
+
this.dataProvider.setFilter(this.dataPath, undefined);
|
|
16467
|
+
}
|
|
16468
|
+
}
|
|
15421
16469
|
};
|
|
15422
16470
|
VisualizationPanel.prototype.getState = function () {
|
|
15423
16471
|
var _this = this;
|
|
@@ -15545,7 +16593,7 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
|
|
|
15545
16593
|
function VisualizationPanelDynamic(question, data, options, name) {
|
|
15546
16594
|
if (options === void 0) { options = {}; }
|
|
15547
16595
|
var _this = _super.call(this, question, data, options, name || "panelDynamic") || this;
|
|
15548
|
-
_this.
|
|
16596
|
+
_this._contentVisualizer = undefined;
|
|
15549
16597
|
_this.onAfterRenderPanelCallback = function () {
|
|
15550
16598
|
_this.afterRender(_this.contentContainer);
|
|
15551
16599
|
};
|
|
@@ -15553,46 +16601,40 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
|
|
|
15553
16601
|
var options = Object.assign({}, options);
|
|
15554
16602
|
options.allowHideQuestions = false;
|
|
15555
16603
|
options.allowDynamicLayout = false;
|
|
15556
|
-
options.dataProvider =
|
|
16604
|
+
options.dataProvider = _this.dataProvider;
|
|
15557
16605
|
options.dataPath = _this.dataNames[0];
|
|
15558
|
-
_this.
|
|
15559
|
-
_this.
|
|
15560
|
-
_this.updateData(data);
|
|
16606
|
+
_this._contentVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
|
|
16607
|
+
_this._contentVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
|
|
15561
16608
|
return _this;
|
|
15562
16609
|
}
|
|
15563
16610
|
Object.defineProperty(VisualizationPanelDynamic.prototype, "contentVisualizer", {
|
|
15564
16611
|
get: function () {
|
|
15565
|
-
return this.
|
|
16612
|
+
return this._contentVisualizer;
|
|
15566
16613
|
},
|
|
15567
16614
|
enumerable: false,
|
|
15568
16615
|
configurable: true
|
|
15569
16616
|
});
|
|
15570
16617
|
VisualizationPanelDynamic.prototype.setLocale = function (newLocale) {
|
|
15571
16618
|
_super.prototype.setLocale.call(this, newLocale);
|
|
15572
|
-
this.
|
|
15573
|
-
};
|
|
15574
|
-
VisualizationPanelDynamic.prototype.updateData = function (data) {
|
|
15575
|
-
_super.prototype.updateData.call(this, data);
|
|
15576
|
-
this._panelVisualizer.updateData(data);
|
|
16619
|
+
this._contentVisualizer.locale = newLocale;
|
|
15577
16620
|
};
|
|
15578
|
-
VisualizationPanelDynamic.prototype.
|
|
15579
|
-
this.
|
|
15580
|
-
_super.prototype.onDataChanged.call(this);
|
|
16621
|
+
VisualizationPanelDynamic.prototype.resetFilter = function () {
|
|
16622
|
+
this.contentVisualizer.resetFilter();
|
|
15581
16623
|
};
|
|
15582
16624
|
VisualizationPanelDynamic.prototype.getQuestions = function () {
|
|
15583
16625
|
var paneldynamic = this.question;
|
|
15584
16626
|
return paneldynamic.template.questions;
|
|
15585
16627
|
};
|
|
15586
16628
|
VisualizationPanelDynamic.prototype.destroyContent = function (container) {
|
|
15587
|
-
this.
|
|
16629
|
+
this._contentVisualizer.clear();
|
|
15588
16630
|
_super.prototype.destroyContent.call(this, this.contentContainer);
|
|
15589
16631
|
};
|
|
15590
16632
|
VisualizationPanelDynamic.prototype.renderContent = function (container) {
|
|
15591
|
-
this.
|
|
16633
|
+
this._contentVisualizer.render(container);
|
|
15592
16634
|
};
|
|
15593
16635
|
VisualizationPanelDynamic.prototype.destroy = function () {
|
|
15594
16636
|
_super.prototype.destroy.call(this);
|
|
15595
|
-
this.
|
|
16637
|
+
this._contentVisualizer.onAfterRender.remove(this.onAfterRenderPanelCallback);
|
|
15596
16638
|
};
|
|
15597
16639
|
return VisualizationPanelDynamic;
|
|
15598
16640
|
}(_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase));
|
|
@@ -15817,6 +16859,13 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15817
16859
|
enumerable: false,
|
|
15818
16860
|
configurable: true
|
|
15819
16861
|
});
|
|
16862
|
+
Object.defineProperty(VisualizerBase.prototype, "dataPath", {
|
|
16863
|
+
get: function () {
|
|
16864
|
+
return this.options.dataPath;
|
|
16865
|
+
},
|
|
16866
|
+
enumerable: false,
|
|
16867
|
+
configurable: true
|
|
16868
|
+
});
|
|
15820
16869
|
Object.defineProperty(VisualizerBase.prototype, "hasHeader", {
|
|
15821
16870
|
/**
|
|
15822
16871
|
* Indicates whether the visualizer displays a header. This property is `true` when a visualized question has a correct answer.
|
|
@@ -16021,26 +17070,9 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
16021
17070
|
* @param data A data array with survey results to be visualized.
|
|
16022
17071
|
*/
|
|
16023
17072
|
VisualizerBase.prototype.updateData = function (data) {
|
|
16024
|
-
|
|
16025
|
-
var dataToAssign = data;
|
|
16026
|
-
if (!!dataPath && Array.isArray(data)) {
|
|
16027
|
-
dataToAssign = [];
|
|
16028
|
-
data.forEach(function (dataItem) {
|
|
16029
|
-
if (!!dataItem && dataItem[dataPath] !== undefined) {
|
|
16030
|
-
if (Array.isArray(dataItem[dataPath])) {
|
|
16031
|
-
dataToAssign = dataToAssign.concat(dataItem[dataPath]);
|
|
16032
|
-
}
|
|
16033
|
-
else {
|
|
16034
|
-
dataToAssign.push(dataItem[dataPath]);
|
|
16035
|
-
}
|
|
16036
|
-
}
|
|
16037
|
-
});
|
|
16038
|
-
}
|
|
16039
|
-
if (!this.options.dataProvider) {
|
|
16040
|
-
this.dataProvider.data = dataToAssign;
|
|
16041
|
-
}
|
|
17073
|
+
this.dataProvider.data = data;
|
|
16042
17074
|
if (this.hasFooter) {
|
|
16043
|
-
this.footerVisualizer.updateData(
|
|
17075
|
+
this.footerVisualizer.updateData(data);
|
|
16044
17076
|
}
|
|
16045
17077
|
};
|
|
16046
17078
|
VisualizerBase.prototype.invokeOnUpdate = function () {
|
|
@@ -18546,7 +19578,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18546
19578
|
/* harmony export */ VisualizerFactory: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizerFactory),
|
|
18547
19579
|
/* harmony export */ WordCloud: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.WordCloud),
|
|
18548
19580
|
/* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.WordCloudAdapter),
|
|
19581
|
+
/* harmony export */ getBestIntervalMode: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.getBestIntervalMode),
|
|
18549
19582
|
/* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.hideEmptyAnswersInData),
|
|
19583
|
+
/* harmony export */ intervalCalculators: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.intervalCalculators),
|
|
18550
19584
|
/* harmony export */ localization: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.localization),
|
|
18551
19585
|
/* harmony export */ plotlyChartTypes: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.plotlyChartTypes),
|
|
18552
19586
|
/* harmony export */ setupLocale: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.setupLocale),
|