logitude-dashboard-library 1.4.80 → 1.4.82
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/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +36 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -583,6 +583,14 @@ var TableChart = function TableChart(props) {
|
|
|
583
583
|
});
|
|
584
584
|
};
|
|
585
585
|
|
|
586
|
+
var getBooleanStringValue = function getBooleanStringValue(value) {
|
|
587
|
+
if (isNullOrUndefined(value)) return "";
|
|
588
|
+
|
|
589
|
+
var _value = value + "";
|
|
590
|
+
|
|
591
|
+
return _value.charAt(0).toUpperCase() + _value.slice(1);
|
|
592
|
+
};
|
|
593
|
+
|
|
586
594
|
var getDateTimeValue = function getDateTimeValue(value) {
|
|
587
595
|
if (!value) return value;
|
|
588
596
|
|
|
@@ -614,7 +622,7 @@ var TableChart = function TableChart(props) {
|
|
|
614
622
|
var key = field.FieldCode;
|
|
615
623
|
var valueType = field.DataTypeCode;
|
|
616
624
|
|
|
617
|
-
var _value = valueType && (valueType == "Date" || valueType == "DateTime") ? getDateTimeValue(item[key]) : item[key];
|
|
625
|
+
var _value = valueType && (valueType == "Date" || valueType == "DateTime") ? getDateTimeValue(item[key]) : valueType == "Boolean" ? getBooleanStringValue(item[key]) : item[key];
|
|
618
626
|
|
|
619
627
|
_tableRow.push({
|
|
620
628
|
value: _value
|
|
@@ -633,14 +641,14 @@ var TableChart = function TableChart(props) {
|
|
|
633
641
|
}, "No data to display.") : React__default.createElement("table", null, React__default.createElement("thead", null, React__default.createElement("tr", null, tableData[0].map(function (el) {
|
|
634
642
|
return React__default.createElement("th", {
|
|
635
643
|
key: el.value
|
|
636
|
-
}, el.value ? el.value : '');
|
|
644
|
+
}, !isNullOrUndefined(el.value) ? el.value + "" : '');
|
|
637
645
|
}))), React__default.createElement("tbody", null, tableData.map(function (el, index) {
|
|
638
646
|
return index == 0 ? null : React__default.createElement("tr", {
|
|
639
647
|
key: index
|
|
640
648
|
}, el.map(function (item, index2) {
|
|
641
649
|
return React__default.createElement("td", {
|
|
642
650
|
key: index2 + "_" + el.value
|
|
643
|
-
}, item.value ? item.value : '');
|
|
651
|
+
}, !isNullOrUndefined(item.value) ? item.value + "" : '');
|
|
644
652
|
}));
|
|
645
653
|
})));
|
|
646
654
|
};
|
|
@@ -733,7 +741,7 @@ function getSeriesPositionColor(position) {
|
|
|
733
741
|
|
|
734
742
|
function buildToolTip(widget, value, seriesName, label, index) {
|
|
735
743
|
var padding = widget.TypeCode == 'line' && index > 0 ? 'padding-top: 3px' : '';
|
|
736
|
-
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:
|
|
744
|
+
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 ";
|
|
737
745
|
}
|
|
738
746
|
|
|
739
747
|
function getTooltipPercentage(widget) {
|
|
@@ -1529,12 +1537,6 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
1529
1537
|
});
|
|
1530
1538
|
};
|
|
1531
1539
|
|
|
1532
|
-
var renderComplete = function renderComplete(chart) {
|
|
1533
|
-
setFchart(chart);
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
var drawComplete = function drawComplete(event) {};
|
|
1537
|
-
|
|
1538
1540
|
var _useResizeObserver = useResizeObserver({
|
|
1539
1541
|
onResize: function onResize(_ref) {
|
|
1540
1542
|
var width = _ref.width,
|
|
@@ -1544,6 +1546,29 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
1544
1546
|
}),
|
|
1545
1547
|
ref = _useResizeObserver.ref;
|
|
1546
1548
|
|
|
1549
|
+
var renderComplete = function renderComplete(chart) {
|
|
1550
|
+
setFchart(chart);
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
var dataplotRollOver = function dataplotRollOver(event, plotObj) {
|
|
1554
|
+
var chartData = event.sender.getChartData();
|
|
1555
|
+
var plotColor = plotObj.color;
|
|
1556
|
+
|
|
1557
|
+
if (chartData && chartData.dataset && chartData.dataset.length) {
|
|
1558
|
+
chartData.dataset.forEach(function (el, index) {
|
|
1559
|
+
if (index == plotObj.datasetIndex) {
|
|
1560
|
+
el.data.forEach(function (item, index2) {
|
|
1561
|
+
if (plotObj.dataIndex == index2 && item.tooltext && item.tooltext.replace) {
|
|
1562
|
+
item.tooltext = item.tooltext.replace("transparent", plotColor);
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
event.sender.setChartData(chartData);
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1547
1572
|
return !dataLoaded ? React__default.createElement("div", {
|
|
1548
1573
|
ref: progressRef,
|
|
1549
1574
|
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
@@ -1565,7 +1590,7 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
1565
1590
|
}, React__default.createElement(ReactFC, Object.assign({}, args, {
|
|
1566
1591
|
"fcEvent-dataplotClick": dataplotClick,
|
|
1567
1592
|
onRender: renderComplete,
|
|
1568
|
-
"fcEvent-
|
|
1593
|
+
"fcEvent-dataplotRollOver": dataplotRollOver
|
|
1569
1594
|
})))) : React__default.createElement("div", {
|
|
1570
1595
|
className: "dl-flex-content-center dl-full-hight",
|
|
1571
1596
|
style: {
|