survey-analytics 2.2.6 → 2.3.0
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 +2 -1
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +7 -4
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +1 -1
- package/fesm/survey.analytics.mjs +80 -19
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.tabulator.mjs +1 -1
- package/package.json +2 -2
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +1 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +1 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +1 -0
- package/survey-analytics.types/config.d.ts +1 -0
- package/survey-analytics.types/localizationManager.d.ts +1 -0
- package/survey-analytics.types/plotly/chart-adapter.d.ts +1 -0
- package/survey-analytics.types/plotly/setup.d.ts +1 -0
- package/survey-analytics.types/ranking.d.ts +4 -0
- package/survey-analytics.types/visualizationPanel.d.ts +4 -2
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +9 -6
- 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 +103 -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 +2 -1
- 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/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"pre-push-check": "npm run lint && npm run test",
|
|
19
19
|
"postinstall": "playwright install chromium"
|
|
20
20
|
},
|
|
21
|
-
"version": "2.
|
|
21
|
+
"version": "2.3.0",
|
|
22
22
|
"name": "survey-analytics",
|
|
23
23
|
"description": "SurveyJS analytics Library.",
|
|
24
24
|
"main": "survey.analytics.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@types/plotly.js-dist-min": "^2.3.0",
|
|
92
92
|
"@types/tabulator-tables": "^6.2.3",
|
|
93
|
-
"survey-core": "2.
|
|
93
|
+
"survey-core": "2.3.0"
|
|
94
94
|
},
|
|
95
95
|
"husky": {
|
|
96
96
|
"hooks": {
|
|
@@ -28,4 +28,5 @@ export declare class PlotlySetup {
|
|
|
28
28
|
static setupVBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
29
29
|
static setupScatter(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
30
30
|
static setupGauge(model: NumberModel, answersData: IAnswersData): PlotlyOptions;
|
|
31
|
+
static setupRadar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
31
32
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { SelectBase } from "./selectBase";
|
|
2
|
+
import { QuestionRankingModel } from "survey-core";
|
|
2
3
|
export declare class RankingModel extends SelectBase {
|
|
4
|
+
constructor(question: QuestionRankingModel, data: Array<{
|
|
5
|
+
[index: string]: any;
|
|
6
|
+
}>, options?: any, name?: string);
|
|
3
7
|
getQuestionResults(): any[];
|
|
4
8
|
getEmptyData(): any;
|
|
5
9
|
protected getCalculatedValuesCore(): Array<any>;
|
|
@@ -200,14 +200,16 @@ export interface IVisualizationPanelOptions {
|
|
|
200
200
|
* - Matrix: `"bar"` | `"vbar"` | `"pie"` | `"doughnut"` | `"stackedbar"`
|
|
201
201
|
* - Rating: `"bar"` | `"vbar"` | `"gauge"` | `"bullet"`
|
|
202
202
|
* - Radiogroup, Checkbox, Dropdown, Image Picker: `"bar"` | `"vbar"` | `"pie"` | `"doughnut"`
|
|
203
|
+
* - Ranking: `"bar"` | `"vbar"` | `"pie"` | `"doughnut" | `"radar"`
|
|
203
204
|
*
|
|
204
|
-
* To set a type for an individual chart, access this chart in the `visualizers` array and set its `chartType` property to one of the values described above:
|
|
205
|
+
* To set a type for an individual chart, access this chart in the `visualizers` array or using the [`getVisualizer(questionName)`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel#getVisualizer) method and set its `chartType` property to one of the values described above:
|
|
205
206
|
*
|
|
206
207
|
* ```js
|
|
207
208
|
* const vizPanel = new SurveyAnalytics.VisualizationPanel( ... );
|
|
208
209
|
* vizPanel.visualizers[0].chartType = "stackedbar";
|
|
210
|
+
* // --- or ---
|
|
211
|
+
* vizPanel.getVisualizer("my-question").chartType = "stackedbar";
|
|
209
212
|
* ```
|
|
210
|
-
*
|
|
211
213
|
*/
|
|
212
214
|
defaultChartType?: string;
|
|
213
215
|
/**
|
package/survey.analytics.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.0
|
|
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
|
*/
|
|
@@ -7276,6 +7276,7 @@ var englishStrings = {
|
|
|
7276
7276
|
chartType_gauge: "Gauge",
|
|
7277
7277
|
chartType_bullet: "Bullet",
|
|
7278
7278
|
chartType_line: "Line",
|
|
7279
|
+
chartType_radar: "Radar",
|
|
7279
7280
|
hideButton: "Hide",
|
|
7280
7281
|
makePrivateButton: "Make private",
|
|
7281
7282
|
makePublicButton: "Make public",
|
|
@@ -10162,8 +10163,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10162
10163
|
|
|
10163
10164
|
var RankingModel = /** @class */ (function (_super) {
|
|
10164
10165
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(RankingModel, _super);
|
|
10165
|
-
function RankingModel() {
|
|
10166
|
-
return _super
|
|
10166
|
+
function RankingModel(question, data, options, name) {
|
|
10167
|
+
return _super.call(this, question, data, options, name || "ranking") || this;
|
|
10167
10168
|
}
|
|
10168
10169
|
RankingModel.prototype.getQuestionResults = function () {
|
|
10169
10170
|
var name = this.question.name;
|
|
@@ -11860,7 +11861,7 @@ var VisualizationManager = /** @class */ (function () {
|
|
|
11860
11861
|
if (constructor) {
|
|
11861
11862
|
var visualizers = VisualizationManager.vizualizers[qType];
|
|
11862
11863
|
if (!!visualizers) {
|
|
11863
|
-
var vDescr = visualizers.filter(function (v) { return v.ctor === constructor; })[0];
|
|
11864
|
+
var vDescr = visualizers.filter(function (v) { return v.ctor === constructor || v.ctor.isPrototypeOf(constructor); })[0];
|
|
11864
11865
|
if (!!vDescr) {
|
|
11865
11866
|
var index = visualizers.indexOf(vDescr);
|
|
11866
11867
|
if (index !== -1) {
|
|
@@ -11977,12 +11978,12 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
11977
11978
|
_this._childOptions.transposeData = true;
|
|
11978
11979
|
_this._childOptions.seriesValues = question.rows.map(function (row) { return row.value; });
|
|
11979
11980
|
_this._childOptions.seriesLabels = question.rows.map(function (row) { return row.text; });
|
|
11980
|
-
var innerQuestions = _this.getQuestions();
|
|
11981
11981
|
if (_this.canGroupColumns) {
|
|
11982
11982
|
var creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.getVisualizersByType("matrixdropdown-grouped");
|
|
11983
11983
|
_this._matrixDropdownVisualizer = new creators[0](_this.question, [], _this._childOptions);
|
|
11984
11984
|
}
|
|
11985
11985
|
else {
|
|
11986
|
+
var innerQuestions = _this.getQuestions();
|
|
11986
11987
|
_this._matrixDropdownVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions);
|
|
11987
11988
|
}
|
|
11988
11989
|
_this._matrixDropdownVisualizer.onAfterRender.add(_this.onPanelAfterRenderCallback);
|
|
@@ -11993,7 +11994,9 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
11993
11994
|
get: function () {
|
|
11994
11995
|
var _this = this;
|
|
11995
11996
|
var innerQuestions = this.getQuestions();
|
|
11996
|
-
var canGroupColumns = this._childOptions.seriesValues.length == 1 && innerQuestions.every(function (innerQuestion) {
|
|
11997
|
+
var canGroupColumns = this._childOptions.seriesValues.length == 1 && innerQuestions.every(function (innerQuestion) {
|
|
11998
|
+
return innerQuestion.getType() !== "boolean" && isChoicesArraysEqual(innerQuestion.choices, _this.question.choices);
|
|
11999
|
+
});
|
|
11997
12000
|
return canGroupColumns;
|
|
11998
12001
|
},
|
|
11999
12002
|
enumerable: false,
|