pace-chart-lib 1.0.14 → 1.0.15
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/pace-chart-lib.es.js +88 -45
- package/dist/pace-chart-lib.umd.js +88 -45
- package/package.json +1 -1
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/AreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +0 -667
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +0 -171
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/LineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/LineFamily/StackLineChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisFunctions.d.ts +0 -92
- package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisTypes.types.d.ts +0 -111
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Cordinates.d.ts +0 -26
- package/dist/Components/Charts/ChartsWithoutAxis/Maps/Maps.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieChart.d.ts +0 -4
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieFamilyCommonFunctions.d.ts +0 -10
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart.d.ts +0 -3
- package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart.d.ts +0 -3
- package/dist/Components/Charts/Core/Common.types.d.ts +0 -370
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +0 -239
- package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +0 -65
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +0 -595
- package/dist/Services/ErrorLog.d.ts +0 -1
- package/dist/index.d.ts +0 -35
|
@@ -12047,7 +12047,7 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
|
|
|
12047
12047
|
let decimalValues = decimalPrescision;
|
|
12048
12048
|
let formatter;
|
|
12049
12049
|
if (displayUnits === "Auto") {
|
|
12050
|
-
return getAutoNumberWithFormat(measureValue);
|
|
12050
|
+
return getAutoNumberWithFormat$1(measureValue);
|
|
12051
12051
|
} else if (displayUnits != staticDisplayUnits.none) {
|
|
12052
12052
|
displayUnits == staticDisplayUnits.thousands ? (Unit = 1e3, displayUnitsPostFix = "K") : null;
|
|
12053
12053
|
displayUnits == staticDisplayUnits.millions ? (Unit = 1e6, displayUnitsPostFix = "M") : null;
|
|
@@ -12096,7 +12096,7 @@ function getNumberWithFormat(measureValue, displayUnits, numberFormat, decimalPr
|
|
|
12096
12096
|
throw error;
|
|
12097
12097
|
}
|
|
12098
12098
|
}
|
|
12099
|
-
function getAutoNumberWithFormat(value2) {
|
|
12099
|
+
function getAutoNumberWithFormat$1(value2) {
|
|
12100
12100
|
if (value2 === null || value2 === void 0 || isNaN(value2)) return "-";
|
|
12101
12101
|
const absValue = Math.abs(value2);
|
|
12102
12102
|
if (absValue >= 1e9) {
|
|
@@ -15346,16 +15346,29 @@ function isPlainObject(val) {
|
|
|
15346
15346
|
}
|
|
15347
15347
|
function getNumberWithFormatFunction(displayUnits, numberFormat, decimalPrecision) {
|
|
15348
15348
|
try {
|
|
15349
|
-
let Unit;
|
|
15349
|
+
let Unit = 1;
|
|
15350
15350
|
let displayUnitsPostFix = "";
|
|
15351
15351
|
let decimalValues = decimalPrecision;
|
|
15352
15352
|
let formatter;
|
|
15353
|
-
return function(
|
|
15353
|
+
return function(value2) {
|
|
15354
15354
|
try {
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15355
|
+
let d = value2 ?? 0;
|
|
15356
|
+
if (displayUnits === "Auto") {
|
|
15357
|
+
return getAutoNumberWithFormat(d);
|
|
15358
|
+
}
|
|
15359
|
+
if (displayUnits && displayUnits !== "None") {
|
|
15360
|
+
if (displayUnits === "Thousands") {
|
|
15361
|
+
Unit = 1e3;
|
|
15362
|
+
displayUnitsPostFix = "K";
|
|
15363
|
+
}
|
|
15364
|
+
if (displayUnits === "Millions") {
|
|
15365
|
+
Unit = 1e6;
|
|
15366
|
+
displayUnitsPostFix = "M";
|
|
15367
|
+
}
|
|
15368
|
+
if (displayUnits === "Billions") {
|
|
15369
|
+
Unit = 1e9;
|
|
15370
|
+
displayUnitsPostFix = "B";
|
|
15371
|
+
}
|
|
15359
15372
|
d = d / Unit;
|
|
15360
15373
|
}
|
|
15361
15374
|
switch (numberFormat) {
|
|
@@ -15366,7 +15379,7 @@ function getNumberWithFormatFunction(displayUnits, numberFormat, decimalPrecisio
|
|
|
15366
15379
|
formatter = `.${decimalValues}f`;
|
|
15367
15380
|
return format(formatter)(d) + displayUnitsPostFix;
|
|
15368
15381
|
case ".2n":
|
|
15369
|
-
formatter = `.${decimalValues == 0 ? 1 :
|
|
15382
|
+
formatter = `.${decimalValues == 0 ? 1 : parseFloat(decimalValues) + 1}n`;
|
|
15370
15383
|
return format(formatter)(d) + displayUnitsPostFix;
|
|
15371
15384
|
case ".2$":
|
|
15372
15385
|
formatter = `,.${decimalValues}f`;
|
|
@@ -15401,6 +15414,14 @@ function getNumberWithFormatFunction(displayUnits, numberFormat, decimalPrecisio
|
|
|
15401
15414
|
logError$2(fileName$b, "getNumberWithFormatFunction", error);
|
|
15402
15415
|
}
|
|
15403
15416
|
}
|
|
15417
|
+
function getAutoNumberWithFormat(value2) {
|
|
15418
|
+
if (value2 === null || value2 === void 0) return "0";
|
|
15419
|
+
let abs2 = Math.abs(value2);
|
|
15420
|
+
if (abs2 >= 1e9) return (value2 / 1e9).toFixed(2) + "B";
|
|
15421
|
+
if (abs2 >= 1e6) return (value2 / 1e6).toFixed(2) + "M";
|
|
15422
|
+
if (abs2 >= 1e3) return (value2 / 1e3).toFixed(2) + "K";
|
|
15423
|
+
return value2.toFixed(2);
|
|
15424
|
+
}
|
|
15404
15425
|
function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
15405
15426
|
try {
|
|
15406
15427
|
const markerColor = prop?.markerColor ?? "blue";
|
|
@@ -15969,7 +15990,7 @@ function generalizedChartData(chartData, dimensionList) {
|
|
|
15969
15990
|
} else {
|
|
15970
15991
|
properties = { ...chartProperties, ...item.properties };
|
|
15971
15992
|
}
|
|
15972
|
-
const normalizedData = dimensionList ? dimensionList.map((dim) => {
|
|
15993
|
+
const normalizedData = dimensionList && dimensionList.length !== 0 ? dimensionList.map((dim) => {
|
|
15973
15994
|
const found = item.data.find((d) => d.dimension === dim);
|
|
15974
15995
|
if (found) {
|
|
15975
15996
|
return { ...found };
|
|
@@ -17758,7 +17779,9 @@ const LayeredColumnChart = ({
|
|
|
17758
17779
|
chartJSON.yMaxRight,
|
|
17759
17780
|
isSecondaryAxisDrawn,
|
|
17760
17781
|
isNormalizedChart,
|
|
17761
|
-
isDateType
|
|
17782
|
+
isDateType,
|
|
17783
|
+
false,
|
|
17784
|
+
chartJSON
|
|
17762
17785
|
));
|
|
17763
17786
|
setSVGContainer(margin);
|
|
17764
17787
|
({ dataTable, dataTableHeight } = dataTablePreCalculation(
|
|
@@ -19738,7 +19761,7 @@ function responsiveYaxisLabel(Ymax, Ymin, innerHeight2, formatOptions, customYax
|
|
|
19738
19761
|
}
|
|
19739
19762
|
}
|
|
19740
19763
|
} else {
|
|
19741
|
-
customTickValue = innerHeight2 /
|
|
19764
|
+
customTickValue = innerHeight2 / 60;
|
|
19742
19765
|
}
|
|
19743
19766
|
return { yAxisLabelArray, customTickValue };
|
|
19744
19767
|
} catch (e) {
|
|
@@ -20342,7 +20365,7 @@ const ColumnHistogramChart = ({
|
|
|
20342
20365
|
)
|
|
20343
20366
|
);
|
|
20344
20367
|
getXAxis();
|
|
20345
|
-
|
|
20368
|
+
drawColumnHistogramChart();
|
|
20346
20369
|
})
|
|
20347
20370
|
);
|
|
20348
20371
|
svg2.on("wheel", (event2) => {
|
|
@@ -20359,12 +20382,12 @@ const ColumnHistogramChart = ({
|
|
|
20359
20382
|
)
|
|
20360
20383
|
);
|
|
20361
20384
|
getXAxis();
|
|
20362
|
-
|
|
20385
|
+
drawColumnHistogramChart();
|
|
20363
20386
|
});
|
|
20364
20387
|
}
|
|
20365
|
-
|
|
20388
|
+
drawColumnHistogramChart();
|
|
20366
20389
|
};
|
|
20367
|
-
const
|
|
20390
|
+
const drawColumnHistogramChart = () => {
|
|
20368
20391
|
initXaxis$1(
|
|
20369
20392
|
gTag,
|
|
20370
20393
|
chartJSON,
|
|
@@ -28213,12 +28236,12 @@ const PyramidChart = ({
|
|
|
28213
28236
|
};
|
|
28214
28237
|
const fileName$3 = "ProgressChart.tsx";
|
|
28215
28238
|
const ProgressChart = ({
|
|
28216
|
-
data,
|
|
28239
|
+
data: { ChartData },
|
|
28217
28240
|
formatOptions,
|
|
28218
28241
|
chartId
|
|
28219
28242
|
}) => {
|
|
28220
28243
|
const svgRef = useRef();
|
|
28221
|
-
let seriesData = generalizedChartData(
|
|
28244
|
+
let seriesData = generalizedChartData(ChartData);
|
|
28222
28245
|
let chartFormatOptions;
|
|
28223
28246
|
let width;
|
|
28224
28247
|
let height;
|
|
@@ -28293,22 +28316,22 @@ const ProgressChart = ({
|
|
|
28293
28316
|
const initProgressChartData = () => {
|
|
28294
28317
|
try {
|
|
28295
28318
|
seriesData = seriesData.sort((a2, b) => b.data[0].value - a2.data[0].value);
|
|
28296
|
-
totalValue =
|
|
28319
|
+
totalValue = ChartData[0].data[0].value + ChartData[1].data[0].value;
|
|
28297
28320
|
} catch (error) {
|
|
28298
28321
|
logError$2(fileName$3, "initProgressChartData", error);
|
|
28299
28322
|
}
|
|
28300
28323
|
};
|
|
28301
28324
|
const drawProgressChart = () => {
|
|
28302
28325
|
try {
|
|
28303
|
-
let maxValue =
|
|
28304
|
-
let progressValue =
|
|
28326
|
+
let maxValue = ChartData[0].data[0].value;
|
|
28327
|
+
let progressValue = ChartData[1].data[0].value;
|
|
28305
28328
|
let completeAngle = Math.PI * 2;
|
|
28306
28329
|
let progressAngle = progressValue / maxValue * Math.PI * 2;
|
|
28307
28330
|
let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
|
|
28308
28331
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius).startAngle(0).cornerRadius(
|
|
28309
28332
|
convertStringToNumber(chartFormatOptions.plotArea.cornerRadius)
|
|
28310
28333
|
);
|
|
28311
|
-
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill",
|
|
28334
|
+
chartAreaTagG.append("path").attr("class", "secondary-circle").attr("fill", ChartData[0].properties.color).attr(
|
|
28312
28335
|
"fill-opacity",
|
|
28313
28336
|
chartFormatOptions.plotArea.opacityforProgressScale
|
|
28314
28337
|
).attr("d", arc2({ endAngle: completeAngle })).on("mousemove", (d) => {
|
|
@@ -28316,7 +28339,7 @@ const ProgressChart = ({
|
|
|
28316
28339
|
showTooltipOnMouseMove(
|
|
28317
28340
|
[
|
|
28318
28341
|
{
|
|
28319
|
-
key:
|
|
28342
|
+
key: ChartData[0].properties.alias,
|
|
28320
28343
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
28321
28344
|
"None",
|
|
28322
28345
|
chartFormatOptions.toolTip.toolTipNumberFormatProgress,
|
|
@@ -28346,7 +28369,7 @@ const ProgressChart = ({
|
|
|
28346
28369
|
);
|
|
28347
28370
|
}
|
|
28348
28371
|
}).attr("transform", getTransformString());
|
|
28349
|
-
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill",
|
|
28372
|
+
chartAreaTagG.append("path").attr("class", "progress-circle").attr("fill", ChartData[1].properties.color).attr(
|
|
28350
28373
|
"fill-opacity",
|
|
28351
28374
|
chartFormatOptions.plotArea.opacityforProgressGoal
|
|
28352
28375
|
).attr("d", arc2({ endAngle: progressAngle })).on("mousemove", (d) => {
|
|
@@ -28354,7 +28377,7 @@ const ProgressChart = ({
|
|
|
28354
28377
|
showTooltipOnMouseMove(
|
|
28355
28378
|
[
|
|
28356
28379
|
{
|
|
28357
|
-
key:
|
|
28380
|
+
key: ChartData[1].properties.alias,
|
|
28358
28381
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
28359
28382
|
"None",
|
|
28360
28383
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -28362,7 +28385,7 @@ const ProgressChart = ({
|
|
|
28362
28385
|
)(maxValue)
|
|
28363
28386
|
},
|
|
28364
28387
|
{
|
|
28365
|
-
key:
|
|
28388
|
+
key: ChartData[0].properties.alias,
|
|
28366
28389
|
value: chartFormatOptions.toolTip.toolTipNumberFormatProgress == ",.0%" ? "100 %" : getNumberWithFormatFunction(
|
|
28367
28390
|
"None",
|
|
28368
28391
|
chartFormatOptions.toolTip.toolTipDecimalPrecision,
|
|
@@ -28456,12 +28479,12 @@ const ProgressChart = ({
|
|
|
28456
28479
|
) });
|
|
28457
28480
|
};
|
|
28458
28481
|
const Speedometer = ({
|
|
28459
|
-
data,
|
|
28482
|
+
data: { ChartData },
|
|
28460
28483
|
formatOptions,
|
|
28461
28484
|
chartId
|
|
28462
28485
|
}) => {
|
|
28463
28486
|
const svgRef = useRef();
|
|
28464
|
-
const seriesData = generalizedChartData(
|
|
28487
|
+
const seriesData = generalizedChartData(ChartData);
|
|
28465
28488
|
let chartFormatOptions;
|
|
28466
28489
|
let width;
|
|
28467
28490
|
let height;
|
|
@@ -28532,7 +28555,7 @@ const Speedometer = ({
|
|
|
28532
28555
|
}
|
|
28533
28556
|
const initSpeedometerData = () => {
|
|
28534
28557
|
try {
|
|
28535
|
-
let firstMeasureValue =
|
|
28558
|
+
let firstMeasureValue = ChartData[0].data[0].value;
|
|
28536
28559
|
if (firstMeasureValue < 0) {
|
|
28537
28560
|
gaugeMaxMeasure = 0;
|
|
28538
28561
|
gaugeMinMeasure = firstMeasureValue;
|
|
@@ -28769,19 +28792,19 @@ const Speedometer = ({
|
|
|
28769
28792
|
showTooltipOnMouseMove(
|
|
28770
28793
|
[
|
|
28771
28794
|
{
|
|
28772
|
-
key: `${
|
|
28795
|
+
key: `${ChartData[index2].data[0].legend}`,
|
|
28773
28796
|
value: chartFormatOptions.plotArea.dataLabelNumberFormat == ",.0%" ? Math.round(
|
|
28774
|
-
|
|
28797
|
+
ChartData[index2].data[0].value / ticks2[ticks2.length - 1] * 100
|
|
28775
28798
|
) + "%" : getNumberWithFormatFunction(
|
|
28776
28799
|
"None",
|
|
28777
28800
|
chartFormatOptions.toolTip.toolTipNumberFormat,
|
|
28778
28801
|
chartFormatOptions.toolTip.toolTipDecimalPrecision
|
|
28779
|
-
)(
|
|
28802
|
+
)(ChartData[index2].data[0].value)
|
|
28780
28803
|
}
|
|
28781
28804
|
],
|
|
28782
28805
|
chartFormatOptions,
|
|
28783
28806
|
void 0,
|
|
28784
|
-
|
|
28807
|
+
{ markerColor: "blue", markerShape: "circle" }
|
|
28785
28808
|
);
|
|
28786
28809
|
}).on("mouseout", () => {
|
|
28787
28810
|
hideTooltipOnMouseOut();
|
|
@@ -28915,7 +28938,7 @@ const Speedometer = ({
|
|
|
28915
28938
|
"None",
|
|
28916
28939
|
chartFormatOptions.pointerValue.pointerValueNumberFormat,
|
|
28917
28940
|
chartFormatOptions.pointerValue.pointerValueDecimalPrecision
|
|
28918
|
-
)(
|
|
28941
|
+
)(ChartData[1].data[0].value) : chartFormatOptions.pointerValue.pointerValueAliasText}`
|
|
28919
28942
|
).attr(
|
|
28920
28943
|
"visibility",
|
|
28921
28944
|
chartFormatOptions.plotArea.dataLabels ? "visible" : "hidden"
|
|
@@ -28938,12 +28961,12 @@ function logError(fileName2, functionName, error) {
|
|
|
28938
28961
|
console.error(`[${fileName2}][${functionName}]`, error);
|
|
28939
28962
|
}
|
|
28940
28963
|
const RadialBarChart = ({
|
|
28941
|
-
data,
|
|
28964
|
+
data: { ChartData },
|
|
28942
28965
|
formatOptions,
|
|
28943
28966
|
chartId
|
|
28944
28967
|
}) => {
|
|
28945
28968
|
const svgRef = useRef();
|
|
28946
|
-
const seriesData = generalizedChartData(
|
|
28969
|
+
const seriesData = generalizedChartData(ChartData);
|
|
28947
28970
|
let chartFormatOptions;
|
|
28948
28971
|
let width;
|
|
28949
28972
|
let height;
|
|
@@ -29046,7 +29069,7 @@ const RadialBarChart = ({
|
|
|
29046
29069
|
logError("RadialBarChart.tsx", "getOuterRadius", error);
|
|
29047
29070
|
}
|
|
29048
29071
|
};
|
|
29049
|
-
let scaleMaxValue = seriesData.length > 1 ? max$2(seriesData, (d) => d.data[0].value) * 1.1 :
|
|
29072
|
+
let scaleMaxValue = seriesData.length > 1 ? max$2(seriesData, (d) => d.data[0].value) * 1.1 : ChartData[0].data[0].value * 1.1;
|
|
29050
29073
|
let valuefontStyle = chartFormatOptions.plotArea.dataLabelValueFontStyle;
|
|
29051
29074
|
let maxDim = getNumberWithFormatFunction(
|
|
29052
29075
|
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
@@ -29082,7 +29105,7 @@ const RadialBarChart = ({
|
|
|
29082
29105
|
const arcWidth = (chartRadius - arcMinRadius - numArcs * arcPadding) / numArcs;
|
|
29083
29106
|
let arc2 = arc$1().innerRadius((d, i) => getInnerRadius(i)).outerRadius((d, i) => getOuterRadius(i)).startAngle(0).endAngle((d) => scale2(Math.abs(d.data[0].value)));
|
|
29084
29107
|
let dummyArc = arc$1().innerRadius((d, i) => getInnerRadius(i)).outerRadius((d, i) => getOuterRadius(i)).startAngle(0).endAngle(degToRad(360));
|
|
29085
|
-
let radialAxis = svg2.append("g").attr("class", "r axis").selectAll("g").data(
|
|
29108
|
+
let radialAxis = svg2.append("g").attr("class", "r axis").selectAll("g").data(ChartData).enter().append("g");
|
|
29086
29109
|
if (chartFormatOptions.plotArea.axialGrid) {
|
|
29087
29110
|
radialAxis.append("circle").attr("r", (d, i) => getOuterRadius(i) + arcPadding).attr("stroke", "#d3d3d3").attr("stroke-width", 1).attr("fill", "none");
|
|
29088
29111
|
}
|
|
@@ -29130,7 +29153,7 @@ const RadialBarChart = ({
|
|
|
29130
29153
|
"visibility",
|
|
29131
29154
|
chartFormatOptions.plotArea.axialAxis ? "visible" : "hidden"
|
|
29132
29155
|
);
|
|
29133
|
-
let arcs = svg2.attr("class", "data").selectAll("path").data(
|
|
29156
|
+
let arcs = svg2.attr("class", "data").selectAll("path").data(ChartData).enter().append("path").attr("class", "parentGroup").attr("hoverId", (d) => d.data[0].legend).style("fill", (d, i) => d.properties.color).on("mousemove", (event2, d) => {
|
|
29134
29157
|
showTooltipOnMouseMove(
|
|
29135
29158
|
[
|
|
29136
29159
|
{
|
|
@@ -29158,7 +29181,7 @@ const RadialBarChart = ({
|
|
|
29158
29181
|
(d, i) => chartFormatOptions.plotArea.arcTransition ? i * 200 : 0
|
|
29159
29182
|
).duration(chartFormatOptions.plotArea.arcTransition ? 500 : 0).attrTween("d", arcTween);
|
|
29160
29183
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
29161
|
-
svg2.selectAll(".arc-label-" + chartId).data(
|
|
29184
|
+
svg2.selectAll(".arc-label-" + chartId).data(ChartData).enter().append("text").attr("class", "arc-label-" + chartId).attr("class", "parentGroup").attr("text-anchor", "start").attr("dy", (d, i) => (getOuterRadius(i) - getInnerRadius(i)) / 1.75).append("textPath").attr("xlink:href", (d, i) => `#arc-path-${i}-` + chartId).style("startOffset", "50%").attr("hoverId", (d) => d.legend.replaceAll(" ", "-")).text(
|
|
29162
29185
|
(d) => ` ${d.properties.alias}
|
|
29163
29186
|
${chartFormatOptions.plotArea.dataLabelValue ? getNumberWithFormatFunction(
|
|
29164
29187
|
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
@@ -29599,9 +29622,9 @@ function requireD3Cloud() {
|
|
|
29599
29622
|
var d3CloudExports = requireD3Cloud();
|
|
29600
29623
|
const cloud = /* @__PURE__ */ getDefaultExportFromCjs(d3CloudExports);
|
|
29601
29624
|
const fileName$2 = "WordCloud.tsx";
|
|
29602
|
-
const WordCloud = ({ data, formatOptions, chartId }) => {
|
|
29625
|
+
const WordCloud = ({ data: { ChartData }, formatOptions, chartId }) => {
|
|
29603
29626
|
const svgRef = useRef();
|
|
29604
|
-
let seriesData = generalizedChartData(
|
|
29627
|
+
let seriesData = generalizedChartData(ChartData);
|
|
29605
29628
|
let chartFormatOptions;
|
|
29606
29629
|
let width;
|
|
29607
29630
|
let height;
|
|
@@ -52167,6 +52190,8 @@ const BubbleChart = ({
|
|
|
52167
52190
|
tempLegendEntries,
|
|
52168
52191
|
"alias"
|
|
52169
52192
|
);
|
|
52193
|
+
let convertedData = convertIncomingData(data);
|
|
52194
|
+
data = convertedData;
|
|
52170
52195
|
iterateOverChartData();
|
|
52171
52196
|
({
|
|
52172
52197
|
longestMeasure,
|
|
@@ -52511,6 +52536,24 @@ const BubbleChart = ({
|
|
|
52511
52536
|
logError$2("BubbleChart", "initLegendList", e);
|
|
52512
52537
|
}
|
|
52513
52538
|
};
|
|
52539
|
+
const convertIncomingData = (input) => {
|
|
52540
|
+
try {
|
|
52541
|
+
if (!input || !input.ChartData || !input.ChartData[0]) return [];
|
|
52542
|
+
const series = input.ChartData[0];
|
|
52543
|
+
return series.data.map((d) => ({
|
|
52544
|
+
dimension: parseFloat(d.dimension),
|
|
52545
|
+
dimensionName: series.legend ?? "Dimension",
|
|
52546
|
+
measure: d.value,
|
|
52547
|
+
measureName: series.legend ?? "Measure",
|
|
52548
|
+
legendName: series.legend,
|
|
52549
|
+
legendColor: series.properties?.color ?? "#000000",
|
|
52550
|
+
tooltip: ""
|
|
52551
|
+
}));
|
|
52552
|
+
} catch (e) {
|
|
52553
|
+
console.error("BubbleChart - Data conversion failed", e);
|
|
52554
|
+
return [];
|
|
52555
|
+
}
|
|
52556
|
+
};
|
|
52514
52557
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52515
52558
|
"svg",
|
|
52516
52559
|
{
|
|
@@ -54019,7 +54062,7 @@ const TornadoChart = ({
|
|
|
54019
54062
|
const allChartData = [];
|
|
54020
54063
|
const legendList = [];
|
|
54021
54064
|
let formatedDimensionList = [];
|
|
54022
|
-
let firstMeasure =
|
|
54065
|
+
let firstMeasure = seriesData[0]?.properties.currentMeasure;
|
|
54023
54066
|
let yMaxLeft = 0;
|
|
54024
54067
|
let yMaxRight = -Infinity;
|
|
54025
54068
|
seriesData.forEach((series) => {
|
|
@@ -54147,7 +54190,7 @@ const TornadoChart = ({
|
|
|
54147
54190
|
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(filteredData).enter().append("g").attr("class", (d) => d.data[0].legend.replace(/ /g, "-")).selectAll("rect").data((d) => d.data.map((child) => ({
|
|
54148
54191
|
...child,
|
|
54149
54192
|
parentProperties: d.properties
|
|
54150
|
-
}))).enter().append("rect").attr("class", "rect").attr("y", (d) => d.dimension ? yScaleLeft(d.dimension) : yScaleLeft("defaultEntry")).attr("x", (d) => xScale(Math.
|
|
54193
|
+
}))).enter().append("rect").attr("class", "rect").attr("y", (d) => d.dimension ? yScaleLeft(d.dimension) : yScaleLeft("defaultEntry")).attr("x", (d) => xScale(Math.max(0, d.value))).attr("stroke-dasharray", (d) => d.stackBorderStyle == 2 ? "5,3" : "0").attr("stroke-width", (d) => d.stackBorderWidth + "px").attr("stroke", (d) => d.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.stackBorderColor : "none").style("shape-rendering", "crispEdges").attr("width", (d) => d.value ? Math.abs(xScale(d.value) - xScale(0)) : 0).attr("height", yScaleLeft.bandwidth()).style("fill", (d) => d.parentProperties.color).attr("opacity", 1).on("mousemove", (event2, d) => {
|
|
54151
54194
|
showTooltipOnMouseMove(
|
|
54152
54195
|
[
|
|
54153
54196
|
{ key: "Measure", value: d.legend },
|
|
@@ -54159,7 +54202,7 @@ const TornadoChart = ({
|
|
|
54159
54202
|
],
|
|
54160
54203
|
formatOptions,
|
|
54161
54204
|
void 0,
|
|
54162
|
-
d.
|
|
54205
|
+
d.parentProperties
|
|
54163
54206
|
);
|
|
54164
54207
|
}).on("mouseout", () => {
|
|
54165
54208
|
hideTooltipOnMouseOut();
|