logitude-dashboard-library 1.4.29 → 1.4.31
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/assets/styles/dl-dashboard.scss +5 -4
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/KpiChart.d.ts +0 -1
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartObjectHelper.d.ts +3 -0
- package/dist/index.js +25 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +25 -12
- package/dist/index.modern.js.map +1 -1
- package/dist/services/DashboardAnalyticsService.d.ts +2 -2
- package/dist/types/KpiChart.d.ts +1 -1
- package/package.json +1 -1
|
@@ -454,14 +454,14 @@ $dark-grey: #717585;
|
|
|
454
454
|
.db-fc-container text {
|
|
455
455
|
font-family: 'Manrope' !important;
|
|
456
456
|
font-size: 10px !important;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
font-family: 'Manrope' !important;
|
|
460
|
-
font-size: 10px !important;
|
|
457
|
+
fill: #323232 !important;
|
|
458
|
+
fill-opacity: 100 !important;
|
|
461
459
|
}
|
|
462
460
|
.db-fc-container tspan {
|
|
463
461
|
font-family: 'Manrope' !important;
|
|
464
462
|
font-size: 10px !important;
|
|
463
|
+
fill: #323232 !important;
|
|
464
|
+
fill-opacity: 100 !important;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
.db-fc-container * {
|
|
@@ -567,6 +567,7 @@ $dark-grey: #717585;
|
|
|
567
567
|
margin-left: 4.5px;
|
|
568
568
|
margin-bottom: 6px;
|
|
569
569
|
flex-shrink: 0;
|
|
570
|
+
margin-right: 12px;
|
|
570
571
|
}
|
|
571
572
|
|
|
572
573
|
.dl-kpi-ratio-text {
|
|
@@ -42,6 +42,9 @@ export interface ChartInfo {
|
|
|
42
42
|
enableSmartLabels: string;
|
|
43
43
|
pieRadius: string;
|
|
44
44
|
doughnutRadius: string;
|
|
45
|
+
baseFontColor: string;
|
|
46
|
+
legendCaptionFontColor: string;
|
|
47
|
+
labelFontColor: string;
|
|
45
48
|
}
|
|
46
49
|
export declare function getSeriesPositionColor(position: number): string | null;
|
|
47
50
|
export declare function getSeriesHoverPositionColor(position: number): string | null;
|
package/dist/index.js
CHANGED
|
@@ -229,6 +229,14 @@ var KpiChart = function KpiChart(props) {
|
|
|
229
229
|
}, []);
|
|
230
230
|
|
|
231
231
|
var RefreshData = function RefreshData() {
|
|
232
|
+
if (Session.Tenant == 0) {
|
|
233
|
+
var emptyData = {};
|
|
234
|
+
emptyData.Value = 0;
|
|
235
|
+
setData(emptyData);
|
|
236
|
+
setDataLoaded(true);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
232
240
|
var dashboardAnalyticsService = new DashboardAnalyticsService();
|
|
233
241
|
|
|
234
242
|
var postWidget = _extends({}, widget.current);
|
|
@@ -628,6 +636,7 @@ function getUniqueGroupOrderdList(series) {
|
|
|
628
636
|
|
|
629
637
|
var defautFontSize = "10";
|
|
630
638
|
var defautFont = "Manrope";
|
|
639
|
+
var defautColor = "#323232";
|
|
631
640
|
function BuildFusionChartObject(seriesMeasures, widget) {
|
|
632
641
|
switch (widget === null || widget === void 0 ? void 0 : widget.TypeCode) {
|
|
633
642
|
case 'bar':
|
|
@@ -655,8 +664,6 @@ function getBarObject(seriesMeasures, widget) {
|
|
|
655
664
|
var chart = getDefaultChartobject();
|
|
656
665
|
chart.type = "scrollbar2d";
|
|
657
666
|
var chartInfo = getDefaultChartInfo();
|
|
658
|
-
chartInfo.scrollHeight = "5";
|
|
659
|
-
chartInfo.scrollWidth = "5";
|
|
660
667
|
chartInfo.scrollPadding = "8";
|
|
661
668
|
chartInfo.flatScrollBars = "1";
|
|
662
669
|
chartInfo.showPercentValues = "1";
|
|
@@ -674,8 +681,6 @@ function getStackedBarObject(seriesMeasures, widget) {
|
|
|
674
681
|
var chart = getDefaultChartobject();
|
|
675
682
|
chart.type = "scrollstackedbar2d";
|
|
676
683
|
var chartInfo = getDefaultChartInfo();
|
|
677
|
-
chartInfo.scrollHeight = "5";
|
|
678
|
-
chartInfo.scrollWidth = "5";
|
|
679
684
|
chartInfo.scrollPadding = "8";
|
|
680
685
|
chartInfo.flatScrollBars = "1";
|
|
681
686
|
chartInfo.showPercentValues = "1";
|
|
@@ -694,8 +699,6 @@ function getLineObject(seriesMeasures, widget) {
|
|
|
694
699
|
var chart = getDefaultChartobject();
|
|
695
700
|
chart.type = "scrollline2d";
|
|
696
701
|
var chartInfo = getDefaultChartInfo();
|
|
697
|
-
chartInfo.scrollHeight = "5";
|
|
698
|
-
chartInfo.scrollWidth = "5";
|
|
699
702
|
chartInfo.scrollPadding = "8";
|
|
700
703
|
chartInfo.flatScrollBars = "1";
|
|
701
704
|
chartInfo.showPercentValues = "1";
|
|
@@ -755,8 +758,6 @@ function getColumnObject(seriesMeasures, widget) {
|
|
|
755
758
|
var chart = getDefaultChartobject();
|
|
756
759
|
chart.type = "scrollcombi2d";
|
|
757
760
|
var chartInfo = getDefaultChartInfo();
|
|
758
|
-
chartInfo.scrollHeight = "5";
|
|
759
|
-
chartInfo.scrollWidth = "5";
|
|
760
761
|
chartInfo.scrollPadding = "8";
|
|
761
762
|
chartInfo.flatScrollBars = "1";
|
|
762
763
|
chartInfo.showPercentValues = "1";
|
|
@@ -796,9 +797,12 @@ function getDefaultChartInfo(widget) {
|
|
|
796
797
|
chart.theme = "fusion";
|
|
797
798
|
chart.baseFont = defautFont;
|
|
798
799
|
chart.baseFontSize = defautFontSize;
|
|
800
|
+
chart.baseFontColor = defautColor;
|
|
799
801
|
chart.legendCaptionFontSize = defautFontSize;
|
|
802
|
+
chart.legendCaptionFontColor = defautColor;
|
|
800
803
|
chart.legendCaptionFont = defautFont;
|
|
801
804
|
chart.labelFontSize = defautFontSize;
|
|
805
|
+
chart.labelFontColor = defautColor;
|
|
802
806
|
chart.labelFont = defautFont;
|
|
803
807
|
chart.enableSlicing = "0";
|
|
804
808
|
chart.enableRotation = "0";
|
|
@@ -808,6 +812,8 @@ function getDefaultChartInfo(widget) {
|
|
|
808
812
|
chart.chartRightMargin = "40";
|
|
809
813
|
chart.toolTipBgColor = "#FFFFFF";
|
|
810
814
|
chart.showToolTipShadow = "1";
|
|
815
|
+
chart.scrollHeight = "6";
|
|
816
|
+
chart.scrollWidth = "6";
|
|
811
817
|
return chart;
|
|
812
818
|
}
|
|
813
819
|
|
|
@@ -831,7 +837,9 @@ var FusionChartHelper = /*#__PURE__*/function () {
|
|
|
831
837
|
var chartMinumunHeight = 236;
|
|
832
838
|
var startPercantage = 70;
|
|
833
839
|
var stepHeight = 60;
|
|
834
|
-
var
|
|
840
|
+
var dataSource = (_this$chart = this.chart) === null || _this$chart === void 0 ? void 0 : _this$chart.dataSource;
|
|
841
|
+
if (!dataSource) return;
|
|
842
|
+
var chartInfo = dataSource.chart;
|
|
835
843
|
var step = Math.floor((chartHeight - chartMinumunHeight) / stepHeight);
|
|
836
844
|
if (step < 0) step = 0;
|
|
837
845
|
var pieRadius = startPercantage - step * 10;
|
|
@@ -928,13 +936,18 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
928
936
|
};
|
|
929
937
|
|
|
930
938
|
var RefreshData = function RefreshData() {
|
|
939
|
+
if (Session.Tenant == 0) {
|
|
940
|
+
handleData(null);
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
|
|
931
944
|
var dashboardAnalyticsService = new DashboardAnalyticsService();
|
|
932
945
|
|
|
933
946
|
var postWidget = _extends({}, widget.current);
|
|
934
947
|
|
|
935
948
|
postWidget.onChange = undefined;
|
|
936
949
|
dashboardAnalyticsService.getData(postWidget).then(function (result) {
|
|
937
|
-
handleData(result);
|
|
950
|
+
handleData(result === null || result === void 0 ? void 0 : result.data);
|
|
938
951
|
}, function (error) {
|
|
939
952
|
var _error$response, _error$response$data, _error$response2, _error$response2$data;
|
|
940
953
|
|
|
@@ -944,10 +957,10 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
944
957
|
});
|
|
945
958
|
};
|
|
946
959
|
|
|
947
|
-
var handleData = function handleData(
|
|
960
|
+
var handleData = function handleData(data) {
|
|
948
961
|
var _progressRef$current, _progressRef$current2;
|
|
949
962
|
|
|
950
|
-
var chart = BuildFusionChartObject(
|
|
963
|
+
var chart = BuildFusionChartObject(data, widget.current);
|
|
951
964
|
fusionChartHelper.current = new FusionChartHelper(widget.current, chart);
|
|
952
965
|
fusionChartHelper === null || fusionChartHelper === void 0 ? void 0 : fusionChartHelper.current.trimChartLabels(progressRef === null || progressRef === void 0 ? void 0 : (_progressRef$current = progressRef.current) === null || _progressRef$current === void 0 ? void 0 : _progressRef$current.offsetWidth, progressRef === null || progressRef === void 0 ? void 0 : (_progressRef$current2 = progressRef.current) === null || _progressRef$current2 === void 0 ? void 0 : _progressRef$current2.offsetHeight);
|
|
953
966
|
setArgs(chart);
|