logitude-dashboard-library 1.4.10 → 1.4.12
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/features/Dashboard/ChartsComponents/FusionCharts/FusionChartDataSoruceBuilder.d.ts +4 -3
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartObjectBuilder.d.ts +0 -37
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartObjectHelper.d.ts +38 -0
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartTooltip.d.ts +2 -0
- package/dist/index.js +199 -75
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +199 -75
- package/dist/index.modern.js.map +1 -1
- package/dist/types/SeriesMeasure.d.ts +1 -1
- package/package.json +1 -1
package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartDataSoruceBuilder.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SeriesMeasure } from "../../../../types/SeriesMeasure";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { ReactWidgetPM } from "../../../../types/widget";
|
|
3
|
+
import { ChartInfo } from "./FusionChartObjectHelper";
|
|
4
|
+
export declare function getCategoriesBasedDataSource(chartInfo: ChartInfo, seriesMeasures: SeriesMeasure[], widget: ReactWidgetPM): any;
|
|
5
|
+
export declare function getSimpleDataSource(chartInfo: ChartInfo, seriesMeasures: SeriesMeasure[], widget: ReactWidgetPM): any;
|
|
@@ -2,40 +2,3 @@ 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 interface ChartInfo {
|
|
6
|
-
theme: string;
|
|
7
|
-
scrollHeight: string;
|
|
8
|
-
scrollWidth: string;
|
|
9
|
-
scrollPadding: string;
|
|
10
|
-
flatScrollBars: string;
|
|
11
|
-
enableSlicing: string;
|
|
12
|
-
chartLeftMargin: string;
|
|
13
|
-
chartTopMargin: string;
|
|
14
|
-
chartRightMargin: string;
|
|
15
|
-
chartBottomMargin: string;
|
|
16
|
-
baseFont: string;
|
|
17
|
-
baseFontSize: string;
|
|
18
|
-
showPercentValues: string;
|
|
19
|
-
showValues: string;
|
|
20
|
-
showLegend: string;
|
|
21
|
-
lineColor: string;
|
|
22
|
-
vDivLineDashed: string;
|
|
23
|
-
vDivLineDashLen: string;
|
|
24
|
-
divLineDashed: string;
|
|
25
|
-
divLineDashLen: string;
|
|
26
|
-
enableRotation: string;
|
|
27
|
-
legendItemFont: string;
|
|
28
|
-
legendItemFontSize: string;
|
|
29
|
-
legendCaptionFont: string;
|
|
30
|
-
legendCaptionFontSize: string;
|
|
31
|
-
labelFont: string;
|
|
32
|
-
labelFontSize: string;
|
|
33
|
-
toolTipBorderColor: string;
|
|
34
|
-
toolTipBgAlpha: string;
|
|
35
|
-
showToolTipShadow: string;
|
|
36
|
-
toolTipBgColor: string;
|
|
37
|
-
plottooltext: string;
|
|
38
|
-
}
|
|
39
|
-
export declare function getTooltip(widget: ReactWidgetPM): string;
|
|
40
|
-
export declare function getTooltipPercentage(widget: ReactWidgetPM): string;
|
|
41
|
-
export declare function getSeriesPositionColor(position: number): string | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ChartInfo {
|
|
2
|
+
theme: string;
|
|
3
|
+
scrollHeight: string;
|
|
4
|
+
scrollWidth: string;
|
|
5
|
+
scrollPadding: string;
|
|
6
|
+
flatScrollBars: string;
|
|
7
|
+
enableSlicing: string;
|
|
8
|
+
chartLeftMargin: string;
|
|
9
|
+
chartTopMargin: string;
|
|
10
|
+
chartRightMargin: string;
|
|
11
|
+
chartBottomMargin: string;
|
|
12
|
+
baseFont: string;
|
|
13
|
+
baseFontSize: string;
|
|
14
|
+
showPercentValues: string;
|
|
15
|
+
showValues: string;
|
|
16
|
+
showLegend: string;
|
|
17
|
+
lineColor: string;
|
|
18
|
+
divLineDashed: string;
|
|
19
|
+
divLineDashLen: string;
|
|
20
|
+
divLineDashGap: string;
|
|
21
|
+
divLineColor: string;
|
|
22
|
+
divLineThickness: string;
|
|
23
|
+
divLineAlpha: string;
|
|
24
|
+
enableRotation: string;
|
|
25
|
+
legendItemFont: string;
|
|
26
|
+
legendItemFontSize: string;
|
|
27
|
+
legendCaptionFont: string;
|
|
28
|
+
legendCaptionFontSize: string;
|
|
29
|
+
labelFont: string;
|
|
30
|
+
labelFontSize: string;
|
|
31
|
+
toolTipBorderColor: string;
|
|
32
|
+
toolTipBgAlpha: string;
|
|
33
|
+
showToolTipShadow: string;
|
|
34
|
+
toolTipBgColor: string;
|
|
35
|
+
plottooltext: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function getSeriesPositionColor(position: number): string | null;
|
|
38
|
+
export declare function getSeriesHoverPositionColor(position: number): string | null;
|
package/dist/index.js
CHANGED
|
@@ -202,15 +202,20 @@ var DashboardAnalyticsService = /*#__PURE__*/function () {
|
|
|
202
202
|
}();
|
|
203
203
|
|
|
204
204
|
var KpiChart = function KpiChart(props) {
|
|
205
|
+
var _widget$current9;
|
|
206
|
+
|
|
205
207
|
var _useState = React.useState(false),
|
|
208
|
+
dataLoaded = _useState[0],
|
|
206
209
|
setDataLoaded = _useState[1];
|
|
207
210
|
|
|
208
211
|
var _useState2 = React.useState(),
|
|
212
|
+
error = _useState2[0],
|
|
209
213
|
setError = _useState2[1];
|
|
210
214
|
|
|
211
215
|
var widget = React.useRef();
|
|
212
216
|
|
|
213
217
|
var _useState3 = React.useState(),
|
|
218
|
+
data = _useState3[0],
|
|
214
219
|
setData = _useState3[1];
|
|
215
220
|
|
|
216
221
|
React.useEffect(function () {
|
|
@@ -239,7 +244,78 @@ var KpiChart = function KpiChart(props) {
|
|
|
239
244
|
});
|
|
240
245
|
};
|
|
241
246
|
|
|
242
|
-
|
|
247
|
+
var kpiClick = function kpiClick() {
|
|
248
|
+
var _widget$current, _widget$current2, _widget$current2$Widg;
|
|
249
|
+
|
|
250
|
+
var measureFieldId;
|
|
251
|
+
if (widget !== null && widget !== void 0 && (_widget$current = widget.current) !== null && _widget$current !== void 0 && _widget$current.WidgetMeasures) measureFieldId = widget === null || widget === void 0 ? void 0 : (_widget$current2 = widget.current) === null || _widget$current2 === void 0 ? void 0 : (_widget$current2$Widg = _widget$current2.WidgetMeasures[0]) === null || _widget$current2$Widg === void 0 ? void 0 : _widget$current2$Widg.MeasureFieldId;
|
|
252
|
+
props.customChartProps.onSelectDataPoint({
|
|
253
|
+
MeasureFieldId: measureFieldId,
|
|
254
|
+
Widget: widget.current
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
function getRatioComponent() {
|
|
259
|
+
var _widget$current3;
|
|
260
|
+
|
|
261
|
+
if (!((_widget$current3 = widget.current) !== null && _widget$current3 !== void 0 && _widget$current3.TimeOverTime)) return null;
|
|
262
|
+
return React__default.createElement("div", {
|
|
263
|
+
className: "dl-kpi-ratio-container"
|
|
264
|
+
}, getArrowComponent(), React__default.createElement("div", {
|
|
265
|
+
style: {
|
|
266
|
+
marginLeft: "2px"
|
|
267
|
+
}
|
|
268
|
+
}, data === null || data === void 0 ? void 0 : data.Ratio, " %"));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function getArrowComponent() {
|
|
272
|
+
var _widget$current4, _widget$current5, _widget$current6, _widget$current7;
|
|
273
|
+
|
|
274
|
+
if (!data) return null;
|
|
275
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) == 0 || data.Value == data.ComparisonValue || (data.Value == "0" || data.Value == 0) && (data.ComparisonValue == "0" || data.ComparisonValue == 0)) return React__default.createElement("div", {
|
|
276
|
+
className: "dl-kpi-arrow-container"
|
|
277
|
+
}, React__default.createElement("span", {
|
|
278
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-green"
|
|
279
|
+
}), React__default.createElement("span", {
|
|
280
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-red",
|
|
281
|
+
style: {
|
|
282
|
+
marginTop: "2px"
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) > 1 && ((_widget$current4 = widget.current) === null || _widget$current4 === void 0 ? void 0 : _widget$current4.Increase) == "Positive") return React__default.createElement("div", {
|
|
286
|
+
className: "dl-kpi-arrow-container"
|
|
287
|
+
}, React__default.createElement("span", {
|
|
288
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-green"
|
|
289
|
+
}));
|
|
290
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) > 1 && ((_widget$current5 = widget.current) === null || _widget$current5 === void 0 ? void 0 : _widget$current5.Increase) == "Negative") return React__default.createElement("div", {
|
|
291
|
+
className: "dl-kpi-arrow-container"
|
|
292
|
+
}, React__default.createElement("span", {
|
|
293
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-red"
|
|
294
|
+
}));
|
|
295
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) < 1 && ((_widget$current6 = widget.current) === null || _widget$current6 === void 0 ? void 0 : _widget$current6.Increase) == "Positive") return React__default.createElement("div", {
|
|
296
|
+
className: "dl-kpi-arrow-container"
|
|
297
|
+
}, React__default.createElement("span", {
|
|
298
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-red"
|
|
299
|
+
}));
|
|
300
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) < 1 && ((_widget$current7 = widget.current) === null || _widget$current7 === void 0 ? void 0 : _widget$current7.Increase) == "Negative") return React__default.createElement("div", {
|
|
301
|
+
className: "dl-kpi-arrow-container"
|
|
302
|
+
}, React__default.createElement("span", {
|
|
303
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-green"
|
|
304
|
+
}));
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function getPreviousValueComponent() {
|
|
309
|
+
var _widget$current8;
|
|
310
|
+
|
|
311
|
+
if (!((_widget$current8 = widget.current) !== null && _widget$current8 !== void 0 && _widget$current8.TimeOverTime)) return null;
|
|
312
|
+
var prevtext = "Previous: " + (data === null || data === void 0 ? void 0 : data.ComparisonValue);
|
|
313
|
+
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
314
|
+
className: "dl-kpi-prev-text"
|
|
315
|
+
}, prevtext));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return !dataLoaded ? React__default.createElement("div", {
|
|
243
319
|
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
244
320
|
}, React__default.createElement(progressspinner.ProgressSpinner, {
|
|
245
321
|
style: {
|
|
@@ -248,7 +324,30 @@ var KpiChart = function KpiChart(props) {
|
|
|
248
324
|
},
|
|
249
325
|
strokeWidth: "4",
|
|
250
326
|
animationDuration: "2s"
|
|
251
|
-
}))
|
|
327
|
+
})) : !error ? React__default.createElement("div", {
|
|
328
|
+
className: "dl-kpi-container-click",
|
|
329
|
+
onClick: kpiClick
|
|
330
|
+
}, React__default.createElement("div", {
|
|
331
|
+
className: "dl-kpi-container",
|
|
332
|
+
style: {
|
|
333
|
+
marginTop: (_widget$current9 = widget.current) !== null && _widget$current9 !== void 0 && _widget$current9.TimeOverTime ? '7px' : '15.4px'
|
|
334
|
+
}
|
|
335
|
+
}, React__default.createElement("div", {
|
|
336
|
+
className: "dl-kpi-sub-container"
|
|
337
|
+
}, React__default.createElement("div", {
|
|
338
|
+
className: "dl-kpi-value dl-kpi-textTrimming"
|
|
339
|
+
}, data === null || data === void 0 ? void 0 : data.Value), (data === null || data === void 0 ? void 0 : data.Unit) && React__default.createElement("div", {
|
|
340
|
+
className: "dl-kpi-unit"
|
|
341
|
+
}, data === null || data === void 0 ? void 0 : data.Unit), getRatioComponent()), getPreviousValueComponent())) : React__default.createElement("div", {
|
|
342
|
+
className: "dl-flex-content-center dl-full-hight "
|
|
343
|
+
}, React__default.createElement("div", {
|
|
344
|
+
className: "dl-tooltip"
|
|
345
|
+
}, React__default.createElement("img", {
|
|
346
|
+
width: 100,
|
|
347
|
+
src: "https://www.seekpng.com/png/full/334-3345964_error-icon-png.png"
|
|
348
|
+
}), React__default.createElement("span", {
|
|
349
|
+
className: "dl-tooltiptext"
|
|
350
|
+
}, error)));
|
|
252
351
|
};
|
|
253
352
|
|
|
254
353
|
var CustomChart = function CustomChart(props) {
|
|
@@ -271,26 +370,82 @@ var CustomChart = function CustomChart(props) {
|
|
|
271
370
|
}, project());
|
|
272
371
|
};
|
|
273
372
|
|
|
274
|
-
|
|
373
|
+
var mainYellowColor = "#F6CF33";
|
|
374
|
+
var mainRedColor = "#EE5F77";
|
|
375
|
+
var mainGreenColor = "#4AC76F";
|
|
376
|
+
var mainTurquoiseColor = "#32C7C7";
|
|
377
|
+
var mainBlueColor = "#369CFB";
|
|
378
|
+
var mainPurpleColor = "#935BE0";
|
|
379
|
+
var mainOrangeColor = "#FAAD14";
|
|
380
|
+
|
|
381
|
+
function getSeriesPositionColor(position) {
|
|
382
|
+
switch (position) {
|
|
383
|
+
case 1:
|
|
384
|
+
return mainBlueColor;
|
|
385
|
+
|
|
386
|
+
case 2:
|
|
387
|
+
return mainGreenColor;
|
|
388
|
+
|
|
389
|
+
case 3:
|
|
390
|
+
return mainYellowColor;
|
|
391
|
+
|
|
392
|
+
case 4:
|
|
393
|
+
return mainTurquoiseColor;
|
|
394
|
+
|
|
395
|
+
case 5:
|
|
396
|
+
return mainPurpleColor;
|
|
397
|
+
|
|
398
|
+
case 6:
|
|
399
|
+
return mainOrangeColor;
|
|
400
|
+
|
|
401
|
+
case 7:
|
|
402
|
+
return mainRedColor;
|
|
403
|
+
|
|
404
|
+
default:
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
function buildToolTip(widget, value, seriesName) {
|
|
410
|
+
return "\n <div style=\"min-width: 108px;\">\n <div style=\"display: flex;align-items: center;margin-bottom: 6px;\">\n <span style=\"margin: 0; height: 10px; width: 10px; background-color: #A4A4A4; 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;\">$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 ";
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
function getTooltipPercentage(widget) {
|
|
414
|
+
if (widget.TypeCode != "donut" && widget.TypeCode != "pie") return "";
|
|
415
|
+
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 ";
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function getTooltipValue(value) {
|
|
419
|
+
if (value) return value;
|
|
420
|
+
return '$dataValue';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function getMeasureType(seriesName) {
|
|
424
|
+
if (!seriesName) return "Count:";
|
|
425
|
+
return seriesName.replace(/ .*/, '') + ":";
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
function getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget) {
|
|
275
429
|
if (!seriesMeasures || !seriesMeasures[0]) return {};
|
|
276
430
|
return {
|
|
277
431
|
chart: chartInfo,
|
|
278
432
|
categories: buildCategories(seriesMeasures),
|
|
279
|
-
dataset: buildDataSet(seriesMeasures)
|
|
433
|
+
dataset: buildDataSet(seriesMeasures, widget)
|
|
280
434
|
};
|
|
281
435
|
}
|
|
282
|
-
function getSimpleDataSource(chartInfo, seriesMeasures) {
|
|
436
|
+
function getSimpleDataSource(chartInfo, seriesMeasures, widget) {
|
|
283
437
|
if (!seriesMeasures || !seriesMeasures[0]) return {};
|
|
284
438
|
return {
|
|
285
439
|
chart: chartInfo,
|
|
286
|
-
data: buildDataSource(seriesMeasures)
|
|
440
|
+
data: buildDataSource(seriesMeasures, widget)
|
|
287
441
|
};
|
|
288
442
|
}
|
|
289
443
|
|
|
290
|
-
function buildDataSource(values) {
|
|
444
|
+
function buildDataSource(values, widget) {
|
|
291
445
|
var data = [];
|
|
292
446
|
if (!values || !values[0]) return data;
|
|
293
|
-
|
|
447
|
+
var series = values[0];
|
|
448
|
+
data = series.SeriesMeasureVulues.map(function (e, index) {
|
|
294
449
|
var item = {
|
|
295
450
|
value: e.Value,
|
|
296
451
|
label: getTrimedLabelText(e.Label),
|
|
@@ -298,6 +453,7 @@ function buildDataSource(values) {
|
|
|
298
453
|
GroupById: e.GroupById,
|
|
299
454
|
MeasureFieldId: values[0].MeasureFieldId
|
|
300
455
|
},
|
|
456
|
+
tooltext: buildToolTip(widget, null, series.Name),
|
|
301
457
|
color: getSeriesPositionColor(index + 1)
|
|
302
458
|
};
|
|
303
459
|
return item;
|
|
@@ -310,7 +466,7 @@ function getTrimedLabelText(label) {
|
|
|
310
466
|
return label.substring(0, 17) + "...";
|
|
311
467
|
}
|
|
312
468
|
|
|
313
|
-
function buildDataSet(seriesMeasures) {
|
|
469
|
+
function buildDataSet(seriesMeasures, widget) {
|
|
314
470
|
var dataSet = [];
|
|
315
471
|
var seriesPosition = 1;
|
|
316
472
|
seriesMeasures.forEach(function (seriesMeasure) {
|
|
@@ -320,20 +476,26 @@ function buildDataSet(seriesMeasures) {
|
|
|
320
476
|
id: {
|
|
321
477
|
GroupById: e.GroupById,
|
|
322
478
|
MeasureFieldId: seriesMeasure.MeasureFieldId
|
|
323
|
-
}
|
|
479
|
+
},
|
|
480
|
+
tooltext: buildToolTip(widget, e.Value, seriesMeasure.Name)
|
|
324
481
|
};
|
|
325
482
|
});
|
|
483
|
+
var color = getSeriesPositionColor(seriesPosition);
|
|
326
484
|
dataSet.push({
|
|
327
485
|
data: datas,
|
|
328
486
|
seriesname: seriesMeasure.Name,
|
|
329
|
-
color:
|
|
487
|
+
color: color,
|
|
488
|
+
anchorBgColor: color,
|
|
489
|
+
anchorBorderColor: "#FFFFFF",
|
|
490
|
+
anchorBorderThickness: "2",
|
|
491
|
+
anchorHoverColor: color
|
|
330
492
|
});
|
|
331
493
|
seriesPosition++;
|
|
332
494
|
});
|
|
333
495
|
return dataSet;
|
|
334
496
|
}
|
|
335
497
|
|
|
336
|
-
function buildCategories(seriesMeasures) {
|
|
498
|
+
function buildCategories(seriesMeasures, widget) {
|
|
337
499
|
var categories = seriesMeasures[0].SeriesMeasureVulues.map(function (e) {
|
|
338
500
|
return {
|
|
339
501
|
label: e.Label
|
|
@@ -346,15 +508,7 @@ function buildCategories(seriesMeasures) {
|
|
|
346
508
|
return result;
|
|
347
509
|
}
|
|
348
510
|
|
|
349
|
-
var
|
|
350
|
-
var mainRedColor = "#EE5F77";
|
|
351
|
-
var mainGreenColor = "#4AC76F";
|
|
352
|
-
var mainTurquoiseColor = "#32C7C7";
|
|
353
|
-
var mainBlueColor = "#369CFB";
|
|
354
|
-
var mainPurpleColor = "#935BE0";
|
|
355
|
-
var mainOrangeColor = "#FAAD14";
|
|
356
|
-
|
|
357
|
-
var defautFontSize = "11";
|
|
511
|
+
var defautFontSize = "10";
|
|
358
512
|
var defautFont = "Manrope";
|
|
359
513
|
function BuildFusionChartObject(seriesMeasures, widget) {
|
|
360
514
|
handelNullLabels(seriesMeasures);
|
|
@@ -391,7 +545,7 @@ function handelNullLabels(seriesMeasures) {
|
|
|
391
545
|
function getBarObject(seriesMeasures, widget) {
|
|
392
546
|
var chart = getDefaultChartobject();
|
|
393
547
|
chart.type = "scrollbar2d";
|
|
394
|
-
var chartInfo = getDefaultChartInfo(
|
|
548
|
+
var chartInfo = getDefaultChartInfo();
|
|
395
549
|
chartInfo.scrollHeight = "5";
|
|
396
550
|
chartInfo.scrollWidth = "5";
|
|
397
551
|
chartInfo.scrollPadding = "8";
|
|
@@ -400,18 +554,17 @@ function getBarObject(seriesMeasures, widget) {
|
|
|
400
554
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
401
555
|
chartInfo.legendItemFont = defautFont;
|
|
402
556
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
403
|
-
chartInfo
|
|
404
|
-
chartInfo.divLineDashLen = "7";
|
|
557
|
+
setLineDash(chartInfo);
|
|
405
558
|
chartInfo.chartTopMargin = "10";
|
|
406
559
|
chartInfo.chartBottomMargin = "10";
|
|
407
|
-
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
560
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
408
561
|
return chart;
|
|
409
562
|
}
|
|
410
563
|
|
|
411
564
|
function getLineObject(seriesMeasures, widget) {
|
|
412
565
|
var chart = getDefaultChartobject();
|
|
413
566
|
chart.type = "msspline";
|
|
414
|
-
var chartInfo = getDefaultChartInfo(
|
|
567
|
+
var chartInfo = getDefaultChartInfo();
|
|
415
568
|
chartInfo.scrollHeight = "5";
|
|
416
569
|
chartInfo.scrollWidth = "5";
|
|
417
570
|
chartInfo.scrollPadding = "8";
|
|
@@ -420,33 +573,32 @@ function getLineObject(seriesMeasures, widget) {
|
|
|
420
573
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
421
574
|
chartInfo.legendItemFont = defautFont;
|
|
422
575
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
423
|
-
chartInfo
|
|
424
|
-
chartInfo.divLineDashLen = "7";
|
|
576
|
+
setLineDash(chartInfo);
|
|
425
577
|
chartInfo.chartTopMargin = "10";
|
|
426
578
|
chartInfo.chartBottomMargin = "10";
|
|
427
579
|
chartInfo.chartLeftMargin = "20";
|
|
428
580
|
chartInfo.chartRightMargin = "50";
|
|
429
|
-
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
581
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
430
582
|
return chart;
|
|
431
583
|
}
|
|
432
584
|
|
|
433
585
|
function getDonutObject(seriesMeasures, widget) {
|
|
434
586
|
var chart = getDefaultChartobject();
|
|
435
587
|
chart.type = "doughnut2d";
|
|
436
|
-
var chartInfo = getDefaultChartInfo(
|
|
588
|
+
var chartInfo = getDefaultChartInfo();
|
|
437
589
|
chartInfo.showPercentValues = "0";
|
|
438
590
|
chartInfo.showValues = "0";
|
|
439
591
|
chartInfo.showLegend = "0";
|
|
440
592
|
chartInfo.legendCaptionFontSize = defautFontSize;
|
|
441
593
|
chartInfo.legendCaptionFont = defautFont;
|
|
442
|
-
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures);
|
|
594
|
+
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures, widget);
|
|
443
595
|
return chart;
|
|
444
596
|
}
|
|
445
597
|
|
|
446
598
|
function getPieObject(seriesMeasures, widget) {
|
|
447
599
|
var chart = getDefaultChartobject();
|
|
448
600
|
chart.type = "pie2d";
|
|
449
|
-
var chartInfo = getDefaultChartInfo(
|
|
601
|
+
var chartInfo = getDefaultChartInfo();
|
|
450
602
|
chartInfo.showPercentValues = "0";
|
|
451
603
|
chartInfo.showValues = "0";
|
|
452
604
|
chartInfo.showLegend = "0";
|
|
@@ -454,14 +606,14 @@ function getPieObject(seriesMeasures, widget) {
|
|
|
454
606
|
chartInfo.legendCaptionFont = defautFont;
|
|
455
607
|
chartInfo.labelFontSize = defautFontSize;
|
|
456
608
|
chartInfo.labelFont = defautFont;
|
|
457
|
-
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures);
|
|
609
|
+
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures, widget);
|
|
458
610
|
return chart;
|
|
459
611
|
}
|
|
460
612
|
|
|
461
613
|
function getColumnObject(seriesMeasures, widget) {
|
|
462
614
|
var chart = getDefaultChartobject();
|
|
463
615
|
chart.type = "scrollcolumn2d";
|
|
464
|
-
var chartInfo = getDefaultChartInfo(
|
|
616
|
+
var chartInfo = getDefaultChartInfo();
|
|
465
617
|
chartInfo.scrollHeight = "5";
|
|
466
618
|
chartInfo.scrollWidth = "5";
|
|
467
619
|
chartInfo.scrollPadding = "8";
|
|
@@ -470,16 +622,24 @@ function getColumnObject(seriesMeasures, widget) {
|
|
|
470
622
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
471
623
|
chartInfo.legendItemFont = defautFont;
|
|
472
624
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
473
|
-
chartInfo
|
|
474
|
-
chartInfo.divLineDashLen = "7";
|
|
625
|
+
setLineDash(chartInfo);
|
|
475
626
|
chartInfo.chartTopMargin = "10";
|
|
476
627
|
chartInfo.chartBottomMargin = "10";
|
|
477
628
|
chartInfo.chartLeftMargin = "20";
|
|
478
629
|
chartInfo.chartRightMargin = "50";
|
|
479
|
-
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
630
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
480
631
|
return chart;
|
|
481
632
|
}
|
|
482
633
|
|
|
634
|
+
function setLineDash(chartInfo) {
|
|
635
|
+
chartInfo.divLineDashed = "1";
|
|
636
|
+
chartInfo.divLineDashLen = "5";
|
|
637
|
+
chartInfo.divLineDashGap = "5";
|
|
638
|
+
chartInfo.divLineColor = "#E7E7E7";
|
|
639
|
+
chartInfo.divLineAlpha = "100";
|
|
640
|
+
chartInfo.divLineThickness = "1";
|
|
641
|
+
}
|
|
642
|
+
|
|
483
643
|
function getDefaultChartobject() {
|
|
484
644
|
var chart = {};
|
|
485
645
|
chart.type = "column2d";
|
|
@@ -502,45 +662,9 @@ function getDefaultChartInfo(widget) {
|
|
|
502
662
|
chart.chartRightMargin = "40";
|
|
503
663
|
chart.toolTipBgColor = "#FFFFFF";
|
|
504
664
|
chart.showToolTipShadow = "1";
|
|
505
|
-
chart.plottooltext = getTooltip(widget);
|
|
506
665
|
return chart;
|
|
507
666
|
}
|
|
508
667
|
|
|
509
|
-
function getTooltip(widget) {
|
|
510
|
-
return "\n <div style=\"min-width: 108px;\">\n <div style=\"display: flex;align-items: center;margin-bottom: 6px;\">\n <span style=\"margin: 0; height: 10px; width: 10px; background-color: #369CFB; 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;\">$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;\">Count:</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;\">$dataValue</p>\n " + getTooltipPercentage(widget) + " </div>\n </div>\n ";
|
|
511
|
-
}
|
|
512
|
-
function getTooltipPercentage(widget) {
|
|
513
|
-
if (widget.TypeCode != "donut" && widget.TypeCode != "pie") return "";
|
|
514
|
-
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 ";
|
|
515
|
-
}
|
|
516
|
-
function getSeriesPositionColor(position) {
|
|
517
|
-
switch (position) {
|
|
518
|
-
case 1:
|
|
519
|
-
return mainBlueColor;
|
|
520
|
-
|
|
521
|
-
case 2:
|
|
522
|
-
return mainGreenColor;
|
|
523
|
-
|
|
524
|
-
case 3:
|
|
525
|
-
return mainYellowColor;
|
|
526
|
-
|
|
527
|
-
case 4:
|
|
528
|
-
return mainTurquoiseColor;
|
|
529
|
-
|
|
530
|
-
case 5:
|
|
531
|
-
return mainPurpleColor;
|
|
532
|
-
|
|
533
|
-
case 6:
|
|
534
|
-
return mainOrangeColor;
|
|
535
|
-
|
|
536
|
-
case 7:
|
|
537
|
-
return mainRedColor;
|
|
538
|
-
|
|
539
|
-
default:
|
|
540
|
-
return null;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
668
|
ReactFC.fcRoot(FusionCharts, Charts, FusionTheme);
|
|
545
669
|
FusionCharts.options['license']({
|
|
546
670
|
key: 'prD4C-8eiA7A3A3C7E6G4B4A3J4C7B2D3D2nyqE1C3fd1npaE4D4tlA-21D7E4F4F1F1E1F4F1A10A8C2C5F5E2F2D1hwqD1B5D1aG4A19A32twbC6D3G4lhJ-7A9C11A5B-13ddA2I3A1B9B3D7A2B4G2H3H1F-7smC8B2XB4cetB8A7A5mxD3SG4F2tvgB2A3B2E4C3I3C7B3A4A3A2D3D2G4J-7==',
|
|
@@ -618,8 +742,8 @@ var FusionChart = function FusionChart(props) {
|
|
|
618
742
|
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
619
743
|
}, React__default.createElement(progressspinner.ProgressSpinner, {
|
|
620
744
|
style: {
|
|
621
|
-
width: '
|
|
622
|
-
height: '
|
|
745
|
+
width: '40px',
|
|
746
|
+
height: '40px'
|
|
623
747
|
},
|
|
624
748
|
strokeWidth: "4",
|
|
625
749
|
animationDuration: "2s"
|