logitude-dashboard-library 3.1.21 → 3.1.23

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.
@@ -674,8 +674,7 @@ $dark-grey: #717585;
674
674
  font-size: 20px;
675
675
  line-height: 125%;
676
676
  color: #292D30;
677
- margin-left: 4.5px;
678
- margin-bottom: 2px;
677
+ margin-left: 5px;
679
678
  }
680
679
 
681
680
  .dl-kpi-abbreviationSymbol {
@@ -686,7 +685,6 @@ $dark-grey: #717585;
686
685
  line-height: 111%;
687
686
  color: #292D30;
688
687
  margin-left: 1px;
689
- margin-bottom: 2px;
690
688
  }
691
689
 
692
690
  .dl-kpi-ratio-container {
package/dist/index.js CHANGED
@@ -422,13 +422,13 @@ var KpiChart = function KpiChart(props) {
422
422
  var formatedValue = data ? data.ComparisonLabel : "";
423
423
  var comparisonValue = data ? data === null || data === void 0 ? void 0 : data.ComparisonValue : "";
424
424
  return React__default.createElement("div", {
425
+ title: formatedValue,
425
426
  className: "dl-kpi-prev-container"
426
427
  }, React__default.createElement("div", {
427
428
  style: {
428
429
  color: getKPIFormattingPropertyValue("ComparisonValueFontColor"),
429
430
  fontSize: getKPIFormattingPropertyValue("ComparisonValueFontSize", "px")
430
431
  },
431
- title: formatedValue,
432
432
  className: "dl-kpi-prev-text"
433
433
  }, comparisonValue), (data === null || data === void 0 ? void 0 : data.ComparisonAbbreviationSymbol) && React__default.createElement("div", {
434
434
  style: {
@@ -436,7 +436,13 @@ var KpiChart = function KpiChart(props) {
436
436
  fontSize: getKPIFormattingPropertyValue("ComparisonValueFontSize", "px")
437
437
  },
438
438
  className: "dl-kpi-prev-abbreviationSymbol"
439
- }, data === null || data === void 0 ? void 0 : data.ComparisonAbbreviationSymbol));
439
+ }, data === null || data === void 0 ? void 0 : data.ComparisonAbbreviationSymbol), widget.current && widget.current.ShowMeasureUnit && (data === null || data === void 0 ? void 0 : data.Unit) && React__default.createElement("div", {
440
+ style: {
441
+ color: getKPIFormattingPropertyValue("ComparisonValueFontColor"),
442
+ fontSize: getKPIFormattingPropertyValue("ComparisonValueFontSize", "px")
443
+ },
444
+ className: "dl-kpi-unit"
445
+ }, data === null || data === void 0 ? void 0 : data.Unit));
440
446
  }
441
447
 
442
448
  function getValueData() {
@@ -482,7 +488,8 @@ var KpiChart = function KpiChart(props) {
482
488
  if (widget.current && widget.current.KPIComparisonSettings && widget.current.KPIComparisonSettings.length) {
483
489
  var kpiSettings = JSON.parse(widget.current.KPIComparisonSettings);
484
490
  var PeriodDateFilter = kpiSettings ? kpiSettings.PeriodDateFilter : null;
485
- return PeriodDateFilter && PeriodDateFilter.DateTimeValueCode ? getPeriodLabelByPeriodCode(PeriodDateFilter.DateTimeValueCode) : "";
491
+ var isKPISettingsActivated = !isNullOrUndefinedOrEmpty(kpiSettings.PeriodFieldId);
492
+ return isKPISettingsActivated && PeriodDateFilter && PeriodDateFilter.DateTimeValueCode ? getPeriodLabelByPeriodCode(PeriodDateFilter.DateTimeValueCode) : "";
486
493
  }
487
494
 
488
495
  return "";