pace-chart-lib 1.0.24 → 1.0.26
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/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +1 -1
- package/dist/Components/Charts/Core/Common.types.d.ts +1 -1
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +1 -1
- package/dist/pace-chart-lib.es.js +280 -165
- package/dist/pace-chart-lib.umd.js +280 -165
- package/package.json +1 -1
|
@@ -10851,7 +10851,7 @@ const referenceLineTypes = {
|
|
|
10851
10851
|
Custom: "Custom"
|
|
10852
10852
|
};
|
|
10853
10853
|
var commonColors = /* @__PURE__ */ ((commonColors2) => {
|
|
10854
|
-
commonColors2["white"] = "#
|
|
10854
|
+
commonColors2["white"] = "#ffffff";
|
|
10855
10855
|
commonColors2["black"] = "#000000";
|
|
10856
10856
|
commonColors2["transparent"] = "#FFFFFF00";
|
|
10857
10857
|
return commonColors2;
|
|
@@ -12829,8 +12829,14 @@ function getCurveType(formatOptions) {
|
|
|
12829
12829
|
return stepAfter;
|
|
12830
12830
|
}
|
|
12831
12831
|
}
|
|
12832
|
+
function getSlicedLegendForTornado(legend) {
|
|
12833
|
+
const index2 = legend.indexOf(" - ");
|
|
12834
|
+
if (index2 == -1) return legend;
|
|
12835
|
+
return legend.slice(index2 + 3);
|
|
12836
|
+
}
|
|
12832
12837
|
function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d3Annotation2, labelExcludeList, individualLabelColor, oldAnnotationList, formatOptions, chartType, height, width, innerWidth2, dimensionList, innerHeight2, widgetId, svg, xScaleForLegends, columnWidth, isReportEditable, isSensitivityChart, barChart) {
|
|
12833
12838
|
try {
|
|
12839
|
+
const isTornadoChart = chartType === chartTypes.TornadoChart;
|
|
12834
12840
|
let annotationType = formatOptions.annotation.annotationType ?? "1";
|
|
12835
12841
|
let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
|
|
12836
12842
|
if (formatOptions.annotation.annotationVisibility) {
|
|
@@ -13021,7 +13027,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13021
13027
|
align: barChart && chartType !== chartTypes.TornadoChart ? parseInt(d.LabelPosition) === 2 ? "middle" : "start" : chartType === chartTypes.TornadoChart ? "end" : "middle"
|
|
13022
13028
|
},
|
|
13023
13029
|
data: barChart ? {
|
|
13024
|
-
y: d.Dimension,
|
|
13030
|
+
y: isTornadoChart ? getSlicedLegendForTornado(d.Legend) : d.Dimension,
|
|
13025
13031
|
x: { measure: d.Measure, axis: d.Axis },
|
|
13026
13032
|
position: parseInt(d.LabelPosition),
|
|
13027
13033
|
currentLegend: d.Legend,
|
|
@@ -13052,7 +13058,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13052
13058
|
};
|
|
13053
13059
|
if (barChart) {
|
|
13054
13060
|
let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13055
|
-
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
|
|
13061
|
+
(responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) || chartType === chartTypes.TornadoChart) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
|
|
13056
13062
|
} else {
|
|
13057
13063
|
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && (d.Axis == axisTypes.primary ? yScaleLeft(d.Measure) <= innerHeight2 && yScaleLeft(d.Measure) >= 0 : yScaleRight(d.Measure) <= innerHeight2 && yScaleRight(d.Measure) >= 0) ? annotationsList.push(singleAnnotation) : null;
|
|
13058
13064
|
}
|
|
@@ -13106,7 +13112,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13106
13112
|
);
|
|
13107
13113
|
} else {
|
|
13108
13114
|
if (barChart) {
|
|
13109
|
-
return xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13115
|
+
return isTornadoChart ? xScaleForLegends(d.y) + xScaleForLegends.bandwidth() / 2 : xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13110
13116
|
} else
|
|
13111
13117
|
return dataLabelsPosition(
|
|
13112
13118
|
d.y.measure,
|
|
@@ -13168,7 +13174,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13168
13174
|
y: (d) => yScaleLeft.invert(d.y)
|
|
13169
13175
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
13170
13176
|
if (formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
|
|
13171
|
-
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
13177
|
+
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, barChart);
|
|
13172
13178
|
}
|
|
13173
13179
|
} catch (error) {
|
|
13174
13180
|
throw error;
|
|
@@ -13200,7 +13206,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13200
13206
|
}
|
|
13201
13207
|
for (let i = 0; i < chartData.length; i++) {
|
|
13202
13208
|
chartData.forEach((d) => {
|
|
13203
|
-
if (d.properties.type && d.properties.type !=
|
|
13209
|
+
if (d.properties.type && d.properties.type != chartTypes.ColumnChart && !getChartType.includes(d.properties.type))
|
|
13204
13210
|
getChartType.push(d.properties.type);
|
|
13205
13211
|
});
|
|
13206
13212
|
}
|
|
@@ -13308,6 +13314,168 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13308
13314
|
labelData;
|
|
13309
13315
|
break;
|
|
13310
13316
|
case "6":
|
|
13317
|
+
chartData.forEach((d, k2) => {
|
|
13318
|
+
let annotationVisibility = d.properties.annotation.toString();
|
|
13319
|
+
switch (d.properties.type) {
|
|
13320
|
+
case chartTypes.ColumnChart:
|
|
13321
|
+
switch (annotationVisibility) {
|
|
13322
|
+
case "1":
|
|
13323
|
+
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13324
|
+
labelData.push(d.data[i]);
|
|
13325
|
+
}
|
|
13326
|
+
break;
|
|
13327
|
+
case "2":
|
|
13328
|
+
labelData;
|
|
13329
|
+
break;
|
|
13330
|
+
case "3":
|
|
13331
|
+
labelData.push(d.data[0]);
|
|
13332
|
+
break;
|
|
13333
|
+
case "4":
|
|
13334
|
+
labelData.push(d.data[d.data.length - 1]);
|
|
13335
|
+
break;
|
|
13336
|
+
case "5":
|
|
13337
|
+
labelData.push(d.data[0]);
|
|
13338
|
+
labelData.push(d.data[d.data.length - 1]);
|
|
13339
|
+
break;
|
|
13340
|
+
}
|
|
13341
|
+
break;
|
|
13342
|
+
case chartTypes.AreaChart:
|
|
13343
|
+
case chartTypes.LineChart:
|
|
13344
|
+
switch (annotationVisibility) {
|
|
13345
|
+
case "1":
|
|
13346
|
+
for (let i = 0; i < chartData[k2].data.length; i++) {
|
|
13347
|
+
labelData.push(
|
|
13348
|
+
{
|
|
13349
|
+
dimension: d.data[i].dimension,
|
|
13350
|
+
value: d.data[i].value,
|
|
13351
|
+
legend: d.data[i].legend,
|
|
13352
|
+
labelPosition: d.data[i].labelPosition,
|
|
13353
|
+
labelColor: d.data[i].labelColor,
|
|
13354
|
+
axis: d.data[i].axis,
|
|
13355
|
+
type: chartTypes.LineChart
|
|
13356
|
+
}
|
|
13357
|
+
);
|
|
13358
|
+
}
|
|
13359
|
+
break;
|
|
13360
|
+
case "2":
|
|
13361
|
+
labelData;
|
|
13362
|
+
break;
|
|
13363
|
+
case "3":
|
|
13364
|
+
labelData.push(
|
|
13365
|
+
{
|
|
13366
|
+
dimension: d.data[0].dimension,
|
|
13367
|
+
value: d.data[0].value,
|
|
13368
|
+
legend: d.data[0].legend,
|
|
13369
|
+
labelPosition: d.data[0].labelPosition,
|
|
13370
|
+
labelcolor: d.data[0].labelColor,
|
|
13371
|
+
axis: d.data[0].axis,
|
|
13372
|
+
type: chartTypes.LineChart
|
|
13373
|
+
}
|
|
13374
|
+
);
|
|
13375
|
+
break;
|
|
13376
|
+
case "4":
|
|
13377
|
+
labelData.push(
|
|
13378
|
+
{
|
|
13379
|
+
dimension: d.data[d.data.length - 1].dimension,
|
|
13380
|
+
value: d.data[d.data.length - 1].value,
|
|
13381
|
+
legend: d.data[d.data.length - 1].legend,
|
|
13382
|
+
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13383
|
+
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13384
|
+
axis: d.data[d.data.length - 1].axis,
|
|
13385
|
+
type: chartTypes.LineChart
|
|
13386
|
+
}
|
|
13387
|
+
);
|
|
13388
|
+
break;
|
|
13389
|
+
case "5":
|
|
13390
|
+
labelData.push(
|
|
13391
|
+
{
|
|
13392
|
+
dimension: d.data[0].dimension,
|
|
13393
|
+
value: d.data[0].value,
|
|
13394
|
+
legend: d.data[0].legend,
|
|
13395
|
+
labelPosition: d.data[0].labelPosition,
|
|
13396
|
+
labelcolor: d.data[0].labelColor,
|
|
13397
|
+
axis: d.data[0].axis,
|
|
13398
|
+
type: chartTypes.LineChart
|
|
13399
|
+
}
|
|
13400
|
+
);
|
|
13401
|
+
labelData.push(
|
|
13402
|
+
{
|
|
13403
|
+
dimension: d.data[d.data.length - 1].dimension,
|
|
13404
|
+
value: d.data[d.data.length - 1].value,
|
|
13405
|
+
legend: d.data[d.data.length - 1].legend,
|
|
13406
|
+
labelPosition: d.data[d.data.length - 1].labelPosition,
|
|
13407
|
+
labelcolor: d.data[d.data.length - 1].labelColor,
|
|
13408
|
+
axis: d.data[d.data.length - 1].axis,
|
|
13409
|
+
type: chartTypes.LineChart
|
|
13410
|
+
}
|
|
13411
|
+
);
|
|
13412
|
+
break;
|
|
13413
|
+
}
|
|
13414
|
+
break;
|
|
13415
|
+
case chartTypes.StackColumnChart:
|
|
13416
|
+
const stackColumnIndex = stackColumnData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13417
|
+
stackColumnIndex !== -1 && stackColumnData[stackColumnIndex].forEach((dta, j) => {
|
|
13418
|
+
switch (String(stackColumnData[stackColumnIndex].individualAnnotationVisibility)) {
|
|
13419
|
+
case "1":
|
|
13420
|
+
labelData.push(stackColumnData[stackColumnIndex][j]);
|
|
13421
|
+
break;
|
|
13422
|
+
case "2":
|
|
13423
|
+
labelData;
|
|
13424
|
+
break;
|
|
13425
|
+
case "3":
|
|
13426
|
+
let label3 = stackColumnData[stackColumnIndex][0];
|
|
13427
|
+
if (!labelData.find((data) => data.key == label3.key))
|
|
13428
|
+
labelData.push(label3);
|
|
13429
|
+
break;
|
|
13430
|
+
case "4":
|
|
13431
|
+
let label4 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13432
|
+
if (!labelData.find((data) => data.key == label4.key))
|
|
13433
|
+
labelData.push(label4);
|
|
13434
|
+
break;
|
|
13435
|
+
case "5":
|
|
13436
|
+
let label5 = stackColumnData[stackColumnIndex][0];
|
|
13437
|
+
let label6 = stackColumnData[stackColumnIndex][stackColumnData[0].length - 1];
|
|
13438
|
+
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13439
|
+
labelData.push(stackColumnData[stackColumnIndex][0]);
|
|
13440
|
+
labelData.push(stackColumnData[stackColumnIndex][stackColumnData[0].length - 1]);
|
|
13441
|
+
break;
|
|
13442
|
+
}
|
|
13443
|
+
}
|
|
13444
|
+
});
|
|
13445
|
+
break;
|
|
13446
|
+
case chartTypes.StackAreaChart:
|
|
13447
|
+
const stackIndex = stackAreaData.findIndex((id2) => id2.key === d.properties.legend);
|
|
13448
|
+
stackIndex != -1 && stackAreaData[stackIndex].forEach((dta, j) => {
|
|
13449
|
+
switch (String(stackAreaData[stackIndex].individualAnnotationVisibility)) {
|
|
13450
|
+
case "1":
|
|
13451
|
+
labelData.push(stackAreaData[stackIndex][j]);
|
|
13452
|
+
break;
|
|
13453
|
+
case "2":
|
|
13454
|
+
labelData;
|
|
13455
|
+
break;
|
|
13456
|
+
case "3":
|
|
13457
|
+
let label3 = stackAreaData[stackIndex][0];
|
|
13458
|
+
if (!labelData.find((data) => data.key == label3.key))
|
|
13459
|
+
labelData.push(label3);
|
|
13460
|
+
break;
|
|
13461
|
+
case "4":
|
|
13462
|
+
let label4 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13463
|
+
if (!labelData.find((data) => data.key == label4.key))
|
|
13464
|
+
labelData.push(label4);
|
|
13465
|
+
break;
|
|
13466
|
+
case "5":
|
|
13467
|
+
let label5 = stackAreaData[stackIndex][0];
|
|
13468
|
+
let label6 = stackAreaData[stackIndex][stackAreaData[0].length - 1];
|
|
13469
|
+
if (!labelData.find((data) => data.key == label5.key || data.key == label6.key)) {
|
|
13470
|
+
labelData.push(label5);
|
|
13471
|
+
labelData.push(label6);
|
|
13472
|
+
break;
|
|
13473
|
+
}
|
|
13474
|
+
}
|
|
13475
|
+
});
|
|
13476
|
+
break;
|
|
13477
|
+
}
|
|
13478
|
+
});
|
|
13311
13479
|
break;
|
|
13312
13480
|
}
|
|
13313
13481
|
let maxValue = 0;
|
|
@@ -13340,7 +13508,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13340
13508
|
y: d.value || d.value == 0 ? d.value : d.data.type != chartTypes.StackColumnChart ? d[1] ? d[1] : 0 : d[1] > 0 ? d[1] : d[0],
|
|
13341
13509
|
prevValue: d[0] >= 0 ? d[0] : d[1],
|
|
13342
13510
|
position: parseInt(d.labelPosition) ? parseInt(d.labelPosition) : parseInt(d.data.labelPosition),
|
|
13343
|
-
type: d.
|
|
13511
|
+
type: d.type,
|
|
13344
13512
|
currentLegend: d.legend?.includes("~$~") ? d.legend.split("~$~")[1] : d.key?.includes("~$~") ? d.key.split("~$~")[1] : d.legend ?? d.key,
|
|
13345
13513
|
isVisible: true
|
|
13346
13514
|
},
|
|
@@ -13363,7 +13531,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13363
13531
|
d["legend"] && d.dimension ? (
|
|
13364
13532
|
// ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
|
|
13365
13533
|
// filteredDimensionList.includes(d.Dimension) &&
|
|
13366
|
-
!labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.
|
|
13534
|
+
!labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.axis == axisTypes.primary ? yScaleLeft(d.value) <= innerHeight2 && yScaleLeft(d.value) >= 0 : yScaleRight(d.value) <= innerHeight2 && yScaleRight(d.value) >= 0) ? annotationsList.push(singleAnnotation) : null
|
|
13367
13535
|
) : (
|
|
13368
13536
|
// finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
|
|
13369
13537
|
// this.filteredDimensionList.includes(d.data["Dimension"]) &&
|
|
@@ -13391,17 +13559,15 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13391
13559
|
});
|
|
13392
13560
|
makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
|
|
13393
13561
|
x: function(d) {
|
|
13394
|
-
|
|
13395
|
-
|
|
13562
|
+
const chartType = d.x.type || d.type;
|
|
13563
|
+
if (getChartType.includes(chartType)) {
|
|
13396
13564
|
switch (chartType) {
|
|
13397
|
-
case
|
|
13565
|
+
case chartTypes.StackColumnChart:
|
|
13398
13566
|
return xScale(d.x.dimension) + xScaleForLegends(d.x.stacklegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2;
|
|
13399
|
-
|
|
13400
|
-
case
|
|
13401
|
-
case
|
|
13402
|
-
case "Area":
|
|
13567
|
+
case chartTypes.StackAreaChart:
|
|
13568
|
+
case chartTypes.LineChart:
|
|
13569
|
+
case chartTypes.AreaChart:
|
|
13403
13570
|
return xScale(d.x.dimension);
|
|
13404
|
-
break;
|
|
13405
13571
|
}
|
|
13406
13572
|
} else {
|
|
13407
13573
|
if (d.x.legend) {
|
|
@@ -13411,10 +13577,11 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13411
13577
|
}
|
|
13412
13578
|
},
|
|
13413
13579
|
y: function(d) {
|
|
13580
|
+
const chartType = d.type ?? d.x.type;
|
|
13414
13581
|
if (d.x.axis == axisTypes.primary) {
|
|
13415
|
-
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue,
|
|
13582
|
+
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, chartType);
|
|
13416
13583
|
} else {
|
|
13417
|
-
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue,
|
|
13584
|
+
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, chartType);
|
|
13418
13585
|
}
|
|
13419
13586
|
}
|
|
13420
13587
|
}).on("dragend", function(annotation2) {
|
|
@@ -13455,7 +13622,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13455
13622
|
y: (d) => d.x.axis == axisTypes.primary ? yScaleLeft.invert(d.y) : yScaleRight.invert(d.y)
|
|
13456
13623
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
13457
13624
|
if (!formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
|
|
13458
|
-
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
13625
|
+
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, false);
|
|
13459
13626
|
}
|
|
13460
13627
|
} catch (error) {
|
|
13461
13628
|
throw error;
|
|
@@ -14607,13 +14774,13 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
14607
14774
|
y: (d) => yScaleLeft.invert(d.y)
|
|
14608
14775
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
14609
14776
|
if (true) svg.selectAll(".annotation-group").remove();
|
|
14610
|
-
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
14777
|
+
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType, false);
|
|
14611
14778
|
}
|
|
14612
14779
|
} catch (error) {
|
|
14613
14780
|
throw error;
|
|
14614
14781
|
}
|
|
14615
14782
|
}
|
|
14616
|
-
const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType) => {
|
|
14783
|
+
const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType, isBarChart) => {
|
|
14617
14784
|
svg.selectAll(".annotation-group").remove();
|
|
14618
14785
|
let annotations = svg.append("g").attr("id", "annotationGroup").attr("class", "annotation-group parentGroup").attr("transform", `translate(${margin.left},${margin.top})`).style("fill", formatOptions.annotation.annotationColor).style("font-family", formatOptions.annotation.annotationFontFamily).style("font-size", formatOptions.annotation.annotationFontSize).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
14619
14786
|
"text-decoration",
|
|
@@ -14634,7 +14801,10 @@ const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotation
|
|
|
14634
14801
|
return `translate(${currentX}, 0)`;
|
|
14635
14802
|
}
|
|
14636
14803
|
});
|
|
14637
|
-
annotations.selectAll("text").
|
|
14804
|
+
annotations.selectAll("text").style(
|
|
14805
|
+
"text-anchor",
|
|
14806
|
+
(d) => isBarChart ? d.data.position == "2" ? "middle" : "start" : "start"
|
|
14807
|
+
).append("text").style("fill", formatOptions.annotation.annotationColor !== commonColors.white ? formatOptions.annotation.annotationColor : "none");
|
|
14638
14808
|
annotations.selectAll("tspan").attr("hoverId", (d) => d.data.hoverId ? d.data.hoverId : d.data.currentLegend.replaceAll(" ", "-")).style("visibility", (d) => parseFloat(d.data.y) == 0 && formatOptions.annotation.annotationHideZeroValues ? "hidden" : "visible");
|
|
14639
14809
|
return annotations;
|
|
14640
14810
|
};
|
|
@@ -15373,7 +15543,7 @@ const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCus
|
|
|
15373
15543
|
logError$2(fileName$b, "checkVisibleConditions", error);
|
|
15374
15544
|
}
|
|
15375
15545
|
};
|
|
15376
|
-
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType) {
|
|
15546
|
+
function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDimension, lineData, xScale, yScaleLeft, chartType, isStackChart) {
|
|
15377
15547
|
try {
|
|
15378
15548
|
let mousemove = function(event2) {
|
|
15379
15549
|
try {
|
|
@@ -15387,13 +15557,14 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
|
|
|
15387
15557
|
}
|
|
15388
15558
|
let mindiff = 1e99;
|
|
15389
15559
|
for (let k2 = 0; k2 < lineData.length; k2++) {
|
|
15390
|
-
|
|
15560
|
+
const requiredValue = isStackChart ? lineData[k2].data[dimensionIndex].value > 0 ? lineData[k2].data[dimensionIndex][1] : lineData[k2].data[dimensionIndex][0] : lineData[k2].data[dimensionIndex].value;
|
|
15561
|
+
let diff1 = Math.abs(m[1] - yScaleLeft(requiredValue));
|
|
15391
15562
|
if (diff1 < mindiff) {
|
|
15392
15563
|
mindiff = diff1;
|
|
15393
15564
|
legendIndex = k2;
|
|
15394
15565
|
}
|
|
15395
15566
|
}
|
|
15396
|
-
focus.attr("transform", getCoordinates(lineData[legendIndex], dimensionIndex, xScale, yScaleLeft)).append("circle").attr("r", lineData[legendIndex].properties.markerSize * 2.5).attr("id", "tooltip").attr("fill", lineData[legendIndex].properties.markerColor).text(showTooltipOnMouseMove([
|
|
15567
|
+
focus.attr("transform", getCoordinates(lineData[legendIndex], dimensionIndex, xScale, yScaleLeft, isStackChart)).append("circle").attr("r", lineData[legendIndex].properties.markerSize * 2.5).attr("id", "tooltip").attr("fill", lineData[legendIndex].properties.markerColor).text(showTooltipOnMouseMove([
|
|
15397
15568
|
{ key: formatOptions.xAxisTitle.xAxisTitleText, value: lineData[legendIndex].data[dimensionIndex].dimension },
|
|
15398
15569
|
{
|
|
15399
15570
|
key: lineData[legendIndex].properties.currentMeasure ? lineData[legendIndex].properties.currentMeasure : this.basestyle.YAxisTitle.YAxisTitleText,
|
|
@@ -15401,7 +15572,7 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
|
|
|
15401
15572
|
},
|
|
15402
15573
|
{ key: "Legend", value: lineData[legendIndex].data[dimensionIndex].legend.includes("~$~") ? lineData[legendIndex].data[dimensionIndex].legend.split("~$~")[1] : lineData[legendIndex].data[dimensionIndex].legend }
|
|
15403
15574
|
// { key: "Calculated Tooltip", value: lineData[legendIndex].data[dimensionIndex]. },
|
|
15404
|
-
], formatOptions));
|
|
15575
|
+
], formatOptions, void 0, lineData[legendIndex].properties));
|
|
15405
15576
|
} catch (error) {
|
|
15406
15577
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily.mousemove", error);
|
|
15407
15578
|
}
|
|
@@ -15419,9 +15590,10 @@ function onHoverMarkerForAreaChartFamily(formatOptions, areas, focus, filteredDi
|
|
|
15419
15590
|
logError$2(fileName$b, "onHoverMarkerForAreaChartFamily", error);
|
|
15420
15591
|
}
|
|
15421
15592
|
}
|
|
15422
|
-
const getCoordinates = (chartData, pos, xScale, yScaleLeft) => {
|
|
15593
|
+
const getCoordinates = (chartData, pos, xScale, yScaleLeft, isStackChart) => {
|
|
15423
15594
|
try {
|
|
15424
|
-
|
|
15595
|
+
const requiredValue = isStackChart ? chartData.data[pos].value > 0 ? chartData.data[pos][1] : chartData.data[pos][0] : chartData.data[pos].value;
|
|
15596
|
+
return `translate(${xScale(chartData.data[pos].dimension)},${yScaleLeft(requiredValue)})`;
|
|
15425
15597
|
} catch (error) {
|
|
15426
15598
|
logError$2(fileName$b, "getCoordinates", error);
|
|
15427
15599
|
}
|
|
@@ -15734,13 +15906,13 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
|
|
|
15734
15906
|
justifyContent = alignment == horizontalLegendAllignment.start ? "start" : alignment == horizontalLegendAllignment.middle ? "center" : "end";
|
|
15735
15907
|
}
|
|
15736
15908
|
let object2 = svg.append("foreignObject").attr("x", x2).attr("y", y2).style("pointer-events", "auto").attr("width", width + "px").attr("height", height + "px").style("user-select", "none");
|
|
15737
|
-
var div = object2.append("xhtml:div").attr("id", "legendObject" + chartId).attr("class", "legendsBoxWrapper").style("width", width + "px").style("display", "flex").style("height", height - 1 + "px").style("overflow", "auto").style("pointer-events", "auto").style("justify-content", justifyContent).style("flex-direction", flexDirection).style(
|
|
15909
|
+
var div = object2.append("xhtml:div").attr("id", "legendObject" + chartId).attr("class", "legendsBoxWrapper").style("width", width + "px").style("display", "flex").style("height", height - 1 + "px").style("overflow", "auto").style("pointer-events", "auto").style("justify-content", "safe " + justifyContent).style("flex-direction", flexDirection).style(
|
|
15738
15910
|
"outline-offset",
|
|
15739
15911
|
"-" + chartFormatOptions.legends.legendBorderThickness + "px"
|
|
15740
15912
|
).style(
|
|
15741
15913
|
"outline",
|
|
15742
15914
|
chartFormatOptions.legends.legendBorder ? `${chartFormatOptions.legends.legendBorderThickness + "px solid" + chartFormatOptions.legends.legendBorderColor}` : "none"
|
|
15743
|
-
).append("div").attr("class", "scrollbar").style("display", "flex").style("
|
|
15915
|
+
).append("div").attr("class", "scrollbar").style("display", "flex").style("flex-direction", flexDirection).style("flex-wrap", "nowrap").style("padding-left", "3px");
|
|
15744
15916
|
if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
|
|
15745
15917
|
div.style("flex-direction", "row");
|
|
15746
15918
|
seriesData.forEach((d, i) => {
|
|
@@ -15786,7 +15958,10 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
|
|
|
15786
15958
|
}
|
|
15787
15959
|
let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
|
|
15788
15960
|
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
15789
|
-
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
|
|
15961
|
+
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style(
|
|
15962
|
+
"background",
|
|
15963
|
+
d.properties.axis == axisTypes.secondary && chartFormatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor
|
|
15964
|
+
).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
|
|
15790
15965
|
"font-style",
|
|
15791
15966
|
() => {
|
|
15792
15967
|
let style = !isVennChart ? d.properties.fontStyle : chartFormatOptions.legends.legendFontStyle;
|
|
@@ -15827,7 +16002,7 @@ function getHollowCircleShape(d, innerDiv) {
|
|
|
15827
16002
|
}
|
|
15828
16003
|
function getLineShape(d, innerDiv, formatOptions) {
|
|
15829
16004
|
try {
|
|
15830
|
-
let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties
|
|
16005
|
+
let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties?.lineStyle?.toLowerCase() == "solid" ? d.properties.color : commonColors.transparent).style("position", "relative").style("border-top", d.properties.lineStyle == "None" ? "unset" : d.properties.lineStyle == "dotted" ? "2px dotted " + d.properties.color : "2px dashed " + d.properties.color);
|
|
15831
16006
|
if (formatOptions.marker.markerVisibility) {
|
|
15832
16007
|
switch (d.properties.markerShape.toLowerCase()) {
|
|
15833
16008
|
case "circle":
|
|
@@ -16721,10 +16896,7 @@ const ColumnChart = ({
|
|
|
16721
16896
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
16722
16897
|
});
|
|
16723
16898
|
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
16724
|
-
|
|
16725
|
-
gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
|
|
16726
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
16727
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
16899
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
16728
16900
|
showTooltipOnMouseMove(
|
|
16729
16901
|
[
|
|
16730
16902
|
{
|
|
@@ -16756,10 +16928,7 @@ const ColumnChart = ({
|
|
|
16756
16928
|
data2.properties
|
|
16757
16929
|
);
|
|
16758
16930
|
}).on("mouseout", (event2, d) => {
|
|
16759
|
-
|
|
16760
|
-
gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
|
|
16761
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
16762
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
16931
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
16763
16932
|
hideTooltipOnMouseOut();
|
|
16764
16933
|
});
|
|
16765
16934
|
columnGroups.exit().remove().each(function(d) {
|
|
@@ -17116,9 +17285,13 @@ const CustomColumnChart = ({
|
|
|
17116
17285
|
seriesData.forEach((series, i) => {
|
|
17117
17286
|
if (![chartTypes.StackColumnChart, chartTypes.StackAreaChart].includes(series.properties.type)) {
|
|
17118
17287
|
tempChartData.push(series);
|
|
17119
|
-
series.properties.type !== chartTypes.LineChart && legendList.push(series.legend);
|
|
17120
|
-
} else
|
|
17121
|
-
|
|
17288
|
+
series.properties.type !== chartTypes.LineChart && series.properties.type !== chartTypes.AreaChart && legendList.push(series.legend);
|
|
17289
|
+
} else {
|
|
17290
|
+
if (chartTypes.StackColumnChart === series.properties.type) {
|
|
17291
|
+
if (!legendList.includes(chartTypes.StackColumnChart)) {
|
|
17292
|
+
legendList.push(chartTypes.StackColumnChart);
|
|
17293
|
+
}
|
|
17294
|
+
}
|
|
17122
17295
|
}
|
|
17123
17296
|
if (series.properties.axis === "Secondary") {
|
|
17124
17297
|
secondaryStackAxisData.push(series);
|
|
@@ -17138,7 +17311,7 @@ const CustomColumnChart = ({
|
|
|
17138
17311
|
primaryStackAreaAxisData.push(series);
|
|
17139
17312
|
}
|
|
17140
17313
|
}
|
|
17141
|
-
series.data.
|
|
17314
|
+
series.data = series.data.map((point2) => {
|
|
17142
17315
|
const newPoint = {
|
|
17143
17316
|
...point2,
|
|
17144
17317
|
type: series.properties.type,
|
|
@@ -17146,7 +17319,7 @@ const CustomColumnChart = ({
|
|
|
17146
17319
|
labelPosition: series.properties.dataLabelPosition,
|
|
17147
17320
|
labelColor: series.properties.labelColor
|
|
17148
17321
|
};
|
|
17149
|
-
if (
|
|
17322
|
+
if (newPoint.axis === "Secondary") {
|
|
17150
17323
|
isSecondaryAxisDrawn = true;
|
|
17151
17324
|
yMaxRight = Math.max(yMaxRight, newPoint.value);
|
|
17152
17325
|
yMinRight = Math.min(yMinRight, newPoint.value);
|
|
@@ -17154,6 +17327,7 @@ const CustomColumnChart = ({
|
|
|
17154
17327
|
yMaxLeft = Math.max(yMaxLeft, newPoint.value);
|
|
17155
17328
|
yMinLeft = Math.min(yMinLeft, newPoint.value);
|
|
17156
17329
|
}
|
|
17330
|
+
return newPoint;
|
|
17157
17331
|
});
|
|
17158
17332
|
});
|
|
17159
17333
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
@@ -17217,7 +17391,8 @@ const CustomColumnChart = ({
|
|
|
17217
17391
|
properties: {
|
|
17218
17392
|
axis: d.properties.axis,
|
|
17219
17393
|
type: d.properties.type,
|
|
17220
|
-
legend: d.properties.legend
|
|
17394
|
+
legend: d.properties.legend,
|
|
17395
|
+
annotation: d.properties.annotation
|
|
17221
17396
|
},
|
|
17222
17397
|
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17223
17398
|
data: primaryStackAreaAxisData2
|
|
@@ -17228,7 +17403,8 @@ const CustomColumnChart = ({
|
|
|
17228
17403
|
properties: {
|
|
17229
17404
|
axis: d.properties.axis,
|
|
17230
17405
|
type: d.properties.type,
|
|
17231
|
-
legend: d.properties.legend
|
|
17406
|
+
legend: d.properties.legend,
|
|
17407
|
+
annotation: d.properties.annotation
|
|
17232
17408
|
},
|
|
17233
17409
|
stackData: tempStackAreaChartDataForSecondaryAxis,
|
|
17234
17410
|
data: secondaryStackAreaAxisData2
|
|
@@ -17239,7 +17415,8 @@ const CustomColumnChart = ({
|
|
|
17239
17415
|
properties: {
|
|
17240
17416
|
axis: d.properties.axis,
|
|
17241
17417
|
type: d.properties.type,
|
|
17242
|
-
legend: d.properties.legend
|
|
17418
|
+
legend: d.properties.legend,
|
|
17419
|
+
annotation: d.properties.annotation
|
|
17243
17420
|
},
|
|
17244
17421
|
stackData: tempStackColumnChartDataForPrimaryAxis,
|
|
17245
17422
|
data: primaryStackColumnAxisData2
|
|
@@ -17250,7 +17427,8 @@ const CustomColumnChart = ({
|
|
|
17250
17427
|
properties: {
|
|
17251
17428
|
axis: d.properties.axis,
|
|
17252
17429
|
type: d.properties.type,
|
|
17253
|
-
legend: d.properties.legend
|
|
17430
|
+
legend: d.properties.legend,
|
|
17431
|
+
annotation: d.properties.annotation
|
|
17254
17432
|
},
|
|
17255
17433
|
stackData: tempStackColumnChartDataForSecondaryAxis,
|
|
17256
17434
|
data: secondaryStackColumnAxisData2
|
|
@@ -17272,17 +17450,6 @@ const CustomColumnChart = ({
|
|
|
17272
17450
|
}
|
|
17273
17451
|
};
|
|
17274
17452
|
const initScale = () => {
|
|
17275
|
-
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
17276
|
-
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
|
|
17277
|
-
chartJSON.yMinLeft,
|
|
17278
|
-
innerHeight2,
|
|
17279
|
-
formatOptions,
|
|
17280
|
-
chartJSON,
|
|
17281
|
-
customYaxisMinValue,
|
|
17282
|
-
customYaxisMaxValue
|
|
17283
|
-
).yAxisLabelArray;
|
|
17284
|
-
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
17285
|
-
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
17286
17453
|
{
|
|
17287
17454
|
yScaleLeft = linear$1().domain([
|
|
17288
17455
|
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
@@ -17293,14 +17460,6 @@ const CustomColumnChart = ({
|
|
|
17293
17460
|
]);
|
|
17294
17461
|
}
|
|
17295
17462
|
if (isSecondaryAxisDrawn) {
|
|
17296
|
-
let secondaryYAxisLabelArray = responsiveSecondaryYaxisLabel(
|
|
17297
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
17298
|
-
secondaryCustomYaxisMinValue ? secondaryCustomYaxisMinValue : chartJSON.yMinRight,
|
|
17299
|
-
formatOptions,
|
|
17300
|
-
chartJSON
|
|
17301
|
-
).secondaryYAxisLabelArray;
|
|
17302
|
-
chartJSON.yMaxRight = secondaryYAxisLabelArray[secondaryYAxisLabelArray.length - 1];
|
|
17303
|
-
chartJSON.yMinRight = secondaryYAxisLabelArray[0];
|
|
17304
17463
|
yScaleRight = linear$1().domain([
|
|
17305
17464
|
chartJSON.yMinRight >= 0 ? (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : 0 : (secondaryCustomYaxisMinValue || secondaryCustomYaxisMinValue == 0) && !Number.isNaN(secondaryCustomYaxisMinValue) ? secondaryCustomYaxisMinValue : chartJSON.yMinRight * 1.1,
|
|
17306
17465
|
chartJSON.yMaxRight <= 0 ? (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : 0 : (secondaryCustomYaxisMaxValue || secondaryCustomYaxisMaxValue == 0) && !Number.isNaN(secondaryCustomYaxisMaxValue) ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight * 1.1
|
|
@@ -17312,7 +17471,7 @@ const CustomColumnChart = ({
|
|
|
17312
17471
|
calculatedRange = [0, innerWidth2];
|
|
17313
17472
|
};
|
|
17314
17473
|
const getXScale = () => {
|
|
17315
|
-
xScaleForLegends = band().domain(chartJSON.legendList
|
|
17474
|
+
xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
|
|
17316
17475
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
17317
17476
|
);
|
|
17318
17477
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -17487,7 +17646,7 @@ const CustomColumnChart = ({
|
|
|
17487
17646
|
).append("path").attr("class", "line").attr("fill", "none");
|
|
17488
17647
|
lineGroupsEnter.merge(lineGroups).select("path").attr("d", (d) => lineGenerator(d.data)).attr(
|
|
17489
17648
|
"stroke",
|
|
17490
|
-
(d) => d.properties
|
|
17649
|
+
(d) => d.properties !== commonColors.white ? d.properties.color : "none"
|
|
17491
17650
|
).attr("stroke-dasharray", (d) => {
|
|
17492
17651
|
switch (d.properties.lineStyle) {
|
|
17493
17652
|
case staticLineStyle.dotted:
|
|
@@ -17670,7 +17829,7 @@ const CustomColumnChart = ({
|
|
|
17670
17829
|
).merge(rects).attr(
|
|
17671
17830
|
"hoverId",
|
|
17672
17831
|
(d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
|
|
17673
|
-
).attr("x", (d) => xScaleForLegends(
|
|
17832
|
+
).attr("x", (d) => xScaleForLegends(chartTypes.StackColumnChart)).attr(
|
|
17674
17833
|
"y",
|
|
17675
17834
|
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17676
17835
|
).attr(
|
|
@@ -17807,7 +17966,7 @@ const CustomColumnChart = ({
|
|
|
17807
17966
|
};
|
|
17808
17967
|
const createStackData = (requiredStackChatData) => {
|
|
17809
17968
|
let legendList = requiredStackChatData.data.map((d) => d.legend);
|
|
17810
|
-
stackChartData = stack().keys(legendList).offset(
|
|
17969
|
+
stackChartData = stack().keys(legendList).offset(none$3)(requiredStackChatData.stackData);
|
|
17811
17970
|
requiredStackChatData.data.forEach(
|
|
17812
17971
|
(data2, index2) => data2.data.forEach((axisData, position) => {
|
|
17813
17972
|
axisData["0"] = stackChartData[index2][position][0];
|
|
@@ -17821,6 +17980,9 @@ const CustomColumnChart = ({
|
|
|
17821
17980
|
stackData["color"] = JSON.parse(
|
|
17822
17981
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
17823
17982
|
);
|
|
17983
|
+
stackData["individualAnnotationVisibility"] = JSON.parse(
|
|
17984
|
+
JSON.stringify(requiredStackChatData.data[j].properties.annotation)
|
|
17985
|
+
);
|
|
17824
17986
|
d.data.labelPosition = requiredStackChatData.data[j].properties.dataLabelPosition;
|
|
17825
17987
|
d.data["labelColor"] = seriesColor == "2" ? JSON.parse(
|
|
17826
17988
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
@@ -17840,7 +18002,7 @@ const CustomColumnChart = ({
|
|
|
17840
18002
|
d.data["color"] = JSON.parse(
|
|
17841
18003
|
JSON.stringify(requiredStackChatData.data[j].properties.color)
|
|
17842
18004
|
);
|
|
17843
|
-
d.data["legend"] =
|
|
18005
|
+
d.data["legend"] = requiredStackChatData.properties.type;
|
|
17844
18006
|
d.data["type"] = JSON.parse(
|
|
17845
18007
|
JSON.stringify(requiredStackChatData.data[j].properties.type)
|
|
17846
18008
|
);
|
|
@@ -17856,7 +18018,15 @@ const CustomColumnChart = ({
|
|
|
17856
18018
|
chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
|
|
17857
18019
|
}
|
|
17858
18020
|
if (secondaryStackAxisData.length > 0) {
|
|
17859
|
-
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
|
|
18021
|
+
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(
|
|
18022
|
+
filteredDimension,
|
|
18023
|
+
secondaryStackColumnAxisData,
|
|
18024
|
+
false
|
|
18025
|
+
) : getStackedData(
|
|
18026
|
+
filteredDimension,
|
|
18027
|
+
secondaryStackAreaAxisData,
|
|
18028
|
+
false
|
|
18029
|
+
);
|
|
17860
18030
|
const totals = stackData.map((d) => d.total);
|
|
17861
18031
|
chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
|
|
17862
18032
|
chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
|
|
@@ -18765,18 +18935,8 @@ const StackColumnChart = ({
|
|
|
18765
18935
|
event2,
|
|
18766
18936
|
d.properties
|
|
18767
18937
|
);
|
|
18768
|
-
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18769
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
18770
|
-
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18771
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
18772
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
18773
18938
|
}).on("mouseout", (event2, d) => {
|
|
18774
18939
|
hideTooltipOnMouseOut();
|
|
18775
|
-
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
18776
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
|
|
18777
|
-
let legend = d?.properties.alias ? getHoverId(d?.properties.alias) : getHoverId(d.key);
|
|
18778
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
18779
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
18780
18940
|
});
|
|
18781
18941
|
const finalRects = baseRects;
|
|
18782
18942
|
finalRects.attr("y", (d) => d[1] >= d[0] ? yScaleLeft(d[1]) : yScaleLeft(d[0])).attr("height", (d) => Math.abs(yScaleLeft(d[0]) - yScaleLeft(d[1])));
|
|
@@ -19514,18 +19674,8 @@ const NormalizedStackColumnChart = ({
|
|
|
19514
19674
|
event2,
|
|
19515
19675
|
d.properties
|
|
19516
19676
|
);
|
|
19517
|
-
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
19518
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
19519
|
-
const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
|
|
19520
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
19521
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
19522
19677
|
}).on("mouseout", (event2, d) => {
|
|
19523
19678
|
hideTooltipOnMouseOut();
|
|
19524
|
-
const dim = Array.isArray(d.data.dimension) && d.data.dimension.length ? d.data.dimension[0] : d.data.dimension;
|
|
19525
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
|
|
19526
|
-
const legend = (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-");
|
|
19527
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
19528
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
19529
19679
|
});
|
|
19530
19680
|
columnGroups.exit().remove();
|
|
19531
19681
|
gTag.selectAll(".parentGroup").raise();
|
|
@@ -22576,7 +22726,9 @@ const HorizontalBarChart = ({
|
|
|
22576
22726
|
formatOptions,
|
|
22577
22727
|
chartJSON,
|
|
22578
22728
|
customYaxisMinValue,
|
|
22579
|
-
customYaxisMaxValue
|
|
22729
|
+
customYaxisMaxValue,
|
|
22730
|
+
barChart,
|
|
22731
|
+
innerWidth2
|
|
22580
22732
|
).yAxisLabelArray;
|
|
22581
22733
|
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
22582
22734
|
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
@@ -22616,7 +22768,8 @@ const HorizontalBarChart = ({
|
|
|
22616
22768
|
chartJSON,
|
|
22617
22769
|
customYaxisMinValue,
|
|
22618
22770
|
customYaxisMaxValue,
|
|
22619
|
-
barChart
|
|
22771
|
+
barChart,
|
|
22772
|
+
innerWidth2
|
|
22620
22773
|
);
|
|
22621
22774
|
xAxisBottom = axisBottom(xScaleBottom).tickFormat(
|
|
22622
22775
|
(d) => getNumberWithFormat(
|
|
@@ -22716,10 +22869,7 @@ const HorizontalBarChart = ({
|
|
|
22716
22869
|
}
|
|
22717
22870
|
});
|
|
22718
22871
|
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
22719
|
-
|
|
22720
|
-
gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "visible");
|
|
22721
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
22722
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
22872
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
22723
22873
|
showTooltipOnMouseMove(
|
|
22724
22874
|
[
|
|
22725
22875
|
{
|
|
@@ -22751,10 +22901,7 @@ const HorizontalBarChart = ({
|
|
|
22751
22901
|
data2.properties
|
|
22752
22902
|
);
|
|
22753
22903
|
}).on("mouseout", (event2, d) => {
|
|
22754
|
-
|
|
22755
|
-
gTag.select(`#dim-background-${d.dimension}`).attr("visibility", "hidden");
|
|
22756
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
22757
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
22904
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(/ /g, "-");
|
|
22758
22905
|
hideTooltipOnMouseOut();
|
|
22759
22906
|
});
|
|
22760
22907
|
columnGroups.exit().remove();
|
|
@@ -23186,7 +23333,6 @@ const StackHorizontalChart = ({
|
|
|
23186
23333
|
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
23187
23334
|
}).on("mousemove", (event2, d) => {
|
|
23188
23335
|
const dim = d.data.dimension;
|
|
23189
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
23190
23336
|
showTooltipOnMouseMove(
|
|
23191
23337
|
[
|
|
23192
23338
|
{
|
|
@@ -23211,15 +23357,8 @@ const StackHorizontalChart = ({
|
|
|
23211
23357
|
event2,
|
|
23212
23358
|
d.properties
|
|
23213
23359
|
);
|
|
23214
|
-
let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
|
|
23215
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
23216
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
23217
23360
|
}).on("mouseout", (event2, d) => {
|
|
23218
|
-
|
|
23219
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "hidden");
|
|
23220
|
-
let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
|
|
23221
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
23222
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
23361
|
+
d.data.dimension;
|
|
23223
23362
|
hideTooltipOnMouseOut();
|
|
23224
23363
|
});
|
|
23225
23364
|
baseRects.attr("x", (d) => xScaleBottom(0));
|
|
@@ -23887,7 +24026,6 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23887
24026
|
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
23888
24027
|
}).on("mousemove", (event2, d) => {
|
|
23889
24028
|
const dim = d.data.dimension;
|
|
23890
|
-
gTag.select(`#dim-background-${dim}`).attr("visibility", "visible");
|
|
23891
24029
|
showTooltipOnMouseMove(
|
|
23892
24030
|
[
|
|
23893
24031
|
{
|
|
@@ -23912,14 +24050,10 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23912
24050
|
event2,
|
|
23913
24051
|
d.properties
|
|
23914
24052
|
);
|
|
23915
|
-
let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
|
|
23916
|
-
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
23917
|
-
selectAll('[hoverId="' + legend + '"]').classed("highlight", true).classed("unhighlight", false);
|
|
23918
24053
|
}).on("mouseout", (event2, d) => {
|
|
23919
24054
|
let legend = (d.properties.alias || d.properties.name || "Legend").replace(/ /g, "-");
|
|
23920
24055
|
selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
23921
24056
|
selectAll('[hoverId="' + legend + '"]').classed("highlight", false).classed("unhighlight", false);
|
|
23922
|
-
gTag.select(`#dim-background-${d.data.dimension}`).attr("visibility", "hidden");
|
|
23923
24057
|
hideTooltipOnMouseOut();
|
|
23924
24058
|
});
|
|
23925
24059
|
const finalRects = baseRects;
|
|
@@ -25569,6 +25703,7 @@ const AreaChart = ({
|
|
|
25569
25703
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
25570
25704
|
};
|
|
25571
25705
|
const getChartType = (lineData) => {
|
|
25706
|
+
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
25572
25707
|
lineData.forEach((lData) => {
|
|
25573
25708
|
lData.data.forEach((cData) => {
|
|
25574
25709
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -25620,18 +25755,9 @@ const AreaChart = ({
|
|
|
25620
25755
|
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
|
|
25621
25756
|
).attr(
|
|
25622
25757
|
"stroke-width",
|
|
25623
|
-
(d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25758
|
+
(d2) => !isLinesAndMarkersVisible ? 0 : d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25624
25759
|
).attr("fill", "none");
|
|
25625
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise()
|
|
25626
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
|
|
25627
|
-
svg.selectAll(
|
|
25628
|
-
'[hoverId="' + getJQuerySelector(
|
|
25629
|
-
d2.properties?.alias || d2.properties?.name || "Legend"
|
|
25630
|
-
).replace(/\s+/g, "-") + '"]'
|
|
25631
|
-
).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
|
|
25632
|
-
}).on("mouseleave", function(event2, d2) {
|
|
25633
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
|
|
25634
|
-
});
|
|
25760
|
+
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise();
|
|
25635
25761
|
onHoverMarkerForAreaChartFamily(
|
|
25636
25762
|
formatOptions,
|
|
25637
25763
|
areas,
|
|
@@ -26118,6 +26244,7 @@ const StackAreaChart = ({
|
|
|
26118
26244
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26119
26245
|
};
|
|
26120
26246
|
const getChartType = (lineData) => {
|
|
26247
|
+
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26121
26248
|
lineData.forEach((lData) => {
|
|
26122
26249
|
lData.data.forEach((cData) => {
|
|
26123
26250
|
cData.hideZero = lData.properties.hideZeroValues;
|
|
@@ -26151,7 +26278,7 @@ const StackAreaChart = ({
|
|
|
26151
26278
|
const g = select$2(this);
|
|
26152
26279
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
26153
26280
|
"stroke",
|
|
26154
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26281
|
+
(d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
|
|
26155
26282
|
).attr("stroke-dasharray", (d2) => {
|
|
26156
26283
|
const lineWidth = parseInt(
|
|
26157
26284
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -26169,16 +26296,9 @@ const StackAreaChart = ({
|
|
|
26169
26296
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26170
26297
|
).attr(
|
|
26171
26298
|
"stroke-width",
|
|
26172
|
-
(
|
|
26299
|
+
() => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
|
|
26173
26300
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26174
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise()
|
|
26175
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
26176
|
-
svg.selectAll(
|
|
26177
|
-
'[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
|
|
26178
|
-
).classed("highlight", true).classed("unhighlight", false);
|
|
26179
|
-
}).on("mouseleave", function() {
|
|
26180
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
26181
|
-
});
|
|
26301
|
+
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill", commonColors.transparent).attr("stroke", "none").style("pointer-events", "all").raise();
|
|
26182
26302
|
svg.selectAll(
|
|
26183
26303
|
'[hoverId="' + (seriesData[d.index].properties.alias || seriesData[d.index].properties.name || "Legend").replace(/ /g, "-") + '"]'
|
|
26184
26304
|
).classed("highlight", false).classed("unhighlight", false);
|
|
@@ -26192,7 +26312,8 @@ const StackAreaChart = ({
|
|
|
26192
26312
|
lineData,
|
|
26193
26313
|
xScale,
|
|
26194
26314
|
yScaleLeft,
|
|
26195
|
-
chartType
|
|
26315
|
+
chartType,
|
|
26316
|
+
true
|
|
26196
26317
|
);
|
|
26197
26318
|
lineMarkers(
|
|
26198
26319
|
areas,
|
|
@@ -26672,6 +26793,7 @@ const NormalizedStackAreaChart = ({
|
|
|
26672
26793
|
).tickSizeOuter(0).tickValues(responsiveXaxisLabel(filteredDimension, innerWidth2));
|
|
26673
26794
|
};
|
|
26674
26795
|
const getChartType = (lineData) => {
|
|
26796
|
+
const isLinesAndMarkersVisible = formatOptions.plotArea.plotAreaHideLineAndMarkers;
|
|
26675
26797
|
stackChartData.forEach(
|
|
26676
26798
|
(data2, i) => data2.forEach((item, position) => {
|
|
26677
26799
|
const total = item.data.total;
|
|
@@ -26713,7 +26835,7 @@ const NormalizedStackAreaChart = ({
|
|
|
26713
26835
|
const g = select$2(this);
|
|
26714
26836
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26715
26837
|
"stroke",
|
|
26716
|
-
(d2) => d2.color !== commonColors.white ?
|
|
26838
|
+
(d2) => d2.color !== commonColors.white ? seriesData[i].properties.areaBorderColor : "none"
|
|
26717
26839
|
).attr("stroke-dasharray", (d2) => {
|
|
26718
26840
|
const lineWidth = parseInt(
|
|
26719
26841
|
seriesData[i].properties.lineWidth.toString()
|
|
@@ -26731,18 +26853,9 @@ const NormalizedStackAreaChart = ({
|
|
|
26731
26853
|
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26732
26854
|
).attr(
|
|
26733
26855
|
"stroke-width",
|
|
26734
|
-
(
|
|
26856
|
+
() => !isLinesAndMarkersVisible ? 0 : seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : "0"
|
|
26735
26857
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26736
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill", commonColors.transparent).style("pointer-events", "all").raise()
|
|
26737
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
26738
|
-
svg.selectAll(
|
|
26739
|
-
'[hoverId="' + getJQuerySelector(
|
|
26740
|
-
(lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
26741
|
-
) + '"]'
|
|
26742
|
-
).classed("highlight", true).classed("unhighlight", false);
|
|
26743
|
-
}).on("mouseleave", function() {
|
|
26744
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
26745
|
-
});
|
|
26858
|
+
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill", commonColors.transparent).style("pointer-events", "all").raise();
|
|
26746
26859
|
svg.selectAll(
|
|
26747
26860
|
'[hoverId="' + getJQuerySelector(
|
|
26748
26861
|
(lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
@@ -26758,7 +26871,8 @@ const NormalizedStackAreaChart = ({
|
|
|
26758
26871
|
lineData,
|
|
26759
26872
|
xScale,
|
|
26760
26873
|
yScaleLeft,
|
|
26761
|
-
chartType
|
|
26874
|
+
chartType,
|
|
26875
|
+
true
|
|
26762
26876
|
);
|
|
26763
26877
|
gTag.selectAll(".parentGroup").raise();
|
|
26764
26878
|
gTag.selectAll(".hoverLine").raise();
|
|
@@ -28877,6 +28991,8 @@ const ProgressChart = ({
|
|
|
28877
28991
|
let legendListWidth;
|
|
28878
28992
|
let radius;
|
|
28879
28993
|
let innerRadius;
|
|
28994
|
+
const arcIndex = 1;
|
|
28995
|
+
const progressIndex = 0;
|
|
28880
28996
|
useEffect(() => {
|
|
28881
28997
|
drawChart();
|
|
28882
28998
|
}, [formatOptions]);
|
|
@@ -28936,23 +29052,22 @@ const ProgressChart = ({
|
|
|
28936
29052
|
};
|
|
28937
29053
|
const initProgressChartData = () => {
|
|
28938
29054
|
try {
|
|
28939
|
-
|
|
28940
|
-
totalValue = ChartData[0].data[0].value + ChartData[1].data[0].value;
|
|
29055
|
+
totalValue = ChartData[arcIndex].data[0].value + ChartData[progressIndex].data[0].value;
|
|
28941
29056
|
} catch (error) {
|
|
28942
29057
|
logError$2(fileName$3, "initProgressChartData", error);
|
|
28943
29058
|
}
|
|
28944
29059
|
};
|
|
28945
29060
|
const drawProgressChart = () => {
|
|
28946
29061
|
try {
|
|
28947
|
-
let maxValue = ChartData[
|
|
28948
|
-
let progressValue = ChartData[
|
|
29062
|
+
let maxValue = ChartData[arcIndex].data[0].value;
|
|
29063
|
+
let progressValue = ChartData[progressIndex].data[0].value;
|
|
28949
29064
|
let completeAngle = Math.PI * 2;
|
|
28950
29065
|
let progressAngle = progressValue / maxValue * Math.PI * 2;
|
|
28951
29066
|
let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
|
|
28952
29067
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
|
|
28953
29068
|
convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
|
|
28954
29069
|
);
|
|
28955
|
-
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[
|
|
29070
|
+
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[arcIndex].properties.color).attr(
|
|
28956
29071
|
"fill-opacity",
|
|
28957
29072
|
chartFormatOptions.plotArea.opacityforProgressScale
|
|
28958
29073
|
).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
|
|
@@ -28960,7 +29075,7 @@ const ProgressChart = ({
|
|
|
28960
29075
|
showTooltipOnMouseMove(
|
|
28961
29076
|
[
|
|
28962
29077
|
{
|
|
28963
|
-
key: ChartData[
|
|
29078
|
+
key: ChartData[arcIndex].properties.alias,
|
|
28964
29079
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
28965
29080
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
28966
29081
|
chartFormatOptions.toolTip.toolTipNumberFormatProgress,
|
|
@@ -28970,7 +29085,7 @@ const ProgressChart = ({
|
|
|
28970
29085
|
],
|
|
28971
29086
|
chartFormatOptions,
|
|
28972
29087
|
void 0,
|
|
28973
|
-
ChartData[
|
|
29088
|
+
ChartData[arcIndex].properties
|
|
28974
29089
|
);
|
|
28975
29090
|
} catch (error) {
|
|
28976
29091
|
logError$2(
|
|
@@ -28990,7 +29105,7 @@ const ProgressChart = ({
|
|
|
28990
29105
|
);
|
|
28991
29106
|
}
|
|
28992
29107
|
}).attr("transform", getTransformString());
|
|
28993
|
-
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[
|
|
29108
|
+
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[progressIndex].properties.color).attr(
|
|
28994
29109
|
"fill-opacity",
|
|
28995
29110
|
chartFormatOptions.plotArea.opacityforProgressGoal
|
|
28996
29111
|
).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
|
|
@@ -28998,7 +29113,7 @@ const ProgressChart = ({
|
|
|
28998
29113
|
showTooltipOnMouseMove(
|
|
28999
29114
|
[
|
|
29000
29115
|
{
|
|
29001
|
-
key: ChartData[
|
|
29116
|
+
key: ChartData[progressIndex].properties.alias,
|
|
29002
29117
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
29003
29118
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29004
29119
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29006,7 +29121,7 @@ const ProgressChart = ({
|
|
|
29006
29121
|
)(maxValue)
|
|
29007
29122
|
},
|
|
29008
29123
|
{
|
|
29009
|
-
key: ChartData[
|
|
29124
|
+
key: ChartData[arcIndex].properties.alias,
|
|
29010
29125
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
29011
29126
|
chartFormatOptions.toolTip.toolTipDisplayUnits,
|
|
29012
29127
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -29016,7 +29131,7 @@ const ProgressChart = ({
|
|
|
29016
29131
|
],
|
|
29017
29132
|
chartFormatOptions,
|
|
29018
29133
|
void 0,
|
|
29019
|
-
ChartData[
|
|
29134
|
+
ChartData[progressIndex].properties
|
|
29020
29135
|
);
|
|
29021
29136
|
} catch (error) {
|
|
29022
29137
|
logError$2(
|
|
@@ -55048,8 +55163,8 @@ const TornadoChart = ({
|
|
|
55048
55163
|
svg,
|
|
55049
55164
|
yScaleLeft,
|
|
55050
55165
|
columnWidth,
|
|
55051
|
-
isAdvanceAnalyticsChart,
|
|
55052
55166
|
isReportEditable,
|
|
55167
|
+
isAdvanceAnalyticsChart,
|
|
55053
55168
|
barChart
|
|
55054
55169
|
);
|
|
55055
55170
|
};
|