logitude-dashboard-library 3.2.39 → 3.2.40

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.
@@ -689,6 +689,120 @@ var getDateRangesByCode = function getDateRangesByCode(code, _fromDate, _toDate)
689
689
  return result;
690
690
  };
691
691
 
692
+ var FieldDataType = /*#__PURE__*/function () {
693
+ function FieldDataType() {}
694
+
695
+ FieldDataType.isNumericType = function isNumericType(fieldDataType) {
696
+ if (!fieldDataType || typeof fieldDataType !== "string") {
697
+ return false;
698
+ }
699
+
700
+ return [FieldDataType.Decimal, FieldDataType.Double, FieldDataType.UnsDecimal, FieldDataType.SigDouble, FieldDataType.Integer, FieldDataType.UnsInteger, FieldDataType.Percentage].includes(fieldDataType);
701
+ };
702
+
703
+ FieldDataType.isInteger = function isInteger(fieldDataType) {
704
+ if (!fieldDataType || typeof fieldDataType !== "string") {
705
+ return false;
706
+ }
707
+
708
+ return [FieldDataType.Integer, FieldDataType.UnsInteger].includes(fieldDataType);
709
+ };
710
+
711
+ FieldDataType.isPercentage = function isPercentage(fieldDataType) {
712
+ if (!fieldDataType || typeof fieldDataType !== "string") {
713
+ return false;
714
+ }
715
+
716
+ return fieldDataType === FieldDataType.Percentage;
717
+ };
718
+
719
+ FieldDataType.isLookUpType = function isLookUpType(fieldDataType) {
720
+ if (!fieldDataType || typeof fieldDataType !== "string") {
721
+ return false;
722
+ }
723
+
724
+ return fieldDataType === FieldDataType.LookUp;
725
+ };
726
+
727
+ FieldDataType.isPickListType = function isPickListType(fieldDataType) {
728
+ if (!fieldDataType || typeof fieldDataType !== "string") {
729
+ return false;
730
+ }
731
+
732
+ return [FieldDataType.PickList, FieldDataType.PickList2].includes(fieldDataType);
733
+ };
734
+
735
+ FieldDataType.isTextOrNTextType = function isTextOrNTextType(fieldDataType) {
736
+ if (!fieldDataType || typeof fieldDataType !== "string") {
737
+ return false;
738
+ }
739
+
740
+ return [FieldDataType.Text, FieldDataType.nText].includes(fieldDataType);
741
+ };
742
+
743
+ FieldDataType.isTextType = function isTextType(fieldDataType) {
744
+ if (!fieldDataType || typeof fieldDataType !== "string") {
745
+ return false;
746
+ }
747
+
748
+ return fieldDataType === FieldDataType.Text;
749
+ };
750
+
751
+ FieldDataType.isNTextType = function isNTextType(fieldDataType) {
752
+ if (!fieldDataType || typeof fieldDataType !== "string") {
753
+ return false;
754
+ }
755
+
756
+ return fieldDataType === FieldDataType.nText;
757
+ };
758
+
759
+ FieldDataType.isBooleanType = function isBooleanType(fieldDataType) {
760
+ if (!fieldDataType || typeof fieldDataType !== "string") {
761
+ return false;
762
+ }
763
+
764
+ return fieldDataType === FieldDataType.Boolean;
765
+ };
766
+
767
+ FieldDataType.isDateOrDateTimeType = function isDateOrDateTimeType(fieldDataType) {
768
+ if (!fieldDataType || typeof fieldDataType !== "string") {
769
+ return false;
770
+ }
771
+
772
+ return [FieldDataType.Date, FieldDataType.DateTime].includes(fieldDataType);
773
+ };
774
+
775
+ return FieldDataType;
776
+ }();
777
+ FieldDataType.Decimal = "Decimal";
778
+ FieldDataType.Double = "Double";
779
+ FieldDataType.UnsDecimal = "UnsDecimal";
780
+ FieldDataType.Integer = "Integer";
781
+ FieldDataType.UnsInteger = "UnsInteger";
782
+ FieldDataType.SigDouble = "SigDouble";
783
+ FieldDataType.LookUp = "LookUp";
784
+ FieldDataType.PickList = "PickList";
785
+ FieldDataType.PickList2 = "PickList2";
786
+ FieldDataType.Text = "Text";
787
+ FieldDataType.nText = "nText";
788
+ FieldDataType.Boolean = "Boolean";
789
+ FieldDataType.Date = "Date";
790
+ FieldDataType.DateTime = "DateTime";
791
+ FieldDataType.Percentage = "Percentage";
792
+
793
+ var MeasureCode;
794
+
795
+ (function (MeasureCode) {
796
+ MeasureCode["Average"] = "Avg";
797
+ MeasureCode["CalculatedColumn"] = "CalculatedColumn";
798
+ MeasureCode["Formula"] = "Formula";
799
+ MeasureCode["Max"] = "Max";
800
+ MeasureCode["Min"] = "Min";
801
+ MeasureCode["Sum"] = "Sum";
802
+ MeasureCode["Target"] = "Target";
803
+ MeasureCode["Count"] = "Count";
804
+ })(MeasureCode || (MeasureCode = {}));
805
+
692
806
  var isNullOrUndefined = function isNullOrUndefined(val) {
693
807
  return val == null || val == undefined;
694
808
  };
