survey-analytics 2.3.7 → 2.3.8
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 +1 -1
- package/fesm/shared2.mjs +53 -35
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +1 -1
- package/fesm/survey.analytics.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +3 -3
- package/survey-analytics.types/visualizationPanel.d.ts +6 -0
- package/survey-analytics.types/visualizerBase.d.ts +5 -0
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +59 -37
- 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.js +59 -37
- 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.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +1 -1
- package/survey.analytics.tabulator.js.map +1 -1
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
package/fesm/shared.mjs
CHANGED
package/fesm/shared2.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.3.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.8
|
|
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
|
*/
|
|
@@ -699,6 +699,18 @@ class VisualizerBase {
|
|
|
699
699
|
}
|
|
700
700
|
return undefined;
|
|
701
701
|
}
|
|
702
|
+
/**
|
|
703
|
+
* Returns the visualizer's title.
|
|
704
|
+
*/
|
|
705
|
+
get title() {
|
|
706
|
+
return this.getTitle(this.question);
|
|
707
|
+
}
|
|
708
|
+
getTitle(question) {
|
|
709
|
+
var _a;
|
|
710
|
+
if (question === undefined)
|
|
711
|
+
return "";
|
|
712
|
+
return this.processText(((_a = question.locTitle) === null || _a === void 0 ? void 0 : _a.renderedHtml) ? question.locTitle.renderedHtml : question.title);
|
|
713
|
+
}
|
|
702
714
|
/**
|
|
703
715
|
* Returns the visualizer's type.
|
|
704
716
|
*/
|
|
@@ -1197,19 +1209,21 @@ class NumberModel extends VisualizerBase {
|
|
|
1197
1209
|
this.chartTypes = this._chartAdapter.getChartTypes();
|
|
1198
1210
|
this.chartType = this.chartTypes[0];
|
|
1199
1211
|
}
|
|
1200
|
-
this.
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
return {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
this.
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1212
|
+
if (this.options.allowChangeVisualizerType !== false) {
|
|
1213
|
+
this.registerToolbarItem("changeChartType", () => {
|
|
1214
|
+
if (this.chartTypes.length > 1) {
|
|
1215
|
+
return DocumentHelper.createSelector(this.chartTypes.map((chartType) => {
|
|
1216
|
+
return {
|
|
1217
|
+
value: chartType,
|
|
1218
|
+
text: localization.getString("chartType_" + chartType),
|
|
1219
|
+
};
|
|
1220
|
+
}), (option) => this.chartType === option.value, (e) => {
|
|
1221
|
+
this.setChartType(e.target.value);
|
|
1222
|
+
});
|
|
1223
|
+
}
|
|
1224
|
+
return null;
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1213
1227
|
}
|
|
1214
1228
|
onDataChanged() {
|
|
1215
1229
|
this._resultAverage = undefined;
|
|
@@ -1408,19 +1422,21 @@ class SelectBase extends VisualizerBase {
|
|
|
1408
1422
|
this._chartType = this.options.defaultChartType;
|
|
1409
1423
|
}
|
|
1410
1424
|
}
|
|
1411
|
-
this.
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
return {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
this.
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1425
|
+
if (this.options.allowChangeVisualizerType !== false) {
|
|
1426
|
+
this.registerToolbarItem("changeChartType", () => {
|
|
1427
|
+
if (this.chartTypes.length > 1) {
|
|
1428
|
+
return DocumentHelper.createSelector(this.chartTypes.map((chartType) => {
|
|
1429
|
+
return {
|
|
1430
|
+
value: chartType,
|
|
1431
|
+
text: localization.getString("chartType_" + chartType),
|
|
1432
|
+
};
|
|
1433
|
+
}), (option) => this.chartType === option.value, (e) => {
|
|
1434
|
+
this.setChartType(e.target.value);
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
return null;
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1424
1440
|
this.registerToolbarItem("changeAnswersOrder", () => {
|
|
1425
1441
|
if (this.isSupportAnswersOrder()) {
|
|
1426
1442
|
this.choicesOrderSelector = DocumentHelper.createSelector([
|
|
@@ -2715,12 +2731,14 @@ class AlternativeVisualizersWrapper extends VisualizerBase {
|
|
|
2715
2731
|
this.visualizersWithSelection.push(visualizer);
|
|
2716
2732
|
}
|
|
2717
2733
|
});
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2734
|
+
if (this.options.allowChangeVisualizerType !== false) {
|
|
2735
|
+
this.registerToolbarItem("changeVisualizer", () => this.visualizerSelector = DocumentHelper.createSelector(this.visualizers.map((visualizer) => {
|
|
2736
|
+
return {
|
|
2737
|
+
value: visualizer.type,
|
|
2738
|
+
text: localization.getString("visualizer_" + visualizer.type),
|
|
2739
|
+
};
|
|
2740
|
+
}), (option) => this.visualizer.type === option.value, (e) => this.setVisualizer(e.target.value)), 0);
|
|
2741
|
+
}
|
|
2724
2742
|
this.visualizer = visualizers[0];
|
|
2725
2743
|
this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback);
|
|
2726
2744
|
this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback);
|
|
@@ -10171,7 +10189,7 @@ class VisualizationPanel extends VisualizerBase {
|
|
|
10171
10189
|
question = Array.isArray(question) ? question[0] : question;
|
|
10172
10190
|
const element = this.getElement(question.name);
|
|
10173
10191
|
if (!!element) {
|
|
10174
|
-
element.displayName = this.
|
|
10192
|
+
element.displayName = this.getTitle(question);
|
|
10175
10193
|
}
|
|
10176
10194
|
});
|
|
10177
10195
|
this.visualizers.forEach(v => {
|
|
@@ -10218,7 +10236,7 @@ class VisualizationPanel extends VisualizerBase {
|
|
|
10218
10236
|
question = Array.isArray(question) ? question[0] : question;
|
|
10219
10237
|
return {
|
|
10220
10238
|
name: question.name,
|
|
10221
|
-
displayName: this.
|
|
10239
|
+
displayName: this.getTitle(question),
|
|
10222
10240
|
isVisible: true,
|
|
10223
10241
|
isPublic: true,
|
|
10224
10242
|
};
|