logitude-dashboard-library 3.1.13 → 3.1.15

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,10 +474,9 @@ var KpiChart = function KpiChart(props) {
474
474
  }
475
475
 
476
476
  function getPreviousValueComponent() {
477
- if (!(data !== null && data !== void 0 && data.CompareWithPrevious)) return null;
478
- var prevtext = !(data !== null && data !== void 0 && data.ComparisonValue) ? '' : data === null || data === void 0 ? void 0 : data.ComparisonValue;
477
+ if (isNullOrUndefined(data) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonValue)) return "";
479
478
  var labelFormated = getLabelFormatByDateGroupType(data.ComparisonLabel, widget.current, false);
480
- prevtext = labelFormated + ": " + prevtext;
479
+ var prevtext = labelFormated + ": " + (data === null || data === void 0 ? void 0 : data.ComparisonValue);
481
480
  return React__default.createElement("div", {
482
481
  className: "dl-kpi-prev-container"
483
482
  }, React__default.createElement("div", {
@@ -718,7 +717,7 @@ var CustomChart = function CustomChart(props) {
718
717
 
719
718
  function buildToolTip(widget, value, seriesName, label, index) {
720
719
  var padding = widget.TypeCode == 'line' && index > 0 ? 'padding-top: 3px' : '';
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; 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 ";
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; 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 ";
722
721
  }
723
722
 
724
723
  function getTooltipPercentage(widget) {
@@ -726,8 +725,9 @@ function getTooltipPercentage(widget) {
726
725
  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 ";
727
726
  }
728
727
 
729
- function getTooltiplabel(value) {
728
+ function getTooltiplabel(value, seriesMeasure) {
730
729
  if (value) return value;
730
+ if (seriesMeasure && seriesMeasure.Name) return '$label' + " - " + seriesMeasure.Name;
731
731
  return '$label';
732
732
  }
733
733