logitude-dashboard-library 3.1.14 → 3.1.16

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.
@@ -872,4 +872,8 @@ $dark-grey: #717585;
872
872
  .title-tooltip-container-content > div {
873
873
  width: 8px !important;
874
874
  height: 4px !important;
875
+ }
876
+
877
+ .fc__tooltip {
878
+ max-width: 350px !important;
875
879
  }
package/dist/index.js CHANGED
@@ -474,9 +474,10 @@ var KpiChart = function KpiChart(props) {
474
474
  }
475
475
 
476
476
  function getPreviousValueComponent() {
477
- if (isNullOrUndefined(data) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonValue)) return "";
478
- var labelFormated = getLabelFormatByDateGroupType(data.ComparisonLabel, widget.current, false);
479
- var prevtext = labelFormated + ": " + (data === null || data === void 0 ? void 0 : data.ComparisonValue);
477
+ if (isNullOrUndefined(data) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonValue) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonLabel)) return "";
478
+ var labelFormatByDateGroupType = getLabelFormatByDateGroupType(data.ComparisonLabel, widget.current, false);
479
+ var labelFormated = !isNullOrUndefined(labelFormatByDateGroupType) ? labelFormatByDateGroupType : null;
480
+ var prevtext = labelFormated ? labelFormated + ": " + (data === null || data === void 0 ? void 0 : data.ComparisonValue) : "";
480
481
  return React__default.createElement("div", {
481
482
  className: "dl-kpi-prev-container"
482
483
  }, React__default.createElement("div", {
@@ -717,7 +718,7 @@ var CustomChart = function CustomChart(props) {
717
718
 
718
719
  function buildToolTip(widget, value, seriesName, label, index) {
719
720
  var padding = widget.TypeCode == 'line' && index > 0 ? 'padding-top: 3px' : '';
720
- return "\n <div style=\"min-width: 108px;" + padding + "\">\n <div style=\"display: flex;align-items: center;margin-bottom: 6px;\">\n <span style=\"margin: 0; height: 10px; width: 10px; background-color: transparent; border-radius: 50%; display: inline-block;\"></span>\n <p style=\" margin: 0; margin-left: 4px;font-family: 'Manrope'; font-style: normal;font-weight: 400; font-size: 11px; line-height: 100%; color: #323232; flex: none; order: 1;flex-grow: 0;\"> " + getTooltiplabel(label) + "</p>\n </div>\n <hr style=\"margin: 0;border-top: 1px solid #F0F0F0;\">\n <div style=\"display: flex;align-items: center;margin:0;margin-top: 6px;\">\n <p style=\"margin: 0;font-family: 'Manrope';font-style: normal;font-weight: 400; font-size: 11px;line-height: 100%;color: #A4A4A4;flex: none;order: 0;flex-grow: 0;\"> " + getMeasureType(seriesName) + "</p>\n <p style=\"margin: 0;margin-left: 6px;font-family: 'Manrope';font-style: normal;font-weight: 500;font-size: 11px;line-height: 100%; color: #323232;flex: none; order: 1;flex-grow: 0;\">" + getTooltipValue(value) + "</p>\n " + getTooltipPercentage(widget) + " </div>\n </div>\n ";
721
+ return "\n <div style=\"min-width: 108px;" + padding + "\">\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, seriesName) + "</p>\n </div>\n <hr style=\"margin: 0;border-top: 1px solid #F0F0F0;\">\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(seriesName) + "</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: #323232;\">" + getTooltipValue(value) + "</p>\n " + getTooltipPercentage(widget) + " </div>\n </div>\n ";
721
722
  }
722
723
 
723
724
  function getTooltipPercentage(widget) {
@@ -725,8 +726,9 @@ function getTooltipPercentage(widget) {
725
726
  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 ";
726
727
  }
727
728
 
728
- function getTooltiplabel(value) {
729
+ function getTooltiplabel(value, seriesMeasure) {
729
730
  if (value) return value;
731
+ if (seriesMeasure && seriesMeasure.Name) return '$label' + " - " + seriesMeasure.Name;
730
732
  return '$label';
731
733
  }
732
734