logitude-dashboard-library 3.1.102 → 3.1.103
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 +31 -2
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartObjectBuilder.d.ts +1 -1
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartObjectHelper.d.ts +2 -0
- package/dist/index.js +73 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +73 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +31 -2
- package/dist/types/widget.d.ts +2 -0
- package/package.json +1 -1
|
@@ -658,12 +658,12 @@ $dark-grey: #717585;
|
|
|
658
658
|
font-weight: bold;
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
.db-fc-container {
|
|
661
|
+
.db-fc-parent-container {
|
|
662
662
|
width: 100%;
|
|
663
663
|
height: calc(100% - 5px);
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
.db-fc-
|
|
666
|
+
.db-fc-container {
|
|
667
667
|
width: 100%;
|
|
668
668
|
height: calc(100% - 5px);
|
|
669
669
|
}
|
|
@@ -674,6 +674,7 @@ $dark-grey: #717585;
|
|
|
674
674
|
fill: #323232 !important;
|
|
675
675
|
fill-opacity: 100 !important;
|
|
676
676
|
}
|
|
677
|
+
|
|
677
678
|
.db-fc-container tspan {
|
|
678
679
|
font-family: 'Manrope' !important;
|
|
679
680
|
font-size: inherit !important;
|
|
@@ -691,6 +692,34 @@ $dark-grey: #717585;
|
|
|
691
692
|
height: 100%;
|
|
692
693
|
}
|
|
693
694
|
|
|
695
|
+
.db-fc-container-guage {
|
|
696
|
+
width: 100%;
|
|
697
|
+
height: calc(100% - 5px);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.db-fc-container-guage text {
|
|
701
|
+
font-family: 'Manrope' !important;
|
|
702
|
+
font-size: inherit !important;
|
|
703
|
+
fill-opacity: 100 !important;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.db-fc-container-guage tspan {
|
|
707
|
+
font-family: 'Manrope' !important;
|
|
708
|
+
font-size: inherit !important;
|
|
709
|
+
fill: #323232 !important;
|
|
710
|
+
fill-opacity: 100 !important;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.db-fc-container-guage * {
|
|
714
|
+
font-family: 'Manrope' !important;
|
|
715
|
+
// font-size: 10px !important;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.db-fc-container-guage>*:first-child {
|
|
719
|
+
width: 100%;
|
|
720
|
+
height: 100%;
|
|
721
|
+
}
|
|
722
|
+
|
|
694
723
|
.dl-line {
|
|
695
724
|
border-top: 1px solid #E7E7E7;
|
|
696
725
|
margin-left: 12px;
|
|
@@ -2,4 +2,4 @@ import { ChartObject } from "fusioncharts";
|
|
|
2
2
|
import { SeriesMeasure } from "../../../../types/SeriesMeasure";
|
|
3
3
|
import { ReactWidgetPM } from "../../../../types/widget";
|
|
4
4
|
export declare function BuildFusionChartObject(seriesMeasures: SeriesMeasure[], widget: ReactWidgetPM): ChartObject;
|
|
5
|
-
export declare const getGaugeObject: (data: any, widget: ReactWidgetPM) => ChartObject;
|
|
5
|
+
export declare const getGaugeObject: (data: any, widget: ReactWidgetPM, isPreviewModeActive?: boolean | undefined) => ChartObject;
|
|
@@ -93,6 +93,8 @@ export interface ChartInfo {
|
|
|
93
93
|
manageResize: string | null;
|
|
94
94
|
valueBelowPivot: string | null;
|
|
95
95
|
showValue: string | null;
|
|
96
|
+
valueFontSize: string | null;
|
|
97
|
+
valueFontColor: string | null;
|
|
96
98
|
autoScale: string | null;
|
|
97
99
|
formatNumber: string | null;
|
|
98
100
|
forceDecimals: string | null;
|
package/dist/index.js
CHANGED
|
@@ -2701,13 +2701,15 @@ var getWidgetRanges = function getWidgetRanges(widget, value) {
|
|
|
2701
2701
|
return gaugeRanges;
|
|
2702
2702
|
};
|
|
2703
2703
|
|
|
2704
|
-
var getGaugeObject = function getGaugeObject(data, widget) {
|
|
2704
|
+
var getGaugeObject = function getGaugeObject(data, widget, isPreviewModeActive) {
|
|
2705
2705
|
var fusionObject = getDefaultChartobject();
|
|
2706
2706
|
fusionObject.type = 'angulargauge';
|
|
2707
2707
|
var chartInfo = getDefaultChartInfo(widget);
|
|
2708
2708
|
chartInfo.manageResize = "1";
|
|
2709
2709
|
chartInfo.valueBelowPivot = "1";
|
|
2710
|
-
chartInfo.showValue = "1";
|
|
2710
|
+
chartInfo.showValue = widget.ShowValue ? "1" : '0';
|
|
2711
|
+
chartInfo.valueFontSize = widget.ShowValue ? widget.ValueFontSize : null;
|
|
2712
|
+
chartInfo.valueFontColor = widget.ShowValue ? widget.ValueFontColor : null;
|
|
2711
2713
|
chartInfo.autoScale = "1";
|
|
2712
2714
|
chartInfo.chartTopMargin = "0";
|
|
2713
2715
|
chartInfo.chartBottomMargin = "0";
|
|
@@ -2721,7 +2723,8 @@ var getGaugeObject = function getGaugeObject(data, widget) {
|
|
|
2721
2723
|
},
|
|
2722
2724
|
"dials": {
|
|
2723
2725
|
"dial": [{
|
|
2724
|
-
"value": getTruncatedValue(value, widget)
|
|
2726
|
+
"value": getTruncatedValue(value, widget),
|
|
2727
|
+
"tooltext": !isPreviewModeActive ? "Click for more details" : null
|
|
2725
2728
|
}]
|
|
2726
2729
|
}
|
|
2727
2730
|
};
|
|
@@ -3811,7 +3814,7 @@ var FusionChart$1 = React.forwardRef(function (props, comRef) {
|
|
|
3811
3814
|
isDummyChange = false;
|
|
3812
3815
|
}
|
|
3813
3816
|
|
|
3814
|
-
var chart = getGaugeObject(data, widget.current);
|
|
3817
|
+
var chart = getGaugeObject(data, widget.current, props.isPreviewModeActive);
|
|
3815
3818
|
setArgs(chart);
|
|
3816
3819
|
|
|
3817
3820
|
if (!isDummyChange) {
|
|
@@ -3823,6 +3826,67 @@ var FusionChart$1 = React.forwardRef(function (props, comRef) {
|
|
|
3823
3826
|
}
|
|
3824
3827
|
};
|
|
3825
3828
|
|
|
3829
|
+
var dataplotClick = function dataplotClick(eventObj, dataObj) {
|
|
3830
|
+
props.onSelectDataPoint({
|
|
3831
|
+
GroupById: dataObj.id.groupbyid,
|
|
3832
|
+
MeasureFieldId: dataObj.id.measurefieldid,
|
|
3833
|
+
MeasureCode: dataObj.id.measurecode,
|
|
3834
|
+
Formula: dataObj.id.formula,
|
|
3835
|
+
Widget: widget.current,
|
|
3836
|
+
GroupByIdSec: dataObj.id.groupbyidsec
|
|
3837
|
+
});
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3840
|
+
var renderComplete = function renderComplete(eventObj) {
|
|
3841
|
+
var chartRef = eventObj.sender;
|
|
3842
|
+
var chartContainer = FusionCharts.getObjectReference(chartRef.id);
|
|
3843
|
+
|
|
3844
|
+
if (!chartContainer) {
|
|
3845
|
+
console.error('Chart container is undefined');
|
|
3846
|
+
return;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
var svgContainer = chartContainer.querySelector('svg');
|
|
3850
|
+
|
|
3851
|
+
if (!svgContainer) {
|
|
3852
|
+
console.error('SVG Container is undefined');
|
|
3853
|
+
return;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
var textElements = svgContainer.querySelectorAll('text');
|
|
3857
|
+
|
|
3858
|
+
if (textElements.length > 0) {
|
|
3859
|
+
var lastTextElement = textElements[textElements.length - 1];
|
|
3860
|
+
|
|
3861
|
+
if (!props.isPreviewModeActive) {
|
|
3862
|
+
lastTextElement.style.cursor = 'pointer';
|
|
3863
|
+
lastTextElement.style.transition = 'fill 0.2s, text-decoration 0.2s';
|
|
3864
|
+
lastTextElement.addEventListener('mouseenter', function () {
|
|
3865
|
+
lastTextElement.style.fill = '#007bff';
|
|
3866
|
+
lastTextElement.style.textDecoration = 'underline';
|
|
3867
|
+
});
|
|
3868
|
+
lastTextElement.addEventListener('mouseleave', function () {
|
|
3869
|
+
lastTextElement.style.fill = '';
|
|
3870
|
+
lastTextElement.style.textDecoration = 'none';
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
lastTextElement.addEventListener('click', function () {
|
|
3875
|
+
var _widget$current2, _widget$current3, _widget$current4, _widget$current4$Widg;
|
|
3876
|
+
|
|
3877
|
+
var measureFieldId;
|
|
3878
|
+
var currentWidgetMeasure = widget === null || widget === void 0 ? void 0 : (_widget$current2 = widget.current) === null || _widget$current2 === void 0 ? void 0 : _widget$current2.WidgetMeasures[0];
|
|
3879
|
+
if (widget !== null && widget !== void 0 && (_widget$current3 = widget.current) !== null && _widget$current3 !== void 0 && _widget$current3.WidgetMeasures) measureFieldId = widget === null || widget === void 0 ? void 0 : (_widget$current4 = widget.current) === null || _widget$current4 === void 0 ? void 0 : (_widget$current4$Widg = _widget$current4.WidgetMeasures[0]) === null || _widget$current4$Widg === void 0 ? void 0 : _widget$current4$Widg.MeasureFieldId;
|
|
3880
|
+
props.onSelectDataPoint({
|
|
3881
|
+
MeasureFieldId: measureFieldId,
|
|
3882
|
+
Widget: widget.current,
|
|
3883
|
+
MeasureCode: currentWidgetMeasure.MeasureCode,
|
|
3884
|
+
Formula: currentWidgetMeasure.Formula
|
|
3885
|
+
});
|
|
3886
|
+
});
|
|
3887
|
+
}
|
|
3888
|
+
};
|
|
3889
|
+
|
|
3826
3890
|
return !dataLoaded ? React__default.createElement("div", {
|
|
3827
3891
|
ref: progressRef,
|
|
3828
3892
|
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
@@ -3837,10 +3901,13 @@ var FusionChart$1 = React.forwardRef(function (props, comRef) {
|
|
|
3837
3901
|
className: 'db-fc-parent-container',
|
|
3838
3902
|
ref: fusionRef
|
|
3839
3903
|
}, React__default.createElement("div", {
|
|
3840
|
-
className: 'db-fc-container',
|
|
3904
|
+
className: 'db-fc-container-guage',
|
|
3841
3905
|
key: fusionKey,
|
|
3842
3906
|
id: chartContainerId
|
|
3843
|
-
}, React__default.createElement(ReactFC, Object.assign({}, args
|
|
3907
|
+
}, React__default.createElement(ReactFC, Object.assign({}, args, {
|
|
3908
|
+
"fcEvent-dataplotClick": dataplotClick,
|
|
3909
|
+
"fcEvent-renderComplete": renderComplete
|
|
3910
|
+
})))) : React__default.createElement("div", {
|
|
3844
3911
|
className: "dl-flex-content-center dl-full-hight",
|
|
3845
3912
|
style: {
|
|
3846
3913
|
width: '100%'
|