survey-analytics 2.5.27 → 2.5.29

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.5.27
2
+ * surveyjs - SurveyJS Dashboard library v2.5.29
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/fesm/shared2.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.5.27
2
+ * surveyjs - SurveyJS Dashboard library v2.5.29
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1510,7 +1510,7 @@ class SelectBase extends VisualizerBase {
1510
1510
  }
1511
1511
  this._supportSelection = true;
1512
1512
  this._showOnlyPercentages = this.options.showOnlyPercentages === true;
1513
- if (this.options.percentagePrecision) {
1513
+ if (this.options.percentagePrecision !== undefined) {
1514
1514
  this._percentagePrecision = this.options.percentagePrecision;
1515
1515
  }
1516
1516
  if (this.options.transposeData !== undefined) {
@@ -1940,7 +1940,7 @@ class SelectBase extends VisualizerBase {
1940
1940
  if (data.length < 2) {
1941
1941
  var sum = data[0].reduce((sum, val) => sum + val, 0);
1942
1942
  percentages[0] = data[0].map((val) => {
1943
- var value = percentagePrecision ? +(val / sum * 100).toFixed(percentagePrecision) : Math.round(val / sum * 100);
1943
+ var value = +(val / sum * 100).toFixed(percentagePrecision);
1944
1944
  return sum && value;
1945
1945
  });
1946
1946
  }
@@ -1953,7 +1953,7 @@ class SelectBase extends VisualizerBase {
1953
1953
  for (var j = 0; j < data.length; j++) {
1954
1954
  if (!Array.isArray(percentages[j]))
1955
1955
  percentages[j] = [];
1956
- var value = percentagePrecision ? +(data[j][i] / sum * 100).toFixed(percentagePrecision) : Math.round(data[j][i] / sum * 100);
1956
+ var value = +(data[j][i] / sum * 100).toFixed(percentagePrecision);
1957
1957
  percentages[j][i] = sum && value;
1958
1958
  }
1959
1959
  }