@@ -730,30 +844,49 @@ var getGlobalNumberFormatting = function getGlobalNumberFormatting() {
730
844
  return numberSeparatorSettings;
731
845
  };
732
846
 
733
- var getNumberInSystemLocalFormat = function getNumberInSystemLocalFormat(value, decimalDigitsCount, isToolTip) {
847
+ var isValueInteger = function isValueInteger(measureCode, measureFieldType) {
848
+ if (measureCode === MeasureCode.Count || measureFieldType === FieldDataType.Integer) {
849
+ return true;
850
+ }
851
+
852
+ return false;
853
+ };
854
+
855
+ var getTruncatedValue = function getTruncatedValue(value, decimalDigitsCount) {
856
+ if (decimalDigitsCount === void 0) {
857
+ decimalDigitsCount = 2;
858
+ }
859
+
860
+ if (value == null || value == undefined || isNaN(value)) return value;
861
+ return truncateDecimals(value, decimalDigitsCount);
862
+ };
863
+
864
+ var getNumberInSystemLocalFormat = function getNumberInSystemLocalFormat(value, decimalDigitsCount, minimumFractionDigits, isValueTruncated) {
734
865
  if (decimalDigitsCount === void 0) {
735
866
  decimalDigitsCount = -1;
736
867
  }
737
868
 
738
- if (isToolTip === void 0) {
739
- isToolTip = false;
869
+ if (minimumFractionDigits === void 0) {
870
+ minimumFractionDigits = 0;
740
871
  }
741
872
 
742
- if (isNaN(value) || value == null || value == undefined) return value + "";
873
+ if (isValueTruncated === void 0) {
874
+ isValueTruncated = true;
875
+ }
876
+
877
+ if (value == null || value == undefined || isNaN(value)) return value + "";
743
878
  var decimalParts = value.toString().split(".");
744
879
  var maxFractionDigits = decimalParts[1] ? decimalParts[1].length : 0;
745
880
  decimalDigitsCount = decimalDigitsCount == -1 ? maxFractionDigits : decimalDigitsCount;
746
881
 
747
882
  var _numberSeparatorSettings = getGlobalNumberFormatting();
748
883
 
749
- if (!isToolTip) {
750
- var factor = Math.pow(10, decimalDigitsCount);
751
- var truncatedValue = Math.floor(value * factor) / factor;
752
- value = truncatedValue;
884
+ if (isValueTruncated) {
885
+ value = truncateDecimals(value, decimalDigitsCount);
753
886
  }
754
887
 
755
888
  var _val = value.toLocaleString('en-US', {
756
- minimumFractionDigits: 0,
889
+ minimumFractionDigits: minimumFractionDigits,
757
890
  maximumFractionDigits: decimalDigitsCount
758
891
  });
759
892
 
@@ -769,6 +902,24 @@ var getNumberInSystemLocalFormat = function getNumberInSystemLocalFormat(value,
769
902
  return value + "";
770
903
  };
771
904
 
905
+ var truncateDecimals = function truncateDecimals(value, numberOfDecimalParts) {
906
+ if (!Number.isFinite(value)) return value;
907
+ var numStr = value.toString();
908
+
909
+ if (numStr.toLocaleLowerCase().includes("e")) {
910
+ return value;
911
+ }
912
+
913
+ var _numStr$split = numStr.split('.'),
914
+ integerPart = _numStr$split[0],
915
+ _numStr$split$ = _numStr$split[1],
916
+ decimalPart = _numStr$split$ === void 0 ? '' : _numStr$split$;
917
+
918
+ var truncated = decimalPart.slice(0, numberOfDecimalParts);
919
+ var resultStr = truncated.length > 0 ? integerPart + "." + truncated : integerPart;
920
+ return parseFloat(resultStr);
921
+ };
922
+
772
923
  var ConvertStringToPascalCaseHelper = function ConvertStringToPascalCaseHelper(stringValue) {
773
924
  if (isNullOrUndefinedOrEmpty(stringValue) || typeof stringValue !== 'string') return stringValue || '';
774
925
  var splittedWords = stringValue.split(' ').filter(function (f) {
@@ -1602,12 +1753,16 @@ var TableChart = function TableChart(props) {
1602
1753
 
1603
1754
  var columnValue = data[column.FieldCode];
1604
1755
 
1605
- if (column.DataTypeCode == "Percentage") {
1606
- return !isNullOrUndefined(columnValue) ? getNumberInSystemLocalFormat(Number(columnValue), 2) + "%" : 0 + '%';
1756
+ if (FieldDataType.isPercentage(column.DataTypeCode)) {
1757
+ return !isNullOrUndefined(columnValue) ? getNumberInSystemLocalFormat(Number(columnValue), 2, 2) + "%" : 0 + '%';
1758
+ }
1759
+
1760
+ if (FieldDataType.isInteger(column.DataTypeCode)) {
1761
+ return !isNullOrUndefined(columnValue) ? getNumberInSystemLocalFormat(Number(columnValue), 0, 0, false) : "";
1607
1762
  }
1608
1763
 
1609
- if (column.DataTypeCode == "Decimal" || column.DataTypeCode == "Integer" || column.DataTypeCode == "Double" || column.DataTypeCode == "SigDouble") {
1610
- return !isNullOrUndefined(columnValue) ? getNumberInSystemLocalFormat(Number(columnValue), 2) : "";
1764
+ if (FieldDataType.isNumericType(column.DataTypeCode)) {
1765
+ return !isNullOrUndefined(columnValue) ? getNumberInSystemLocalFormat(Number(columnValue), 2, 2) : "";
1611
1766
  }
1612
1767
 
1613
1768
  return ConvertStringToPascalCaseHelper(columnValue);
@@ -1973,9 +2128,12 @@ var PivotTable = forwardRef(function (props, comRef) {
1973
2128
  }
1974
2129
  },
1975
2130
  format: function format(value) {
2131
+ var isInteger = isValueInteger(measure.MeasureCode, measure.MeasureFieldDataType);
2132
+ var minimumFraction = isInteger ? 0 : 2;
2133
+
1976
2134
  var _value = isNullOrUndefinedOrEmpty(value) ? 0 : value;
1977
2135
 
1978
- return getNumberInSystemLocalFormat(_value, 2);
2136
+ return getNumberInSystemLocalFormat(_value, 2, minimumFraction);
1979
2137
  }
1980
2138
  };
1981
2139
  });
@@ -2109,7 +2267,7 @@ function buildToolTip(widget, value, seriesMeasure, label, index, groupbyId, sec
2109
2267
  }
2110
2268
 
2111
2269
  var padding = widget.TypeCode == 'line' && index > 0 ? 'padding-top: 3px' : '';
2112
- var customToolTip = "\n <div style=\"min-width: 108px;" + padding + "\">\n\n <div style=\"display: flex;align-items: center;margin-bottom: 6px;\">\n <span style=\"margin: 0; min-height: 10px; min-width: 10px; height: 10px; width: 10px; background-color: transparent; border-radius: 50%; display: inline-block;\"></span>\n <p style=\" margin: 0; margin-left: 4px; white-space: pre-line; font-family: 'Manrope'; font-style: normal;font-weight: 400; font-size: 11px; line-height: 100%; color: #323232;\"> " + getTooltiplabel(label, seriesMeasure) + "</p>\n </div>\n\n <hr style=\"margin: 0;border-top: 1px solid #F0F0F0;\">\n\n <div style=\"display: flex;align-items: center;margin:0;margin-top: 6px;\">\n <p style=\"margin: 0;font-family: 'Manrope'; white-space: pre-line; font-style: normal;font-weight: 400; font-size: 11px;line-height: 100%;color: #A4A4A4;\"> " + getMeasureType(seriesMeasure) + "</p>\n <p style=\"margin: 0;margin-left: 6px; white-space: pre-line; font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #A4A4A4;\">" + getTooltipValue(value, seriesMeasure) + "</p>\n " + getTooltipPercentage(widget) + " </div> ";
2270
+ var customToolTip = "\n <div style=\"min-width: 108px;" + padding + "\">\n\n <div style=\"display: flex;align-items: center;margin-bottom: 6px;\">\n <span style=\"margin: 0; min-height: 10px; min-width: 10px; height: 10px; width: 10px; background-color: transparent; border-radius: 50%; display: inline-block;\"></span>\n <p style=\" margin: 0; margin-left: 4px; white-space: pre-line; font-family: 'Manrope'; font-style: normal;font-weight: 400; font-size: 11px; line-height: 100%; color: #323232;\"> " + getTooltiplabel(label, seriesMeasure) + "</p>\n </div>\n\n <hr style=\"margin: 0;border-top: 1px solid #F0F0F0;\">\n\n <div style=\"display: flex;align-items: center;margin:0;margin-top: 6px;\">\n <p style=\"margin: 0;font-family: 'Manrope'; white-space: pre-line; font-style: normal;font-weight: 400; font-size: 11px;line-height: 100%;color: #A4A4A4;\"> " + getMeasureType(seriesMeasure) + "</p>\n <p style=\"margin: 0;margin-left: 6px; white-space: pre-line; font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #A4A4A4;\">" + getTooltipValue(value, seriesMeasure) + "</p>\n " + getPieDonutToolTipPercentage(widget, seriesMeasure, groupbyId, secGroupbyId) + " </div> ";
2113
2271
 
2114
2272
  if (RenderStackedChartTotalsAndPercentages(widget, seriesMeasure)) {
2115
2273
  customToolTip += "<div>\n\n <hr style=\"margin-top: 6px;border-top: 1px solid #F0F0F0;\">\n\n <div style=\"display: flex; flex-direction: column; gap: 6px; flex-d align-items: center;margin:0;margin-top: 6px;\">\n <p style=\"margin: 0;font-family: 'Manrope'; white-space: pre-line; font-style: normal;font-weight: 400; font-size: 11px;line-height: 100%;color: #A4A4A4;\"> " + getGroupValuePercentage(seriesMeasure, groupbyId, secGroupbyId) + "</p>\n </div>\n\n <hr style=\"margin-top: 6px;border-top: 1px solid #F0F0F0;\">\n\n <div style=\"display: flex; flex-direction: column; gap: 6px; flex-d align-items: center;margin:0;margin-top: 6px;\">\n <p style=\"margin: 0;white-space: pre-line; font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #A4A4A4;\">" + getSumOfGroupValues(seriesMeasure, groupbyId) + "</p>\n </div>\n\n </div>";
@@ -2124,36 +2282,57 @@ function RenderStackedChartTotalsAndPercentages(widget, seriesMeasures) {
2124
2282
  return false;
2125
2283
  }
2126
2284
 
2127
- return widget.IsStacked && (seriesMeasures.MeasureCode === "Count" || seriesMeasures.MeasureCode === "Sum");
2285
+ return widget.IsStacked && (seriesMeasures.MeasureCode === MeasureCode.Count || seriesMeasures.MeasureCode === MeasureCode.Sum);
2128
2286
  }
2129
2287
 
2130
2288
  function getGroupValuePercentage(seriesMeasures, groupbyId, secGroupbyId) {
2131
- var _seriesMeasures$Value;
2132
-
2133
2289
  if (!seriesMeasures) {
2134
2290
  return;
2135
2291
  }
2136
2292
 
2137
- var total = getSumOfGroupValuesAsNumber(seriesMeasures, groupbyId);
2138
- var value = (_seriesMeasures$Value = seriesMeasures.Values.filter(function (v) {
2293
+ var percentageValueInLocalFormat = getPercentageGroupValueAsNumber(seriesMeasures, groupbyId, secGroupbyId);
2294
+ return "<span style=\"margin-right:6px;\">Percentage:</span>" + percentageValueInLocalFormat + "%";
2295
+ }
2296
+
2297
+ function getSumOfGroupValues(seriesMeasure, groupbyId) {
2298
+ if (!seriesMeasure) {
2299
+ return "";
2300
+ }
2301
+
2302
+ var total = getSumOfGroupValuesAsNumber(seriesMeasure, groupbyId);
2303
+ return "<span style=\"margin-right:6px;\">Total:</span>" + getNumberInSystemLocalFormat(total, 2, 0);
2304
+ }
2305
+
2306
+ function getPercentageGroupValueAsNumber(seriesMeasure, groupbyId, secGroupbyId) {
2307
+ var _seriesMeasure$Values;
2308
+
2309
+ if (!seriesMeasure) {
2310
+ return;
2311
+ }
2312
+
2313
+ var total = getSumOfGroupValuesAsNumber(seriesMeasure, groupbyId);
2314
+ var value = (_seriesMeasure$Values = seriesMeasure.Values.filter(function (v) {
2139
2315
  return v.GroupById === groupbyId && v.GroupByIdSec === secGroupbyId;
2140
- })[0]) === null || _seriesMeasures$Value === void 0 ? void 0 : _seriesMeasures$Value.Value;
2141
- var percentageValueInLocalFormat = "0";
2316
+ })[0]) === null || _seriesMeasure$Values === void 0 ? void 0 : _seriesMeasure$Values.Value;
2317
+ var percentageValueInLocalFormat = "0.00";
2142
2318
 
2143
2319
  if (total !== 0 && value) {
2144
- percentageValueInLocalFormat = getNumberInSystemLocalFormat(value / total * 100, 2, true);
2320
+ percentageValueInLocalFormat = getNumberInSystemLocalFormat(value / total * 100, 2, 0, false);
2145
2321
  }
2146
2322
 
2147
- return "<span style=\"margin-right:6px;\">Percentage:</span>" + percentageValueInLocalFormat + "%";
2323
+ return percentageValueInLocalFormat;
2148
2324
  }
2149
2325
 
2150
- function getSumOfGroupValues(seriesMeasure, groupbyId) {
2326
+ function getSumOfValuesAsNumber(seriesMeasure) {
2151
2327
  if (!seriesMeasure) {
2152
- return "";
2328
+ return 0;
2153
2329
  }
2154
2330
 
2155
- var total = getSumOfGroupValuesAsNumber(seriesMeasure, groupbyId);
2156
- return "<span style=\"margin-right:6px;\">Total:</span>" + getNumberInSystemLocalFormat(total, 2, true);
2331
+ var total = 0;
2332
+ seriesMeasure.Values.forEach(function (v) {
2333
+ total += v.Value;
2334
+ });
2335
+ return total;
2157
2336
  }
2158
2337
 
2159
2338
  function getSumOfGroupValuesAsNumber(seriesMeasure, groupbyId) {
@@ -2170,9 +2349,35 @@ function getSumOfGroupValuesAsNumber(seriesMeasure, groupbyId) {
2170
2349
  return total;
2171
2350
  }
2172
2351
 
2173
- function getTooltipPercentage(widget) {
2352
+ function getPieDonutToolTipPercentage(widget, seriesMeasures, groupbyId, secGroupbyId) {
2174
2353
  if (widget.TypeCode != "donut" && widget.TypeCode != "pie") return "";
2175
- return "\n <p style=\"margin: 0;margin-left: 2px;font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #A4A4A4;flex: none; order: 1;flex-grow: 0;\">($percentValue)</p>\n ";
2354
+
2355
+ if (!seriesMeasures) {
2356
+ return "";
2357
+ }
2358
+
2359
+ var percentageValueInLocalFormat = getDonutPiePercentageGroupValueAsNumber(seriesMeasures, groupbyId, secGroupbyId);
2360
+ return "<p style=\"margin: 0;margin-left: 2px;font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #A4A4A4;flex: none; order: 1;flex-grow: 0;\">(" + percentageValueInLocalFormat + ")%</p>";
2361
+ }
2362
+
2363
+ function getDonutPiePercentageGroupValueAsNumber(seriesMeasure, groupbyId, secGroupbyId) {
2364
+ var _seriesMeasure$Values2;
2365
+
2366
+ if (!seriesMeasure) {
2367
+ return;
2368
+ }
2369
+
2370
+ var total = getSumOfValuesAsNumber(seriesMeasure);
2371
+ var value = (_seriesMeasure$Values2 = seriesMeasure.Values.filter(function (v) {
2372
+ return v.GroupById === groupbyId && v.GroupByIdSec === secGroupbyId;
2373
+ })[0]) === null || _seriesMeasure$Values2 === void 0 ? void 0 : _seriesMeasure$Values2.Value;
2374
+ var percentageValueInLocalFormat = "0.00";
2375
+
2376
+ if (total !== 0 && value) {
2377
+ percentageValueInLocalFormat = getNumberInSystemLocalFormat(value / total * 100, 2, 0, false);
2378
+ }
2379
+
2380
+ return percentageValueInLocalFormat;
2176
2381
  }
2177
2382
 
2178
2383
  function getTooltiplabel(value, seriesMeasure) {
@@ -2182,11 +2387,15 @@ function getTooltiplabel(value, seriesMeasure) {
2182
2387
  }
2183
2388
 
2184
2389
  function getTooltipValue(value, seriesMeasure) {
2185
- if (!isNullOrUndefined(value)) {
2186
- return seriesMeasure && seriesMeasure.MeasureFieldDataType == 'Percentage' ? getNumberInSystemLocalFormat(value) + "%" : getNumberInSystemLocalFormat(value);
2390
+ if (isNullOrUndefined(value)) {
2391
+ return '$dataValue';
2392
+ }
2393
+
2394
+ if (FieldDataType.isPercentage(seriesMeasure === null || seriesMeasure === void 0 ? void 0 : seriesMeasure.MeasureFieldDataType)) {
2395
+ return getNumberInSystemLocalFormat(value, 2, 0) + "%";
2187
2396
  }
2188
2397
 
2189
- return '$dataValue';
2398
+ return getNumberInSystemLocalFormat(value, 2, 0);
2190
2399
  }
2191
2400
 
2192
2401
  function getMeasureType(seriesMeasure) {
@@ -2250,9 +2459,9 @@ function buildDataSource(values, widget) {
2250
2459
  var data = [];
2251
2460
  if (!values || !values[0]) return data;
2252
2461
  var series = values[0];
2253
- data = series.Values.map(function (e, index) {
2462
+ data = series.Values.map(function (e) {
2254
2463
  var item = {
2255
- value: e.Value,
2464
+ value: getTruncatedValue(e.Value),
2256
2465
  label: getLabelFormatByDateGroupType(e.Label, widget, false),
2257
2466
  id: {
2258
2467
  GroupById: e.GroupById,
@@ -2260,7 +2469,7 @@ function buildDataSource(values, widget) {
2260
2469
  MeasureCode: series.MeasureCode,
2261
2470
  Formula: series.Formula
2262
2471
  },
2263
- tooltext: buildToolTip(widget, null, series, e.Label, 0)
2472
+ tooltext: buildToolTip(widget, e.Value, series, e.Label, 0, e.GroupById, e.GroupByIdSec)
2264
2473
  };
2265
2474
  return item;
2266
2475
  });
@@ -2272,7 +2481,7 @@ function buildDataSet(seriesMeasures, widget) {
2272
2481
  seriesMeasures.forEach(function (seriesMeasure) {
2273
2482
  var datas = seriesMeasure.Values.map(function (e, index) {
2274
2483
  return {
2275
- value: e.Value,
2484
+ value: getTruncatedValue(e.Value),
2276
2485
  id: {
2277
2486
  GroupById: e.GroupById,
2278
2487
  MeasureFieldId: seriesMeasure.MeasureFieldId,
@@ -2366,10 +2575,11 @@ function buildStackedGroupData(secGroup, series, widget) {
2366
2575
  uniqueGroups.forEach(function (group) {
2367
2576
  var _series$Values$find;
2368
2577
 
2578
+ var value = (_series$Values$find = series.Values.find(function (x) {
2579
+ return x.GroupById == group.code && x.GroupByIdSec == secGroup.code;
2580
+ })) === null || _series$Values$find === void 0 ? void 0 : _series$Values$find.Value;
2369
2581
  data.push({
2370
- value: (_series$Values$find = series.Values.find(function (x) {
2371
- return x.GroupById == group.code && x.GroupByIdSec == secGroup.code;
2372
- })) === null || _series$Values$find === void 0 ? void 0 : _series$Values$find.Value,
2582
+ value: getTruncatedValue(value),
2373
2583
  id: {
2374
2584
  GroupById: group.code,
2375
2585
  MeasureFieldId: series.MeasureFieldId,
@@ -2473,6 +2683,7 @@ var getGaugeObject = function getGaugeObject(data, widget) {
2473
2683
  chartInfo.manageResize = "1";
2474
2684
  chartInfo.valueBelowPivot = "1";
2475
2685
  chartInfo.showValue = "1";
2686
+ var value = !isNullOrUndefined(data) && !isNullOrUndefined(data === null || data === void 0 ? void 0 : data.Value) ? data === null || data === void 0 ? void 0 : data.Value : 0;
2476
2687
  fusionObject.dataSource = {
2477
2688
  "chart": chartInfo,
2478
2689
  "colorRange": {
@@ -2480,7 +2691,7 @@ var getGaugeObject = function getGaugeObject(data, widget) {
2480
2691
  },
2481
2692
  "dials": {
2482
2693
  "dial": [{
2483
- "value": !isNullOrUndefined(data) && !isNullOrUndefined(data === null || data === void 0 ? void 0 : data.Value) ? data === null || data === void 0 ? void 0 : data.Value : 0
2694
+ "value": getTruncatedValue(value)
2484
2695
  }]
2485
2696
  }
2486
2697
  };