logitude-dashboard-library 1.4.11 → 1.4.13
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 +7 -46
- 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 +40 -0
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChartTooltip.d.ts +2 -0
- package/dist/index.js +101 -72
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +101 -72
- package/dist/index.modern.js.map +1 -1
- package/dist/types/SeriesMeasure.d.ts +1 -1
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ $dark-grey: #717585;
|
|
|
49
49
|
|
|
50
50
|
.spinner-custome {
|
|
51
51
|
width: 100%;
|
|
52
|
+
|
|
52
53
|
@keyframes p-progress-spinner-color {
|
|
53
54
|
|
|
54
55
|
100%,
|
|
@@ -96,13 +97,10 @@ $dark-grey: #717585;
|
|
|
96
97
|
|
|
97
98
|
.dl-full-hight {
|
|
98
99
|
height: 100%;
|
|
99
|
-
max-height: calc(100vh - 170px);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.dl-full-hight-scroll {
|
|
103
103
|
height: 100%;
|
|
104
|
-
max-height: calc(100vh - 170px);
|
|
105
|
-
overflow: auto;
|
|
106
104
|
}
|
|
107
105
|
|
|
108
106
|
.dl-full-hight-scroll::-webkit-scrollbar {
|
|
@@ -131,7 +129,6 @@ $dark-grey: #717585;
|
|
|
131
129
|
border-radius: 7px;
|
|
132
130
|
|
|
133
131
|
}
|
|
134
|
-
|
|
135
132
|
}
|
|
136
133
|
|
|
137
134
|
.dl-grid-container {
|
|
@@ -145,20 +142,9 @@ $dark-grey: #717585;
|
|
|
145
142
|
}
|
|
146
143
|
|
|
147
144
|
.dl-relativ-container {
|
|
148
|
-
|
|
149
145
|
position: relative;
|
|
150
146
|
width: 100%;
|
|
151
147
|
height: 100%;
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.dl-scroll-container {
|
|
156
|
-
position: absolute;
|
|
157
|
-
left: 0;
|
|
158
|
-
top: 0;
|
|
159
|
-
width: 100%;
|
|
160
|
-
height: 100%;
|
|
161
|
-
overflow-y: scroll;
|
|
162
148
|
}
|
|
163
149
|
|
|
164
150
|
.dl-flex-stretch {
|
|
@@ -177,36 +163,10 @@ $dark-grey: #717585;
|
|
|
177
163
|
height: 100%;
|
|
178
164
|
}
|
|
179
165
|
|
|
180
|
-
|
|
181
|
-
|
|
182
166
|
.dl-box .dl-row.dl-header {
|
|
183
167
|
flex: 0 1 auto;
|
|
184
|
-
/* The above is shorthand for:
|
|
185
|
-
flex-grow: 0,
|
|
186
|
-
flex-shrink: 1,
|
|
187
|
-
flex-basis: auto
|
|
188
|
-
*/
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.dl-box .dl-row.dl-content {
|
|
192
|
-
flex: 1 1 auto;
|
|
193
|
-
overflow-y: auto;
|
|
194
168
|
}
|
|
195
169
|
|
|
196
|
-
.dl-row.dl-content::-webkit-scrollbar {
|
|
197
|
-
width: 6px;
|
|
198
|
-
height: 6px;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.dl-row.dl-content::-webkit-scrollbar-track {
|
|
202
|
-
background: none;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.dl-row.dl-content::-webkit-scrollbar-thumb {
|
|
206
|
-
background: rgba(193, 193, 193, 1);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
170
|
.dl-box .dl-row.dl-footer {
|
|
211
171
|
flex: 0 1 40px;
|
|
212
172
|
}
|
|
@@ -216,8 +176,6 @@ $dark-grey: #717585;
|
|
|
216
176
|
width: 20px;
|
|
217
177
|
}
|
|
218
178
|
|
|
219
|
-
|
|
220
|
-
|
|
221
179
|
.form-field {
|
|
222
180
|
display: flex;
|
|
223
181
|
align-items: baseline;
|
|
@@ -302,7 +260,10 @@ $dark-grey: #717585;
|
|
|
302
260
|
justify-content: space-between;
|
|
303
261
|
align-items: center;
|
|
304
262
|
position: unset;
|
|
305
|
-
width: 100
|
|
263
|
+
width: 100% !important;
|
|
264
|
+
max-width: 100% !important;
|
|
265
|
+
margin: 0;
|
|
266
|
+
padding: 0;
|
|
306
267
|
|
|
307
268
|
i {
|
|
308
269
|
font-size: 18px;
|
|
@@ -585,8 +546,8 @@ $dark-grey: #717585;
|
|
|
585
546
|
.dl-kpi-prev-text {
|
|
586
547
|
font-family: 'Manrope';
|
|
587
548
|
font-style: normal;
|
|
588
|
-
font-weight:
|
|
549
|
+
font-weight: 500;
|
|
589
550
|
font-size: 11px;
|
|
590
551
|
line-height: 15px;
|
|
591
|
-
color: #
|
|
552
|
+
color: #A4A4A4;
|
|
592
553
|
}
|
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,40 @@
|
|
|
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
|
+
anchorradius: string;
|
|
37
|
+
canvasBottomPadding: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function getSeriesPositionColor(position: number): string | null;
|
|
40
|
+
export declare function getSeriesHoverPositionColor(position: number): string | null;
|
package/dist/index.js
CHANGED
|
@@ -370,26 +370,82 @@ var CustomChart = function CustomChart(props) {
|
|
|
370
370
|
}, project());
|
|
371
371
|
};
|
|
372
372
|
|
|
373
|
-
|
|
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) {
|
|
374
429
|
if (!seriesMeasures || !seriesMeasures[0]) return {};
|
|
375
430
|
return {
|
|
376
431
|
chart: chartInfo,
|
|
377
432
|
categories: buildCategories(seriesMeasures),
|
|
378
|
-
dataset: buildDataSet(seriesMeasures)
|
|
433
|
+
dataset: buildDataSet(seriesMeasures, widget)
|
|
379
434
|
};
|
|
380
435
|
}
|
|
381
|
-
function getSimpleDataSource(chartInfo, seriesMeasures) {
|
|
436
|
+
function getSimpleDataSource(chartInfo, seriesMeasures, widget) {
|
|
382
437
|
if (!seriesMeasures || !seriesMeasures[0]) return {};
|
|
383
438
|
return {
|
|
384
439
|
chart: chartInfo,
|
|
385
|
-
data: buildDataSource(seriesMeasures)
|
|
440
|
+
data: buildDataSource(seriesMeasures, widget)
|
|
386
441
|
};
|
|
387
442
|
}
|
|
388
443
|
|
|
389
|
-
function buildDataSource(values) {
|
|
444
|
+
function buildDataSource(values, widget) {
|
|
390
445
|
var data = [];
|
|
391
446
|
if (!values || !values[0]) return data;
|
|
392
|
-
|
|
447
|
+
var series = values[0];
|
|
448
|
+
data = series.SeriesMeasureVulues.map(function (e, index) {
|
|
393
449
|
var item = {
|
|
394
450
|
value: e.Value,
|
|
395
451
|
label: getTrimedLabelText(e.Label),
|
|
@@ -397,6 +453,7 @@ function buildDataSource(values) {
|
|
|
397
453
|
GroupById: e.GroupById,
|
|
398
454
|
MeasureFieldId: values[0].MeasureFieldId
|
|
399
455
|
},
|
|
456
|
+
tooltext: buildToolTip(widget, null, series.Name),
|
|
400
457
|
color: getSeriesPositionColor(index + 1)
|
|
401
458
|
};
|
|
402
459
|
return item;
|
|
@@ -409,7 +466,7 @@ function getTrimedLabelText(label) {
|
|
|
409
466
|
return label.substring(0, 17) + "...";
|
|
410
467
|
}
|
|
411
468
|
|
|
412
|
-
function buildDataSet(seriesMeasures) {
|
|
469
|
+
function buildDataSet(seriesMeasures, widget) {
|
|
413
470
|
var dataSet = [];
|
|
414
471
|
var seriesPosition = 1;
|
|
415
472
|
seriesMeasures.forEach(function (seriesMeasure) {
|
|
@@ -419,20 +476,26 @@ function buildDataSet(seriesMeasures) {
|
|
|
419
476
|
id: {
|
|
420
477
|
GroupById: e.GroupById,
|
|
421
478
|
MeasureFieldId: seriesMeasure.MeasureFieldId
|
|
422
|
-
}
|
|
479
|
+
},
|
|
480
|
+
tooltext: buildToolTip(widget, e.Value, seriesMeasure.Name)
|
|
423
481
|
};
|
|
424
482
|
});
|
|
483
|
+
var color = getSeriesPositionColor(seriesPosition);
|
|
425
484
|
dataSet.push({
|
|
426
485
|
data: datas,
|
|
427
486
|
seriesname: seriesMeasure.Name,
|
|
428
|
-
color:
|
|
487
|
+
color: color,
|
|
488
|
+
anchorBgColor: color,
|
|
489
|
+
anchorBorderColor: "#FFFFFF",
|
|
490
|
+
anchorBorderThickness: "2",
|
|
491
|
+
anchorHoverColor: color
|
|
429
492
|
});
|
|
430
493
|
seriesPosition++;
|
|
431
494
|
});
|
|
432
495
|
return dataSet;
|
|
433
496
|
}
|
|
434
497
|
|
|
435
|
-
function buildCategories(seriesMeasures) {
|
|
498
|
+
function buildCategories(seriesMeasures, widget) {
|
|
436
499
|
var categories = seriesMeasures[0].SeriesMeasureVulues.map(function (e) {
|
|
437
500
|
return {
|
|
438
501
|
label: e.Label
|
|
@@ -445,15 +508,7 @@ function buildCategories(seriesMeasures) {
|
|
|
445
508
|
return result;
|
|
446
509
|
}
|
|
447
510
|
|
|
448
|
-
var
|
|
449
|
-
var mainRedColor = "#EE5F77";
|
|
450
|
-
var mainGreenColor = "#4AC76F";
|
|
451
|
-
var mainTurquoiseColor = "#32C7C7";
|
|
452
|
-
var mainBlueColor = "#369CFB";
|
|
453
|
-
var mainPurpleColor = "#935BE0";
|
|
454
|
-
var mainOrangeColor = "#FAAD14";
|
|
455
|
-
|
|
456
|
-
var defautFontSize = "11";
|
|
511
|
+
var defautFontSize = "10";
|
|
457
512
|
var defautFont = "Manrope";
|
|
458
513
|
function BuildFusionChartObject(seriesMeasures, widget) {
|
|
459
514
|
handelNullLabels(seriesMeasures);
|
|
@@ -490,7 +545,7 @@ function handelNullLabels(seriesMeasures) {
|
|
|
490
545
|
function getBarObject(seriesMeasures, widget) {
|
|
491
546
|
var chart = getDefaultChartobject();
|
|
492
547
|
chart.type = "scrollbar2d";
|
|
493
|
-
var chartInfo = getDefaultChartInfo(
|
|
548
|
+
var chartInfo = getDefaultChartInfo();
|
|
494
549
|
chartInfo.scrollHeight = "5";
|
|
495
550
|
chartInfo.scrollWidth = "5";
|
|
496
551
|
chartInfo.scrollPadding = "8";
|
|
@@ -499,18 +554,17 @@ function getBarObject(seriesMeasures, widget) {
|
|
|
499
554
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
500
555
|
chartInfo.legendItemFont = defautFont;
|
|
501
556
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
502
|
-
chartInfo
|
|
503
|
-
chartInfo.divLineDashLen = "7";
|
|
557
|
+
setLineDash(chartInfo);
|
|
504
558
|
chartInfo.chartTopMargin = "10";
|
|
505
559
|
chartInfo.chartBottomMargin = "10";
|
|
506
|
-
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
560
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
507
561
|
return chart;
|
|
508
562
|
}
|
|
509
563
|
|
|
510
564
|
function getLineObject(seriesMeasures, widget) {
|
|
511
565
|
var chart = getDefaultChartobject();
|
|
512
|
-
chart.type = "
|
|
513
|
-
var chartInfo = getDefaultChartInfo(
|
|
566
|
+
chart.type = "scrollline2d";
|
|
567
|
+
var chartInfo = getDefaultChartInfo();
|
|
514
568
|
chartInfo.scrollHeight = "5";
|
|
515
569
|
chartInfo.scrollWidth = "5";
|
|
516
570
|
chartInfo.scrollPadding = "8";
|
|
@@ -519,33 +573,36 @@ function getLineObject(seriesMeasures, widget) {
|
|
|
519
573
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
520
574
|
chartInfo.legendItemFont = defautFont;
|
|
521
575
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
522
|
-
chartInfo
|
|
523
|
-
chartInfo.divLineDashLen = "7";
|
|
576
|
+
setLineDash(chartInfo);
|
|
524
577
|
chartInfo.chartTopMargin = "10";
|
|
525
578
|
chartInfo.chartBottomMargin = "10";
|
|
526
579
|
chartInfo.chartLeftMargin = "20";
|
|
527
580
|
chartInfo.chartRightMargin = "50";
|
|
528
|
-
|
|
581
|
+
chartInfo.anchorradius = "5";
|
|
582
|
+
chartInfo.canvasBottomPadding = "10";
|
|
583
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
529
584
|
return chart;
|
|
530
585
|
}
|
|
531
586
|
|
|
532
587
|
function getDonutObject(seriesMeasures, widget) {
|
|
533
588
|
var chart = getDefaultChartobject();
|
|
534
589
|
chart.type = "doughnut2d";
|
|
535
|
-
var chartInfo = getDefaultChartInfo(
|
|
590
|
+
var chartInfo = getDefaultChartInfo();
|
|
536
591
|
chartInfo.showPercentValues = "0";
|
|
537
592
|
chartInfo.showValues = "0";
|
|
538
593
|
chartInfo.showLegend = "0";
|
|
539
594
|
chartInfo.legendCaptionFontSize = defautFontSize;
|
|
540
595
|
chartInfo.legendCaptionFont = defautFont;
|
|
541
|
-
|
|
596
|
+
chartInfo.labelFontSize = defautFontSize;
|
|
597
|
+
chartInfo.labelFont = defautFont;
|
|
598
|
+
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures, widget);
|
|
542
599
|
return chart;
|
|
543
600
|
}
|
|
544
601
|
|
|
545
602
|
function getPieObject(seriesMeasures, widget) {
|
|
546
603
|
var chart = getDefaultChartobject();
|
|
547
604
|
chart.type = "pie2d";
|
|
548
|
-
var chartInfo = getDefaultChartInfo(
|
|
605
|
+
var chartInfo = getDefaultChartInfo();
|
|
549
606
|
chartInfo.showPercentValues = "0";
|
|
550
607
|
chartInfo.showValues = "0";
|
|
551
608
|
chartInfo.showLegend = "0";
|
|
@@ -553,14 +610,14 @@ function getPieObject(seriesMeasures, widget) {
|
|
|
553
610
|
chartInfo.legendCaptionFont = defautFont;
|
|
554
611
|
chartInfo.labelFontSize = defautFontSize;
|
|
555
612
|
chartInfo.labelFont = defautFont;
|
|
556
|
-
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures);
|
|
613
|
+
chart.dataSource = getSimpleDataSource(chartInfo, seriesMeasures, widget);
|
|
557
614
|
return chart;
|
|
558
615
|
}
|
|
559
616
|
|
|
560
617
|
function getColumnObject(seriesMeasures, widget) {
|
|
561
618
|
var chart = getDefaultChartobject();
|
|
562
619
|
chart.type = "scrollcolumn2d";
|
|
563
|
-
var chartInfo = getDefaultChartInfo(
|
|
620
|
+
var chartInfo = getDefaultChartInfo();
|
|
564
621
|
chartInfo.scrollHeight = "5";
|
|
565
622
|
chartInfo.scrollWidth = "5";
|
|
566
623
|
chartInfo.scrollPadding = "8";
|
|
@@ -569,16 +626,24 @@ function getColumnObject(seriesMeasures, widget) {
|
|
|
569
626
|
chartInfo.showLegend = (seriesMeasures === null || seriesMeasures === void 0 ? void 0 : seriesMeasures.length) > 1 ? "1" : "0";
|
|
570
627
|
chartInfo.legendItemFont = defautFont;
|
|
571
628
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
572
|
-
chartInfo
|
|
573
|
-
chartInfo.divLineDashLen = "7";
|
|
629
|
+
setLineDash(chartInfo);
|
|
574
630
|
chartInfo.chartTopMargin = "10";
|
|
575
631
|
chartInfo.chartBottomMargin = "10";
|
|
576
632
|
chartInfo.chartLeftMargin = "20";
|
|
577
633
|
chartInfo.chartRightMargin = "50";
|
|
578
|
-
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
634
|
+
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures, widget);
|
|
579
635
|
return chart;
|
|
580
636
|
}
|
|
581
637
|
|
|
638
|
+
function setLineDash(chartInfo) {
|
|
639
|
+
chartInfo.divLineDashed = "1";
|
|
640
|
+
chartInfo.divLineDashLen = "5";
|
|
641
|
+
chartInfo.divLineDashGap = "5";
|
|
642
|
+
chartInfo.divLineColor = "#E7E7E7";
|
|
643
|
+
chartInfo.divLineAlpha = "100";
|
|
644
|
+
chartInfo.divLineThickness = "1";
|
|
645
|
+
}
|
|
646
|
+
|
|
582
647
|
function getDefaultChartobject() {
|
|
583
648
|
var chart = {};
|
|
584
649
|
chart.type = "column2d";
|
|
@@ -601,45 +666,9 @@ function getDefaultChartInfo(widget) {
|
|
|
601
666
|
chart.chartRightMargin = "40";
|
|
602
667
|
chart.toolTipBgColor = "#FFFFFF";
|
|
603
668
|
chart.showToolTipShadow = "1";
|
|
604
|
-
chart.plottooltext = getTooltip(widget);
|
|
605
669
|
return chart;
|
|
606
670
|
}
|
|
607
671
|
|
|
608
|
-
function getTooltip(widget) {
|
|
609
|
-
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 ";
|
|
610
|
-
}
|
|
611
|
-
function getTooltipPercentage(widget) {
|
|
612
|
-
if (widget.TypeCode != "donut" && widget.TypeCode != "pie") return "";
|
|
613
|
-
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 ";
|
|
614
|
-
}
|
|
615
|
-
function getSeriesPositionColor(position) {
|
|
616
|
-
switch (position) {
|
|
617
|
-
case 1:
|
|
618
|
-
return mainBlueColor;
|
|
619
|
-
|
|
620
|
-
case 2:
|
|
621
|
-
return mainGreenColor;
|
|
622
|
-
|
|
623
|
-
case 3:
|
|
624
|
-
return mainYellowColor;
|
|
625
|
-
|
|
626
|
-
case 4:
|
|
627
|
-
return mainTurquoiseColor;
|
|
628
|
-
|
|
629
|
-
case 5:
|
|
630
|
-
return mainPurpleColor;
|
|
631
|
-
|
|
632
|
-
case 6:
|
|
633
|
-
return mainOrangeColor;
|
|
634
|
-
|
|
635
|
-
case 7:
|
|
636
|
-
return mainRedColor;
|
|
637
|
-
|
|
638
|
-
default:
|
|
639
|
-
return null;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
672
|
ReactFC.fcRoot(FusionCharts, Charts, FusionTheme);
|
|
644
673
|
FusionCharts.options['license']({
|
|
645
674
|
key: 'prD4C-8eiA7A3A3C7E6G4B4A3J4C7B2D3D2nyqE1C3fd1npaE4D4tlA-21D7E4F4F1F1E1F4F1A10A8C2C5F5E2F2D1hwqD1B5D1aG4A19A32twbC6D3G4lhJ-7A9C11A5B-13ddA2I3A1B9B3D7A2B4G2H3H1F-7smC8B2XB4cetB8A7A5mxD3SG4F2tvgB2A3B2E4C3I3C7B3A4A3A2D3D2G4J-7==',
|