pace-chart-lib 1.0.22 → 1.0.24
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 +3 -1
- package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +5 -1
- package/dist/Components/Charts/Core/Common.types.d.ts +33 -4
- package/dist/Components/Charts/Core/CommonFunctions.d.ts +4 -4
- package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +5 -4
- package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +50 -49
- package/dist/pace-chart-lib.es.js +1321 -733
- package/dist/pace-chart-lib.umd.js +1321 -733
- package/package.json +1 -1
|
@@ -10718,11 +10718,29 @@ var connectedStyle = /* @__PURE__ */ ((connectedStyle2) => {
|
|
|
10718
10718
|
return connectedStyle2;
|
|
10719
10719
|
})(connectedStyle || {});
|
|
10720
10720
|
var staticLineStyle = /* @__PURE__ */ ((staticLineStyle2) => {
|
|
10721
|
-
staticLineStyle2["
|
|
10722
|
-
staticLineStyle2["
|
|
10723
|
-
staticLineStyle2["
|
|
10721
|
+
staticLineStyle2["none"] = "None";
|
|
10722
|
+
staticLineStyle2["solid"] = "Solid";
|
|
10723
|
+
staticLineStyle2["dotted"] = "Dotted";
|
|
10724
|
+
staticLineStyle2["dashed"] = "Dashed";
|
|
10724
10725
|
return staticLineStyle2;
|
|
10725
10726
|
})(staticLineStyle || {});
|
|
10727
|
+
var strokeLineCap = /* @__PURE__ */ ((strokeLineCap2) => {
|
|
10728
|
+
strokeLineCap2["butt"] = "butt";
|
|
10729
|
+
strokeLineCap2["round"] = "round";
|
|
10730
|
+
strokeLineCap2["square"] = "square";
|
|
10731
|
+
return strokeLineCap2;
|
|
10732
|
+
})(strokeLineCap || {});
|
|
10733
|
+
var axisTypes = /* @__PURE__ */ ((axisTypes2) => {
|
|
10734
|
+
axisTypes2["primary"] = "Primary";
|
|
10735
|
+
axisTypes2["secondary"] = "Secondary";
|
|
10736
|
+
return axisTypes2;
|
|
10737
|
+
})(axisTypes || {});
|
|
10738
|
+
var visibilityCondition = /* @__PURE__ */ ((visibilityCondition2) => {
|
|
10739
|
+
visibilityCondition2["visible"] = "visible";
|
|
10740
|
+
visibilityCondition2["hidden"] = "hidden";
|
|
10741
|
+
return visibilityCondition2;
|
|
10742
|
+
})(visibilityCondition || {});
|
|
10743
|
+
const strokeDashValues = "20,10,5,5,5,10";
|
|
10726
10744
|
const ConnecterCurve = {
|
|
10727
10745
|
"1": "",
|
|
10728
10746
|
"2": curveLinear$1,
|
|
@@ -10832,6 +10850,18 @@ const referenceLineTypes = {
|
|
|
10832
10850
|
Median: "Median",
|
|
10833
10851
|
Custom: "Custom"
|
|
10834
10852
|
};
|
|
10853
|
+
var commonColors = /* @__PURE__ */ ((commonColors2) => {
|
|
10854
|
+
commonColors2["white"] = "#FFFFFF";
|
|
10855
|
+
commonColors2["black"] = "#000000";
|
|
10856
|
+
commonColors2["transparent"] = "#FFFFFF00";
|
|
10857
|
+
return commonColors2;
|
|
10858
|
+
})(commonColors || {});
|
|
10859
|
+
var tornadoEntryName = /* @__PURE__ */ ((tornadoEntryName2) => {
|
|
10860
|
+
tornadoEntryName2["positive"] = "Positive";
|
|
10861
|
+
tornadoEntryName2["negative"] = "Negative";
|
|
10862
|
+
tornadoEntryName2["default"] = "defaultEntry";
|
|
10863
|
+
return tornadoEntryName2;
|
|
10864
|
+
})(tornadoEntryName || {});
|
|
10835
10865
|
const defaultChartFormatOptions = {
|
|
10836
10866
|
chartDescription: {
|
|
10837
10867
|
chartDescriptionVisibility: false,
|
|
@@ -10839,10 +10869,10 @@ const defaultChartFormatOptions = {
|
|
|
10839
10869
|
chartDescriptionId: ""
|
|
10840
10870
|
},
|
|
10841
10871
|
chartArea: {
|
|
10842
|
-
chartAreaColor:
|
|
10872
|
+
chartAreaColor: commonColors.white,
|
|
10843
10873
|
chartAreaBorder: false,
|
|
10844
10874
|
chartAreaBorderThickness: "1",
|
|
10845
|
-
chartAreaBorderColor:
|
|
10875
|
+
chartAreaBorderColor: commonColors.black,
|
|
10846
10876
|
chartAreaBorderStyle: "1"
|
|
10847
10877
|
},
|
|
10848
10878
|
chartTitle: {
|
|
@@ -10850,20 +10880,20 @@ const defaultChartFormatOptions = {
|
|
|
10850
10880
|
chartTitleFontSize: "15",
|
|
10851
10881
|
chartTitleFontFamily: "Helvetica",
|
|
10852
10882
|
chartTitleFontStyle: [],
|
|
10853
|
-
chartTitleColor:
|
|
10883
|
+
chartTitleColor: commonColors.black,
|
|
10854
10884
|
chartTitleText: "Chart Title Here",
|
|
10855
10885
|
dynamicTitleText: "",
|
|
10856
10886
|
chartTitleHTML: ""
|
|
10857
10887
|
},
|
|
10858
10888
|
xAxisLabel: {
|
|
10859
10889
|
xAxisLabelVisibility: true,
|
|
10860
|
-
xAxisColor:
|
|
10861
|
-
xAxisColorInverted:
|
|
10890
|
+
xAxisColor: commonColors.black,
|
|
10891
|
+
xAxisColorInverted: commonColors.transparent,
|
|
10862
10892
|
xAxisWidth: "0.5",
|
|
10863
10893
|
xAxisLabelFontSize: "11",
|
|
10864
10894
|
xAxisLabelFontFamily: "Helvetica",
|
|
10865
10895
|
xAxisLabelFontStyle: [],
|
|
10866
|
-
xAxisLabelColor:
|
|
10896
|
+
xAxisLabelColor: commonColors.black,
|
|
10867
10897
|
xAxisNumberFormat: "MMM-YY",
|
|
10868
10898
|
// "DD-MM-YYYY",
|
|
10869
10899
|
xAxisQuarterFormat: "Long",
|
|
@@ -10895,7 +10925,7 @@ const defaultChartFormatOptions = {
|
|
|
10895
10925
|
xAxisTitleFontSize: "11",
|
|
10896
10926
|
xAxisTitleFontFamily: "Helvetica",
|
|
10897
10927
|
xAxisTitleFontStyle: [],
|
|
10898
|
-
xAxisTitleColor:
|
|
10928
|
+
xAxisTitleColor: commonColors.black,
|
|
10899
10929
|
xAxisTitleText: "Dimension",
|
|
10900
10930
|
xAxisDynamicTitleText: "",
|
|
10901
10931
|
xAxisTitleHTML: ""
|
|
@@ -10906,14 +10936,14 @@ const defaultChartFormatOptions = {
|
|
|
10906
10936
|
},
|
|
10907
10937
|
yAxisLabel: {
|
|
10908
10938
|
yAxisLabelVisibility: true,
|
|
10909
|
-
yAxisColor:
|
|
10910
|
-
//
|
|
10911
|
-
yAxisColorInverted:
|
|
10939
|
+
yAxisColor: commonColors.transparent,
|
|
10940
|
+
//commonColors.black,
|
|
10941
|
+
yAxisColorInverted: commonColors.black,
|
|
10912
10942
|
yAxisWidth: "0.5",
|
|
10913
10943
|
yAxisLabelFontSize: "11",
|
|
10914
10944
|
yAxisLabelFontFamily: "Helvetica",
|
|
10915
10945
|
yAxisLabelFontStyle: [],
|
|
10916
|
-
yAxisLabelColor:
|
|
10946
|
+
yAxisLabelColor: commonColors.black,
|
|
10917
10947
|
yAxisNumberFormat: ",",
|
|
10918
10948
|
yAxisDisplayUnits: "Auto",
|
|
10919
10949
|
//"None",
|
|
@@ -10939,19 +10969,19 @@ const defaultChartFormatOptions = {
|
|
|
10939
10969
|
yAxisTitleFontSize: "11",
|
|
10940
10970
|
yAxisTitleFontFamily: "Helvetica",
|
|
10941
10971
|
yAxisTitleFontStyle: [],
|
|
10942
|
-
yAxisTitleColor:
|
|
10972
|
+
yAxisTitleColor: commonColors.black,
|
|
10943
10973
|
yAxisTitleText: "Measure",
|
|
10944
10974
|
yAxisDynamicTitleText: "",
|
|
10945
10975
|
yAxisTitleHTML: ""
|
|
10946
10976
|
},
|
|
10947
10977
|
secondaryYAxisLabel: {
|
|
10948
10978
|
secondaryYAxisLabelVisibility: true,
|
|
10949
|
-
secondaryYAxisColor:
|
|
10979
|
+
secondaryYAxisColor: commonColors.black,
|
|
10950
10980
|
secondaryYAxisWidth: "0.5",
|
|
10951
10981
|
secondaryYAxisLabelFontSize: "11",
|
|
10952
10982
|
secondaryYAxisLabelFontFamily: "Helvetica",
|
|
10953
10983
|
secondaryYAxisLabelFontStyle: [],
|
|
10954
|
-
secondaryYAxisLabelColor:
|
|
10984
|
+
secondaryYAxisLabelColor: commonColors.black,
|
|
10955
10985
|
secondaryYAxisNumberFormat: ",",
|
|
10956
10986
|
secondaryYAxisDisplayUnits: "None",
|
|
10957
10987
|
secondaryYAxisDisplayUnitsLabel: false,
|
|
@@ -10969,7 +10999,7 @@ const defaultChartFormatOptions = {
|
|
|
10969
10999
|
secondaryYAxisTitleFontSize: "11",
|
|
10970
11000
|
secondaryYAxisTitleFontFamily: "Helvetica",
|
|
10971
11001
|
secondaryYAxisTitleFontStyle: [],
|
|
10972
|
-
secondaryYAxisTitleColor:
|
|
11002
|
+
secondaryYAxisTitleColor: commonColors.black,
|
|
10973
11003
|
secondaryYAxisTitleText: "Measure",
|
|
10974
11004
|
secondaryYAxisDynamicTitleText: "",
|
|
10975
11005
|
secondaryYAxisTitleHTML: ""
|
|
@@ -10994,17 +11024,17 @@ const defaultChartFormatOptions = {
|
|
|
10994
11024
|
legendFontStyle: [],
|
|
10995
11025
|
legendBorder: false,
|
|
10996
11026
|
legendBorderThickness: "1",
|
|
10997
|
-
legendBorderColor:
|
|
10998
|
-
vennLabelColor:
|
|
11027
|
+
legendBorderColor: commonColors.black,
|
|
11028
|
+
vennLabelColor: commonColors.black,
|
|
10999
11029
|
onHoverEffect: true,
|
|
11000
11030
|
legendColorMode: "1",
|
|
11001
|
-
legendSelectedUnicolor:
|
|
11031
|
+
legendSelectedUnicolor: commonColors.black
|
|
11002
11032
|
},
|
|
11003
11033
|
plotArea: {
|
|
11004
|
-
plotAreaColor:
|
|
11034
|
+
plotAreaColor: commonColors.white,
|
|
11005
11035
|
plotAreaBorder: false,
|
|
11006
11036
|
plotAreaBorderThickness: "1",
|
|
11007
|
-
plotAreaBorderColor:
|
|
11037
|
+
plotAreaBorderColor: commonColors.black,
|
|
11008
11038
|
plotAreaGapWidth: "50",
|
|
11009
11039
|
plotAreaSeriesWidth: "50",
|
|
11010
11040
|
plotAreaBarWidth: "50",
|
|
@@ -11025,21 +11055,21 @@ const defaultChartFormatOptions = {
|
|
|
11025
11055
|
dataLabelsforMaps: false,
|
|
11026
11056
|
dataLabelPosition: "1",
|
|
11027
11057
|
dataLabelSize: "12",
|
|
11028
|
-
dataLabelValueColor:
|
|
11058
|
+
dataLabelValueColor: commonColors.black,
|
|
11029
11059
|
dataLabelValueFontSize: "11",
|
|
11030
11060
|
dataLabelValueFontFamily: "Helvetica",
|
|
11031
11061
|
dataLabelValueFontStyle: [],
|
|
11032
11062
|
dataLabelNumberFormat: ",",
|
|
11033
11063
|
dataLabelNumberFormatProgress: ",.0%",
|
|
11034
11064
|
axialAxis: true,
|
|
11035
|
-
axialAxisDataLabelColor:
|
|
11065
|
+
axialAxisDataLabelColor: commonColors.black,
|
|
11036
11066
|
axialAxisDataLabelFontSize: "11",
|
|
11037
11067
|
axialAxisDataLabelFontFamily: "Helvetica",
|
|
11038
11068
|
axialAxisDataLabelFontStyle: [],
|
|
11039
11069
|
axialAxisDataLabelNumberFormat: ",",
|
|
11040
11070
|
axialAxisDataLabelDecimalPrecision: "2",
|
|
11041
11071
|
dataLabelDecimalPrecision: "2",
|
|
11042
|
-
dataLabelNameColor:
|
|
11072
|
+
dataLabelNameColor: commonColors.black,
|
|
11043
11073
|
dataLabelNameFontSize: "11",
|
|
11044
11074
|
dataLabelNameFontFamily: "Helvetica",
|
|
11045
11075
|
dataLabelNameFontStyle: [],
|
|
@@ -11053,7 +11083,7 @@ const defaultChartFormatOptions = {
|
|
|
11053
11083
|
arcTransition: true,
|
|
11054
11084
|
innerRadiusForSpeedometer: "30",
|
|
11055
11085
|
ticks: "3",
|
|
11056
|
-
pointerColor:
|
|
11086
|
+
pointerColor: commonColors.black,
|
|
11057
11087
|
pointerHeadLength: "8",
|
|
11058
11088
|
totalColor: "#41a5b4",
|
|
11059
11089
|
positiveColor: "#9fb700",
|
|
@@ -11064,14 +11094,14 @@ const defaultChartFormatOptions = {
|
|
|
11064
11094
|
bubbleSizeIndex: "1",
|
|
11065
11095
|
scatterSizeIndex: "4",
|
|
11066
11096
|
hideZeroValues: false,
|
|
11067
|
-
boxLineColor:
|
|
11097
|
+
boxLineColor: commonColors.black,
|
|
11068
11098
|
boxLineWidth: "1",
|
|
11069
11099
|
boxOutlier: false,
|
|
11070
11100
|
boxOutlierRadius: "3",
|
|
11071
11101
|
plotAreaShowTrendLine: false,
|
|
11072
11102
|
plotAreaTrendLine: "Linear",
|
|
11073
11103
|
plotAreaTrendLineWidth: "1",
|
|
11074
|
-
plotAreaTrendLineColor:
|
|
11104
|
+
plotAreaTrendLineColor: commonColors.black,
|
|
11075
11105
|
opacity: "0.5",
|
|
11076
11106
|
plotAreaCalculatedHigh: "#00FF00",
|
|
11077
11107
|
plotAreaCalculatedLow: "#FF0000",
|
|
@@ -11085,7 +11115,7 @@ const defaultChartFormatOptions = {
|
|
|
11085
11115
|
totalAlias: false,
|
|
11086
11116
|
totalAliasText: "",
|
|
11087
11117
|
refLineBorderThickness: "1",
|
|
11088
|
-
refLineBorderColor:
|
|
11118
|
+
refLineBorderColor: commonColors.black,
|
|
11089
11119
|
flipPyramid: false,
|
|
11090
11120
|
opacityforProgressScale: "0.2",
|
|
11091
11121
|
opacityforProgressGoal: "1",
|
|
@@ -11112,7 +11142,7 @@ const defaultChartFormatOptions = {
|
|
|
11112
11142
|
markerSize: "1",
|
|
11113
11143
|
markerShape: "Circle",
|
|
11114
11144
|
lineWidth: "1.5",
|
|
11115
|
-
markerColor:
|
|
11145
|
+
markerColor: commonColors.black
|
|
11116
11146
|
},
|
|
11117
11147
|
annotation: {
|
|
11118
11148
|
annotationDraggable: false,
|
|
@@ -11124,7 +11154,7 @@ const defaultChartFormatOptions = {
|
|
|
11124
11154
|
annotationVisibility: "5",
|
|
11125
11155
|
annotationPosition: "1",
|
|
11126
11156
|
annotationNumberFormat: ",",
|
|
11127
|
-
annotationColor:
|
|
11157
|
+
annotationColor: commonColors.black,
|
|
11128
11158
|
annotationFontSize: "9",
|
|
11129
11159
|
annotationFontFamily: "Helvetica",
|
|
11130
11160
|
annotationFontStyle: [],
|
|
@@ -11145,7 +11175,7 @@ const defaultChartFormatOptions = {
|
|
|
11145
11175
|
connectorStyle: "solid",
|
|
11146
11176
|
dataLabelsCoordinates: [],
|
|
11147
11177
|
totalNumberFormat: ",",
|
|
11148
|
-
totalColor:
|
|
11178
|
+
totalColor: commonColors.black,
|
|
11149
11179
|
totalFontSize: "9",
|
|
11150
11180
|
totalFontFamily: "Helvetica",
|
|
11151
11181
|
totalFontStyle: [],
|
|
@@ -11179,7 +11209,7 @@ const defaultChartFormatOptions = {
|
|
|
11179
11209
|
curviness: "0.5",
|
|
11180
11210
|
nodesBorderVisibility: true,
|
|
11181
11211
|
nodesBorderThickness: "1",
|
|
11182
|
-
nodesBorderColor:
|
|
11212
|
+
nodesBorderColor: commonColors.black,
|
|
11183
11213
|
nodeBorderStyle: "solid",
|
|
11184
11214
|
nodesLabelVisibility: true,
|
|
11185
11215
|
nodesLabelFontSize: "11",
|
|
@@ -11187,7 +11217,7 @@ const defaultChartFormatOptions = {
|
|
|
11187
11217
|
nodesLabelFontStyle: [],
|
|
11188
11218
|
nodeLabelNumberFormat: ",",
|
|
11189
11219
|
nodeLabelDecimalPrecision: "2",
|
|
11190
|
-
nodesLabelColor:
|
|
11220
|
+
nodesLabelColor: commonColors.black,
|
|
11191
11221
|
nodesLabelDisplayUnits: "None",
|
|
11192
11222
|
nodesLabelOverlap: false,
|
|
11193
11223
|
nodesLabelWrap: true,
|
|
@@ -11195,13 +11225,13 @@ const defaultChartFormatOptions = {
|
|
|
11195
11225
|
nodeWidth: "12",
|
|
11196
11226
|
nodeType: "rectangle",
|
|
11197
11227
|
nodesBorderRadius: "1",
|
|
11198
|
-
dataLabelValueColor:
|
|
11228
|
+
dataLabelValueColor: commonColors.black,
|
|
11199
11229
|
dataLabelValueFontSize: "11",
|
|
11200
11230
|
dataLabelValueFontFamily: "Arial",
|
|
11201
11231
|
dataLabelNumberFormat: ",",
|
|
11202
11232
|
dataLabelDecimalPrecision: "2",
|
|
11203
11233
|
dataLabelValueStyle: [],
|
|
11204
|
-
nodesLabelFontColor:
|
|
11234
|
+
nodesLabelFontColor: commonColors.black,
|
|
11205
11235
|
nodesDisplayUnits: "None",
|
|
11206
11236
|
percentageVisibility: false,
|
|
11207
11237
|
nodesLabelOverflow: true
|
|
@@ -11217,7 +11247,7 @@ const defaultChartFormatOptions = {
|
|
|
11217
11247
|
binsCalculationValue: "3",
|
|
11218
11248
|
binsBorderVisibility: false,
|
|
11219
11249
|
binsBorderThickness: "1",
|
|
11220
|
-
binsBorderColor:
|
|
11250
|
+
binsBorderColor: commonColors.black,
|
|
11221
11251
|
binsBorderOpacity: "0.5"
|
|
11222
11252
|
},
|
|
11223
11253
|
connector: {
|
|
@@ -11233,15 +11263,15 @@ const defaultChartFormatOptions = {
|
|
|
11233
11263
|
connectorNumberFormat: ",",
|
|
11234
11264
|
connectorLineThickness: "1",
|
|
11235
11265
|
connectorLineColor: "#080808",
|
|
11236
|
-
connectorMarkerColor:
|
|
11237
|
-
connectorFontColor:
|
|
11266
|
+
connectorMarkerColor: commonColors.black,
|
|
11267
|
+
connectorFontColor: commonColors.black,
|
|
11238
11268
|
connectorDecimalPrecision: "2",
|
|
11239
11269
|
connectorDisplayUnits: "None",
|
|
11240
11270
|
connectorStyle: "solid",
|
|
11241
11271
|
lineType: "straight",
|
|
11242
11272
|
connectorType: "straight",
|
|
11243
11273
|
connectorColorOption: "Discrete",
|
|
11244
|
-
connectorUniformLineColor:
|
|
11274
|
+
connectorUniformLineColor: commonColors.black
|
|
11245
11275
|
},
|
|
11246
11276
|
footerNote: {
|
|
11247
11277
|
footerNoteVisibility: false,
|
|
@@ -11249,28 +11279,28 @@ const defaultChartFormatOptions = {
|
|
|
11249
11279
|
footerNoteFontSize: "11",
|
|
11250
11280
|
footerNoteFontFamily: "Helvetica",
|
|
11251
11281
|
footerNoteFontStyle: [],
|
|
11252
|
-
footerNoteFontColor:
|
|
11282
|
+
footerNoteFontColor: commonColors.black,
|
|
11253
11283
|
footerNoteBorder: false,
|
|
11254
11284
|
footerNoteBorderThickness: "1",
|
|
11255
|
-
footerNoteBorderColor:
|
|
11285
|
+
footerNoteBorderColor: commonColors.black
|
|
11256
11286
|
},
|
|
11257
11287
|
pieofPie: {
|
|
11258
11288
|
pieOfPieDataLabels: true,
|
|
11259
11289
|
pieOfPieDataLabelValue: true,
|
|
11260
11290
|
pieOfPieAbsoluteValue: false,
|
|
11261
|
-
pieOfPieValueColor:
|
|
11291
|
+
pieOfPieValueColor: commonColors.black,
|
|
11262
11292
|
pieOfPieValueFontSize: "11",
|
|
11263
11293
|
pieOfPieValueFontFamily: "Helvetica",
|
|
11264
11294
|
pieOfPieValueFontStyle: [],
|
|
11265
11295
|
pieOfPieNumberFormat: ",",
|
|
11266
11296
|
pieOfPieName: true,
|
|
11267
|
-
pieOfPieNameColor:
|
|
11297
|
+
pieOfPieNameColor: commonColors.black,
|
|
11268
11298
|
pieOfPieNameFontSize: "11",
|
|
11269
11299
|
pieOfPieNameFontFamily: "Helvetica",
|
|
11270
11300
|
pieOfPieNameFontStyle: [],
|
|
11271
11301
|
pieOfPieRadius: 90,
|
|
11272
11302
|
pieOfPieLineWidth: "1",
|
|
11273
|
-
pieOfPieLineColor:
|
|
11303
|
+
pieOfPieLineColor: commonColors.black,
|
|
11274
11304
|
pointerValueDecimalPrecision: "2",
|
|
11275
11305
|
displayUnits: "None"
|
|
11276
11306
|
},
|
|
@@ -11335,7 +11365,7 @@ const defaultChartFormatOptions = {
|
|
|
11335
11365
|
pointerValueFontSize: "11",
|
|
11336
11366
|
pointerValueFontFamily: "Helvetica",
|
|
11337
11367
|
pointerValueFontStyle: [],
|
|
11338
|
-
pointerValueColor:
|
|
11368
|
+
pointerValueColor: commonColors.black,
|
|
11339
11369
|
pointerValueAlias: false,
|
|
11340
11370
|
pointerValueAliasText: ""
|
|
11341
11371
|
},
|
|
@@ -11353,8 +11383,8 @@ const defaultChartFormatOptions = {
|
|
|
11353
11383
|
},
|
|
11354
11384
|
bubbleformatting: {
|
|
11355
11385
|
showBubble: true,
|
|
11356
|
-
bubbleColor:
|
|
11357
|
-
bubbleBorderColor:
|
|
11386
|
+
bubbleColor: commonColors.black,
|
|
11387
|
+
bubbleBorderColor: commonColors.black,
|
|
11358
11388
|
bubbleBorderWidth: "1",
|
|
11359
11389
|
bubbleOpacity: "4"
|
|
11360
11390
|
},
|
|
@@ -11365,7 +11395,7 @@ const defaultChartFormatOptions = {
|
|
|
11365
11395
|
},
|
|
11366
11396
|
columnBreakLine: {
|
|
11367
11397
|
breakLineVisibility: true,
|
|
11368
|
-
breakLineColor:
|
|
11398
|
+
breakLineColor: commonColors.black,
|
|
11369
11399
|
breakLineWidth: "1",
|
|
11370
11400
|
breakLineStyle: "Double"
|
|
11371
11401
|
},
|
|
@@ -11379,7 +11409,7 @@ const defaultChartFormatOptions = {
|
|
|
11379
11409
|
column: {
|
|
11380
11410
|
stackBorderVisibility: false,
|
|
11381
11411
|
stackBorderWidth: "1",
|
|
11382
|
-
stackBorderColor:
|
|
11412
|
+
stackBorderColor: commonColors.black,
|
|
11383
11413
|
stackBorderStyle: "0"
|
|
11384
11414
|
},
|
|
11385
11415
|
line: {
|
|
@@ -11394,7 +11424,7 @@ const defaultChartFormatOptions = {
|
|
|
11394
11424
|
seriesLabelFontFamily: "Helvetica",
|
|
11395
11425
|
seriesLabelFontSize: "11",
|
|
11396
11426
|
seriesLabelFontStyle: [],
|
|
11397
|
-
seriesLabelBackgroundColor:
|
|
11427
|
+
seriesLabelBackgroundColor: commonColors.transparent,
|
|
11398
11428
|
seriesLabelPosition: "Right"
|
|
11399
11429
|
},
|
|
11400
11430
|
dataTableProperties: {
|
|
@@ -11405,7 +11435,7 @@ const defaultChartFormatOptions = {
|
|
|
11405
11435
|
dataTableNumberFormat: ",",
|
|
11406
11436
|
dataTableDecimalPrecision: "2",
|
|
11407
11437
|
dataTableDisplayUnits: "None",
|
|
11408
|
-
dataTableLabelColor:
|
|
11438
|
+
dataTableLabelColor: commonColors.black
|
|
11409
11439
|
},
|
|
11410
11440
|
dataTableOuterBorder: {
|
|
11411
11441
|
borderButtonVisibility: true,
|
|
@@ -11470,6 +11500,10 @@ var chartTypes = /* @__PURE__ */ ((chartTypes2) => {
|
|
|
11470
11500
|
chartTypes2["PyramidChart"] = "PyramidChart";
|
|
11471
11501
|
chartTypes2["ProgressChart"] = "ProgressChart";
|
|
11472
11502
|
chartTypes2["RadialBarChart"] = "RadialBarChart";
|
|
11503
|
+
chartTypes2["CombinationLine"] = "CombinationLine";
|
|
11504
|
+
chartTypes2["CombinationArea"] = "CombinationArea";
|
|
11505
|
+
chartTypes2["CombinationStackArea"] = "CombinationStackArea";
|
|
11506
|
+
chartTypes2["TornadoDefaultEntry"] = "defaultEntry";
|
|
11473
11507
|
return chartTypes2;
|
|
11474
11508
|
})(chartTypes || {});
|
|
11475
11509
|
const connecterCurve = {
|
|
@@ -11524,7 +11558,7 @@ function calculateWidthHeightDynamically(content, fontSize, fontFamily, rotation
|
|
|
11524
11558
|
var boundingRect = div.getBoundingClientRect();
|
|
11525
11559
|
var width = boundingRect.width;
|
|
11526
11560
|
var height = boundingRect.height;
|
|
11527
|
-
if (rotationDegree) {
|
|
11561
|
+
if (rotationDegree != null) {
|
|
11528
11562
|
div.style.transform = `rotate(${rotationDegree}deg)`;
|
|
11529
11563
|
boundingRect = div.getBoundingClientRect();
|
|
11530
11564
|
div.remove();
|
|
@@ -11594,8 +11628,7 @@ function computeMarginMetrics(windowWidth, windowHeight, maxNumberForPrimaryAxis
|
|
|
11594
11628
|
"Helvetica"
|
|
11595
11629
|
)[1] : 0;
|
|
11596
11630
|
yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
|
|
11597
|
-
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) +
|
|
11598
|
-
yLabel += 8;
|
|
11631
|
+
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 5 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11599
11632
|
let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
|
|
11600
11633
|
maxNumberForSecondaryAxis,
|
|
11601
11634
|
yMaxRight,
|
|
@@ -11662,7 +11695,7 @@ function calculateHorizontalMargins(windowWidth, windowHeight, maxNumberForPrima
|
|
|
11662
11695
|
left2 = yAxisRelatedMargin + 5;
|
|
11663
11696
|
break;
|
|
11664
11697
|
case staticLegendPosition.top:
|
|
11665
|
-
right2 =
|
|
11698
|
+
right2 = 15 + secondaryExtra;
|
|
11666
11699
|
left2 = yAxisRelatedMargin + 5;
|
|
11667
11700
|
break;
|
|
11668
11701
|
case staticLegendPosition.right:
|
|
@@ -12238,7 +12271,7 @@ function initPlotArea(g, formatOptions, dataTableHeight, innerWidth2, innerHeigh
|
|
|
12238
12271
|
formatOptions.plotArea.plotAreaBorder && !chartsWithoutPlotArea.includes(chartType) ? formatOptions.plotArea.plotAreaBorderColor : "none"
|
|
12239
12272
|
).attr("stroke-width", formatOptions.plotArea.plotAreaBorderThickness).attr(
|
|
12240
12273
|
"fill",
|
|
12241
|
-
formatOptions.plotArea.plotAreaColor !==
|
|
12274
|
+
formatOptions.plotArea.plotAreaColor !== commonColors.white && !chartsWithoutPlotArea.includes(chartType) ? formatOptions.plotArea.plotAreaColor : "none"
|
|
12242
12275
|
);
|
|
12243
12276
|
} catch (error) {
|
|
12244
12277
|
throw error;
|
|
@@ -12260,7 +12293,7 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
|
|
|
12260
12293
|
);
|
|
12261
12294
|
let yAxisLabelArray = [];
|
|
12262
12295
|
let customTickValue;
|
|
12263
|
-
const isTornadoChart =
|
|
12296
|
+
const isTornadoChart = chartJSON.chartType === chartTypes.TornadoChart;
|
|
12264
12297
|
if (isTornadoChart) {
|
|
12265
12298
|
const maxAbs = Math.max(Math.abs(Ymin), Math.abs(Ymax));
|
|
12266
12299
|
const finalMax = customYaxisMaxValue || maxAbs;
|
|
@@ -12349,31 +12382,21 @@ function responsiveYaxisLabel$1(Ymax, Ymin, innerHeight2, formatOptions, chartJS
|
|
|
12349
12382
|
}
|
|
12350
12383
|
function getLabelsFromAlgo(dataMin, dataMax, axisLengthPx, labelWidthPx = 80) {
|
|
12351
12384
|
const dataRange = dataMax - dataMin;
|
|
12352
|
-
if (dataRange
|
|
12353
|
-
return [dataMin];
|
|
12385
|
+
if (!isFinite(dataRange) || Math.abs(dataRange) < 1e-12) {
|
|
12386
|
+
return [Number(dataMin.toFixed(12))];
|
|
12354
12387
|
}
|
|
12355
12388
|
const maxLabels = dataRange < 10 ? 10 : Math.max(2, Math.floor(axisLengthPx / labelWidthPx));
|
|
12356
12389
|
const rawInterval = dataRange / maxLabels;
|
|
12357
12390
|
const magnitude = Math.pow(10, Math.floor(Math.log10(rawInterval)));
|
|
12358
12391
|
const niceNumbers = [1, 1.5, 2, 2.5, 5, 10];
|
|
12359
|
-
let interval2 =
|
|
12360
|
-
|
|
12361
|
-
const candidate = n * magnitude;
|
|
12362
|
-
if (Math.ceil(dataRange / candidate) <= maxLabels) {
|
|
12363
|
-
interval2 = candidate;
|
|
12364
|
-
break;
|
|
12365
|
-
}
|
|
12366
|
-
}
|
|
12367
|
-
if (interval2 === null) {
|
|
12368
|
-
interval2 = niceNumbers[niceNumbers.length - 1] * magnitude;
|
|
12369
|
-
}
|
|
12392
|
+
let interval2 = niceNumbers.map((n) => n * magnitude).find((i) => Math.ceil(dataRange / i) <= maxLabels);
|
|
12393
|
+
if (!interval2) interval2 = niceNumbers.at(-1) * magnitude;
|
|
12370
12394
|
const minLabel = Math.floor(dataMin / interval2) * interval2;
|
|
12371
12395
|
const maxLabel = Math.ceil(dataMax / interval2) * interval2;
|
|
12372
|
-
const
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
labels
|
|
12376
|
-
current += interval2;
|
|
12396
|
+
const steps = Math.round((maxLabel - minLabel) / interval2);
|
|
12397
|
+
const labels = new Array(steps + 1);
|
|
12398
|
+
for (let i = 0; i <= steps; i++) {
|
|
12399
|
+
labels[i] = Number((minLabel + i * interval2).toFixed(12));
|
|
12377
12400
|
}
|
|
12378
12401
|
return labels;
|
|
12379
12402
|
}
|
|
@@ -12385,13 +12408,13 @@ function initYaxis$1(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, in
|
|
|
12385
12408
|
dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2
|
|
12386
12409
|
).attr("width", yLabel).attr(
|
|
12387
12410
|
"fill",
|
|
12388
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
12411
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12389
12412
|
);
|
|
12390
12413
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
12391
12414
|
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em").attr("stroke-opacity", formatOptions.plotArea.fitChart ? "1" : "0");
|
|
12392
12415
|
yAxisG.selectAll("text").style(
|
|
12393
12416
|
"fill",
|
|
12394
|
-
formatOptions.yAxisLabel.yAxisLabelColor !==
|
|
12417
|
+
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
12395
12418
|
).style("user-select", "none").style("font-size", formatOptions.yAxisLabel.yAxisLabelFontSize).style("font-family", formatOptions.yAxisLabel.yAxisLabelFontFamily).style("font-style", formatOptions.yAxisLabel.yAxisLabelFontStyle).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
12396
12419
|
"text-decoration",
|
|
12397
12420
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -12411,12 +12434,12 @@ function initYaxisRight(gTag, formatOptions, dataTableHeight, secondaryYLabel, y
|
|
|
12411
12434
|
let fontStyle = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontStyle;
|
|
12412
12435
|
gTag.append("rect").attr("transform", `translate(${innerWidth2},0)`).attr("height", dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2).attr("width", secondaryYLabel).attr(
|
|
12413
12436
|
"fill",
|
|
12414
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !==
|
|
12437
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12415
12438
|
);
|
|
12416
12439
|
const secondaryYAxisG = gTag.append("g").call(yAxisRight).attr("transform", `translate(${innerWidth2},0)`);
|
|
12417
12440
|
secondaryYAxisG.selectAll("text").style(
|
|
12418
12441
|
"fill",
|
|
12419
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !==
|
|
12442
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor : "none"
|
|
12420
12443
|
).style(
|
|
12421
12444
|
"font-size",
|
|
12422
12445
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontSize
|
|
@@ -12528,7 +12551,7 @@ function initXaxis$1(gTag, chartJSON, xLabel, formatOptions, dataTableHeight, yS
|
|
|
12528
12551
|
`translate(1,${xaxisLabelPosition === "0" ? dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2 : xaxisLabelPosition === "1" ? -xLabel : yScaleLeft(0)})`
|
|
12529
12552
|
).attr("height", xLabel).attr("width", innerWidth2).attr(
|
|
12530
12553
|
"fill",
|
|
12531
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
12554
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12532
12555
|
);
|
|
12533
12556
|
const XaxisG = xAxisTag.append("g").attr(
|
|
12534
12557
|
"transform",
|
|
@@ -12809,6 +12832,7 @@ function getCurveType(formatOptions) {
|
|
|
12809
12832
|
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) {
|
|
12810
12833
|
try {
|
|
12811
12834
|
let annotationType = formatOptions.annotation.annotationType ?? "1";
|
|
12835
|
+
let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
|
|
12812
12836
|
if (formatOptions.annotation.annotationVisibility) {
|
|
12813
12837
|
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
12814
12838
|
let labelData = [];
|
|
@@ -12835,61 +12859,77 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
12835
12859
|
switch (labelType) {
|
|
12836
12860
|
case "2":
|
|
12837
12861
|
chartData.forEach(
|
|
12838
|
-
(d) =>
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12862
|
+
(d) => {
|
|
12863
|
+
if (d.data[0])
|
|
12864
|
+
labelData.push({
|
|
12865
|
+
Dimension: d.data[0].dimension,
|
|
12866
|
+
Measure: d.data[0].value,
|
|
12867
|
+
Legend: d.data[0].legend,
|
|
12868
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12869
|
+
Labelcolor: d.properties.labelColor,
|
|
12870
|
+
Axis: d.properties.axis
|
|
12871
|
+
});
|
|
12872
|
+
}
|
|
12846
12873
|
);
|
|
12847
12874
|
break;
|
|
12848
12875
|
case "3":
|
|
12849
12876
|
chartData.forEach(
|
|
12850
|
-
(d) =>
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12877
|
+
(d) => {
|
|
12878
|
+
if (d.data[d.data.length - 1]) {
|
|
12879
|
+
labelData.push({
|
|
12880
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12881
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12882
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12883
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12884
|
+
Labelcolor: d.properties.labelColor,
|
|
12885
|
+
Axis: d.properties.axis
|
|
12886
|
+
});
|
|
12887
|
+
}
|
|
12888
|
+
}
|
|
12858
12889
|
);
|
|
12859
12890
|
break;
|
|
12860
12891
|
case "4":
|
|
12861
12892
|
chartData.forEach(
|
|
12862
|
-
(d) =>
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12893
|
+
(d) => {
|
|
12894
|
+
if (d.data[0])
|
|
12895
|
+
labelData.push({
|
|
12896
|
+
Dimension: d.data[0].dimension,
|
|
12897
|
+
Measure: d.data[0].value,
|
|
12898
|
+
Legend: d.data[0].legend,
|
|
12899
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12900
|
+
Labelcolor: d.properties.labelColor,
|
|
12901
|
+
Axis: d.properties.axis
|
|
12902
|
+
});
|
|
12903
|
+
}
|
|
12870
12904
|
);
|
|
12871
12905
|
chartData.forEach(
|
|
12872
|
-
(d) =>
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12906
|
+
(d) => {
|
|
12907
|
+
if (d.data[d.data.length - 1])
|
|
12908
|
+
labelData.push({
|
|
12909
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12910
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12911
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12912
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12913
|
+
Labelcolor: d.properties.labelColor,
|
|
12914
|
+
Axis: d.properties.axis
|
|
12915
|
+
});
|
|
12916
|
+
}
|
|
12880
12917
|
);
|
|
12881
12918
|
break;
|
|
12882
12919
|
case "1":
|
|
12883
12920
|
for (let i = 0; i < chartData[0].data.length; i++) {
|
|
12884
12921
|
chartData.forEach(
|
|
12885
|
-
(d) =>
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12922
|
+
(d) => {
|
|
12923
|
+
if (d.data[i])
|
|
12924
|
+
labelData.push({
|
|
12925
|
+
Dimension: d.data[i].dimension,
|
|
12926
|
+
Measure: d.data[i].value,
|
|
12927
|
+
Legend: d.data[i].legend,
|
|
12928
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12929
|
+
Labelcolor: d.properties.labelColor,
|
|
12930
|
+
Axis: d.properties.axis
|
|
12931
|
+
});
|
|
12932
|
+
}
|
|
12893
12933
|
);
|
|
12894
12934
|
}
|
|
12895
12935
|
break;
|
|
@@ -12898,60 +12938,65 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
12898
12938
|
break;
|
|
12899
12939
|
case "6":
|
|
12900
12940
|
chartData.forEach((d) => {
|
|
12901
|
-
let annotationVisibility = d.properties.
|
|
12941
|
+
let annotationVisibility = d.properties.annotation.toString();
|
|
12902
12942
|
switch (annotationVisibility) {
|
|
12903
12943
|
case "1":
|
|
12904
12944
|
for (let i = 0; i < chartData[0].data.length; i++) {
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12945
|
+
if (d.data[i])
|
|
12946
|
+
labelData.push({
|
|
12947
|
+
Dimension: d.data[i].dimension,
|
|
12948
|
+
Measure: d.data[i].value,
|
|
12949
|
+
Legend: d.data[i].legend,
|
|
12950
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12951
|
+
Labelcolor: d.properties.labelColor,
|
|
12952
|
+
Axis: d.properties.axis
|
|
12953
|
+
});
|
|
12913
12954
|
}
|
|
12914
12955
|
break;
|
|
12915
12956
|
case "2":
|
|
12916
12957
|
labelData;
|
|
12917
12958
|
break;
|
|
12918
12959
|
case "3":
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12960
|
+
if (d.data[0])
|
|
12961
|
+
labelData.push({
|
|
12962
|
+
Dimension: d.data[0].dimension,
|
|
12963
|
+
Measure: d.data[0].value,
|
|
12964
|
+
Legend: d.data[0].legend,
|
|
12965
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12966
|
+
Labelcolor: d.properties.labelColor,
|
|
12967
|
+
Axis: d.properties.axis
|
|
12968
|
+
});
|
|
12927
12969
|
break;
|
|
12928
12970
|
case "4":
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12971
|
+
if (d.data[d.data.length - 1])
|
|
12972
|
+
labelData.push({
|
|
12973
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12974
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12975
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12976
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12977
|
+
Labelcolor: d.properties.labelColor,
|
|
12978
|
+
Axis: d.properties.axis
|
|
12979
|
+
});
|
|
12937
12980
|
break;
|
|
12938
12981
|
case "5":
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12982
|
+
if (d.data[0])
|
|
12983
|
+
labelData.push({
|
|
12984
|
+
Dimension: d.data[0].dimension,
|
|
12985
|
+
Measure: d.data[0].value,
|
|
12986
|
+
Legend: d.data[0].legend,
|
|
12987
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12988
|
+
Labelcolor: d.properties.labelColor,
|
|
12989
|
+
Axis: d.properties.axis
|
|
12990
|
+
});
|
|
12991
|
+
if (d.data[d.data.length - 1])
|
|
12992
|
+
labelData.push({
|
|
12993
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12994
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12995
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12996
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12997
|
+
Labelcolor: d.properties.labelColor,
|
|
12998
|
+
Axis: d.properties.axis
|
|
12999
|
+
});
|
|
12955
13000
|
break;
|
|
12956
13001
|
}
|
|
12957
13002
|
});
|
|
@@ -12979,13 +13024,14 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
12979
13024
|
y: d.Dimension,
|
|
12980
13025
|
x: { measure: d.Measure, axis: d.Axis },
|
|
12981
13026
|
position: parseInt(d.LabelPosition),
|
|
12982
|
-
currentLegend: d.Legend
|
|
13027
|
+
currentLegend: d.Legend,
|
|
13028
|
+
//d.Legend.replaceAll(" ", "-"), need to check for this case by space replaced with -
|
|
12983
13029
|
isVisible: true
|
|
12984
13030
|
} : {
|
|
12985
13031
|
x: d.Dimension,
|
|
12986
13032
|
y: { measure: d.Measure, axis: d.Axis },
|
|
12987
13033
|
position: parseInt(d.LabelPosition),
|
|
12988
|
-
currentLegend: d.Legend
|
|
13034
|
+
currentLegend: d.Legend,
|
|
12989
13035
|
isVisible: true
|
|
12990
13036
|
},
|
|
12991
13037
|
dx: 0,
|
|
@@ -13005,10 +13051,10 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13005
13051
|
width
|
|
13006
13052
|
};
|
|
13007
13053
|
if (barChart) {
|
|
13008
|
-
let requiredXScale = d.Axis ===
|
|
13054
|
+
let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13009
13055
|
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
|
|
13010
13056
|
} else {
|
|
13011
|
-
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && (d.Axis ==
|
|
13057
|
+
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;
|
|
13012
13058
|
}
|
|
13013
13059
|
});
|
|
13014
13060
|
annotationsList = annotationsList.filter((d) => d.data.y.measure != 0);
|
|
@@ -13037,17 +13083,19 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13037
13083
|
makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
|
|
13038
13084
|
x: function(d) {
|
|
13039
13085
|
if (barChart) {
|
|
13040
|
-
let requiredXScale = d.x.axis ===
|
|
13086
|
+
let requiredXScale = d.x.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13041
13087
|
let axis2 = d.x.axis;
|
|
13042
13088
|
return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
|
|
13043
13089
|
} else if (chartType === chartTypes.ColumnChart) {
|
|
13044
|
-
|
|
13090
|
+
const legend = xScaleForLegends(d.currentLegend);
|
|
13091
|
+
const x2 = legend != null ? xScale(d.x) + legend - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
|
|
13092
|
+
return x2;
|
|
13045
13093
|
} else {
|
|
13046
13094
|
return xScale(d.x);
|
|
13047
13095
|
}
|
|
13048
13096
|
},
|
|
13049
13097
|
y: function(d) {
|
|
13050
|
-
if (d.y.axis ==
|
|
13098
|
+
if (d.y.axis == axisTypes.primary) {
|
|
13051
13099
|
return dataLabelsPosition(
|
|
13052
13100
|
d.y.measure,
|
|
13053
13101
|
parseFloat(d.position),
|
|
@@ -13058,8 +13106,7 @@ function commonAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin, d
|
|
|
13058
13106
|
);
|
|
13059
13107
|
} else {
|
|
13060
13108
|
if (barChart) {
|
|
13061
|
-
|
|
13062
|
-
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
|
|
13109
|
+
return xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13063
13110
|
} else
|
|
13064
13111
|
return dataLabelsPosition(
|
|
13065
13112
|
d.y.measure,
|
|
@@ -13316,11 +13363,11 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13316
13363
|
d["legend"] && d.dimension ? (
|
|
13317
13364
|
// ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
|
|
13318
13365
|
// filteredDimensionList.includes(d.Dimension) &&
|
|
13319
|
-
!labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.Axis ==
|
|
13366
|
+
!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
|
|
13320
13367
|
) : (
|
|
13321
13368
|
// finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
|
|
13322
13369
|
// this.filteredDimensionList.includes(d.data["Dimension"]) &&
|
|
13323
|
-
!labelExcludeList.includes(d["key"]) && (d.data.axis ==
|
|
13370
|
+
!labelExcludeList.includes(d["key"]) && (d.data.axis == axisTypes.primary ? yScaleLeft(d[1]) <= innerHeight2 && yScaleLeft(d[1]) >= 0 : yScaleRight(d[1]) <= innerHeight2 && yScaleRight(d[1]) >= 0) ? annotationsList.push(singleAnnotation) : null
|
|
13324
13371
|
);
|
|
13325
13372
|
});
|
|
13326
13373
|
oldAnnotationList = oldAnnotationList.length == 0 ? annotationsList : oldAnnotationList;
|
|
@@ -13364,7 +13411,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13364
13411
|
}
|
|
13365
13412
|
},
|
|
13366
13413
|
y: function(d) {
|
|
13367
|
-
if (d.x.axis ==
|
|
13414
|
+
if (d.x.axis == axisTypes.primary) {
|
|
13368
13415
|
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, d.type);
|
|
13369
13416
|
} else {
|
|
13370
13417
|
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, d.type);
|
|
@@ -13405,7 +13452,7 @@ function commonAnnotationsForCustomChart(chartData, xScale, yScaleLeft, yScaleRi
|
|
|
13405
13452
|
}
|
|
13406
13453
|
}).accessorsInverse({
|
|
13407
13454
|
x: (d) => xScale.invert(d.x),
|
|
13408
|
-
y: (d) => d.x.axis ==
|
|
13455
|
+
y: (d) => d.x.axis == axisTypes.primary ? yScaleLeft.invert(d.y) : yScaleRight.invert(d.y)
|
|
13409
13456
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
13410
13457
|
if (!formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
|
|
13411
13458
|
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
@@ -13593,7 +13640,7 @@ function addDataTable(isFitChart, svg, currentTag, dataTable, colWidth, yAxis, x
|
|
|
13593
13640
|
yCordinate = yCordinate + cellHeight;
|
|
13594
13641
|
cellHeight = data.properties.height;
|
|
13595
13642
|
getLegendsAppended(tag, i, data, cellHeight);
|
|
13596
|
-
let parentTag = tag.append("g").attr("class", "dataTableBorder").selectAll("#scaling-svg" + chartId + " .foreignObject").data((d, pos) => data["data"]).enter().filter((d) => xAxis(d.dimension)).append("g").attr("fill",
|
|
13643
|
+
let parentTag = tag.append("g").attr("class", "dataTableBorder").selectAll("#scaling-svg" + chartId + " .foreignObject").data((d, pos) => data["data"]).enter().filter((d) => xAxis(d.dimension)).append("g").attr("fill", commonColors.transparent).attr(
|
|
13597
13644
|
"transform",
|
|
13598
13645
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
13599
13646
|
);
|
|
@@ -14315,7 +14362,7 @@ function prepareDataForSeriesLabel(innerWidth2, yScaleLeft, formatOptions, filte
|
|
|
14315
14362
|
let seriesObject = {};
|
|
14316
14363
|
let measureObject = seriesPosition == "Right" ? lineData.data[lineData.data.length - 1] : lineData.data[0];
|
|
14317
14364
|
let yPositionMeasure = isStackedChart ? measureObject.value > 0 ? measureObject[1] : measureObject[0] : measureObject.value;
|
|
14318
|
-
if (lineData.properties.axis ==
|
|
14365
|
+
if (lineData.properties.axis == axisTypes.primary || !yScaleRight) {
|
|
14319
14366
|
seriesObject["yPosition"] = yScaleLeft(yPositionMeasure) - hwObject[1] / 2;
|
|
14320
14367
|
} else if (isSecondaryAxisDrawn && yScaleRight) {
|
|
14321
14368
|
seriesObject["yPosition"] = yScaleRight(yPositionMeasure) - hwObject[1] / 2;
|
|
@@ -14408,7 +14455,7 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
14408
14455
|
break;
|
|
14409
14456
|
case "6":
|
|
14410
14457
|
chartData.forEach((d) => {
|
|
14411
|
-
let annotationVisibility = d.
|
|
14458
|
+
let annotationVisibility = d[0].properties.annotation.toString();
|
|
14412
14459
|
switch (annotationVisibility) {
|
|
14413
14460
|
case "1":
|
|
14414
14461
|
for (let i = 0; i < chartData[0].length; i++) {
|
|
@@ -14479,7 +14526,7 @@ function stacklineAnnotations(chartData, xScale, yScaleLeft, yScaleRight, margin
|
|
|
14479
14526
|
height: 15,
|
|
14480
14527
|
width: 15
|
|
14481
14528
|
},
|
|
14482
|
-
color:
|
|
14529
|
+
color: d.properties.labelColor,
|
|
14483
14530
|
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
14484
14531
|
height,
|
|
14485
14532
|
width
|
|
@@ -14587,7 +14634,7 @@ const appendAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotation
|
|
|
14587
14634
|
return `translate(${currentX}, 0)`;
|
|
14588
14635
|
}
|
|
14589
14636
|
});
|
|
14590
|
-
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !==
|
|
14637
|
+
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== commonColors.white ? formatOptions.annotation.annotationColor : "none");
|
|
14591
14638
|
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");
|
|
14592
14639
|
return annotations;
|
|
14593
14640
|
};
|
|
@@ -14597,12 +14644,12 @@ const initXaxisBar = (formatOptions, gTag, yLabel, innerHeight2, innerWidth2, xA
|
|
|
14597
14644
|
let rotation = "rotate(" + -formatOptions.yAxisLabel.yAxisLabelRotation + ")";
|
|
14598
14645
|
gTag.append("rect").attr("transform", `translate(0,${innerHeight2})`).attr("height", yLabel + 10).attr("width", innerWidth2).attr(
|
|
14599
14646
|
"fill",
|
|
14600
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
14647
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
14601
14648
|
);
|
|
14602
14649
|
const xAxisG = gTag.append("g").call(xAxisBottom).attr("transform", `translate(0,${innerHeight2})`);
|
|
14603
14650
|
xAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em").attr("stroke-opacity", formatOptions.plotArea.fitChart ? "1" : "0");
|
|
14604
14651
|
;
|
|
14605
|
-
xAxisG.selectAll("text").style("text-anchor", rotation == "rotate(0)" ? "middle" : "end").attr("dx", rotation == "rotate(0)" ? ".2em" : "-.1em").attr("dy", rotation == "rotate(0)" ? "1em" : ".15em").attr("transform", rotation).attr("transform", "rotate(-90) translate(-5,-5)").style("text-anchor", "end").style("fill", formatOptions.yAxisLabel.yAxisLabelColor !==
|
|
14652
|
+
xAxisG.selectAll("text").style("text-anchor", rotation == "rotate(0)" ? "middle" : "end").attr("dx", rotation == "rotate(0)" ? ".2em" : "-.1em").attr("dy", rotation == "rotate(0)" ? "1em" : ".15em").attr("transform", rotation).attr("transform", "rotate(-90) translate(-5,-5)").style("text-anchor", "end").style("fill", formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none").style("font-size", formatOptions.yAxisLabel.yAxisLabelFontSize).style("font-family", formatOptions.yAxisLabel.yAxisLabelFontFamily).style("font-style", formatOptions.yAxisLabel.yAxisLabelFontStyle).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
14606
14653
|
"text-decoration",
|
|
14607
14654
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14608
14655
|
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr(
|
|
@@ -14641,7 +14688,7 @@ const initYaxisBar = (formatOptions, gTag, xLabel, innerHeight2, innerWidth2, yA
|
|
|
14641
14688
|
gTag.selectAll("#yAxisG").remove();
|
|
14642
14689
|
let yRect = gTag.append("rect").attr("id", "yAxisRect").attr("transform", chartType === chartTypes.TornadoChart ? `translate(${-xLabelMargin + 10},0)` : `translate(${xaxisLabelPosition === 0 ? -xLabelMargin - 5 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0) + (-xLabelMargin - 5)},0)`).attr("height", innerHeight2).attr("width", chartType === chartTypes.TornadoChart ? xLabelMargin + 20 : xLabelMargin + 5).attr(
|
|
14643
14690
|
"fill",
|
|
14644
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
14691
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
14645
14692
|
);
|
|
14646
14693
|
const YaxisG = gTag.append("g").attr("id", "yAxisG").attr("transform", isTornadoChart ? `translate(${xScaleBottom(0)},0)` : `translate(${xaxisLabelPosition === 0 ? 0 : xaxisLabelPosition === 1 ? innerWidth2 : xScaleBottom(0)},0)`).call(yAxis);
|
|
14647
14694
|
if (true) {
|
|
@@ -14755,11 +14802,11 @@ const initXaxisTop = (formatOptions, gTag, xLabelSecondary, xAxisTop) => {
|
|
|
14755
14802
|
let fontStyle = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontStyle;
|
|
14756
14803
|
gTag.append("rect").attr("transform", `translate(0,-${xLabelSecondary})`).attr("height", xLabelSecondary).attr("width", innerWidth).attr(
|
|
14757
14804
|
"fill",
|
|
14758
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !==
|
|
14805
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : "none" : formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : formatOptions.chartArea.chartAreaColor
|
|
14759
14806
|
);
|
|
14760
14807
|
const XaxisG = gTag.append("g").call(xAxisTop).attr("transform", `translate(0,0)`);
|
|
14761
14808
|
XaxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em").attr("stroke-opacity", formatOptions.plotArea.fitChart ? "1" : "0");
|
|
14762
|
-
XaxisG.selectAll("text").attr("transform", "rotate(270) translate(5,5)").style("text-anchor", "start").style("fill", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !==
|
|
14809
|
+
XaxisG.selectAll("text").attr("transform", "rotate(270) translate(5,5)").style("text-anchor", "start").style("fill", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor : "none").style("font-size", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontSize).style("font-family", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontFamily).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
14763
14810
|
"text-decoration",
|
|
14764
14811
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14765
14812
|
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr(
|
|
@@ -14913,16 +14960,137 @@ const horizontalScrollBar = (seriesData, height, width, svg, margin, innerWidth2
|
|
|
14913
14960
|
true
|
|
14914
14961
|
);
|
|
14915
14962
|
};
|
|
14963
|
+
function addTotalValue(totalValueMap, xScale, yScale, margin, d3Annotation2, oldAnnotationList, formatOptions, chartType, height, width, svg, isReportEditable, isBarChart) {
|
|
14964
|
+
try {
|
|
14965
|
+
if (formatOptions.total.totalVisibility) {
|
|
14966
|
+
const dataLabelHeight = formatOptions.annotation.annotationVisibility != "5" ? 10 : 0;
|
|
14967
|
+
let annotationType = formatOptions.total.annotationType ?? "1";
|
|
14968
|
+
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
14969
|
+
let makeAnnotations = d3Annotation2.annotation();
|
|
14970
|
+
let connector = formatOptions.total.connectorType;
|
|
14971
|
+
let fontStyle = formatOptions.total.totalFontStyle;
|
|
14972
|
+
let connectorType = formatOptions.total.connectorType ? formatOptions.total.connectorType.toLowerCase() : "None";
|
|
14973
|
+
oldAnnotationList = [];
|
|
14974
|
+
let annotationsList = [];
|
|
14975
|
+
let totalValuesArray = Array.from(totalValueMap, ([Dimension, Measure]) => ({ Dimension, Measure }));
|
|
14976
|
+
if (formatOptions.total.totalHideZeroValues) {
|
|
14977
|
+
totalValuesArray = totalValuesArray.filter((d) => d.Measure !== 0);
|
|
14978
|
+
}
|
|
14979
|
+
totalValuesArray.forEach((d, i) => {
|
|
14980
|
+
let singleAnnotation = {
|
|
14981
|
+
note: {
|
|
14982
|
+
label: d.Measure >= 1e9 && formatOptions.total.totalNumberFormat === ".2s" ? Math.round(d.Measure / 1e9) + "B" : getNumberWithFormat(
|
|
14983
|
+
d.Measure,
|
|
14984
|
+
formatOptions.total.totalDisplayUnits || formatOptions.plotArea.plotAreaDisplayUnits,
|
|
14985
|
+
formatOptions.total.totalNumberFormat,
|
|
14986
|
+
formatOptions.total.totalDecimalPrecision
|
|
14987
|
+
)
|
|
14988
|
+
},
|
|
14989
|
+
data: {
|
|
14990
|
+
y: d.Measure,
|
|
14991
|
+
x: d.Dimension
|
|
14992
|
+
},
|
|
14993
|
+
dx: 0,
|
|
14994
|
+
dy: 0,
|
|
14995
|
+
connector: {
|
|
14996
|
+
end: connectorType,
|
|
14997
|
+
curve: connecterCurve[formatOptions.total.connectorCurve]
|
|
14998
|
+
},
|
|
14999
|
+
disable: Disable,
|
|
15000
|
+
subject: {
|
|
15001
|
+
height: 15,
|
|
15002
|
+
width: 15
|
|
15003
|
+
},
|
|
15004
|
+
color: formatOptions.total.totalColor,
|
|
15005
|
+
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
15006
|
+
height,
|
|
15007
|
+
width
|
|
15008
|
+
};
|
|
15009
|
+
annotationsList.push(singleAnnotation);
|
|
15010
|
+
});
|
|
15011
|
+
makeAnnotations.editMode(formatOptions.total.annotationDraggable && isReportEditable).accessors({
|
|
15012
|
+
x: function(d) {
|
|
15013
|
+
return isBarChart ? yScale(d.y) + 25 : xScale(d.x);
|
|
15014
|
+
},
|
|
15015
|
+
y: function(d) {
|
|
15016
|
+
return isBarChart ? xScale(d.x) - 5 : yScale(d.y) - dataLabelHeight - 15;
|
|
15017
|
+
}
|
|
15018
|
+
}).on("dragend", function(annotation2) {
|
|
15019
|
+
annotations.selectAll(".connector").style("stroke", formatOptions.annotation.connectorColor || "#ccc").attr(
|
|
15020
|
+
"stroke-dasharray",
|
|
15021
|
+
connectedStyle[formatOptions.total.connectorStyle.toLowerCase()]
|
|
15022
|
+
);
|
|
15023
|
+
annotations.selectAll(`.connector-${connectorType}`).attr("fill", formatOptions.total.connectorColor || "#ccc").style(
|
|
15024
|
+
"stroke",
|
|
15025
|
+
formatOptions.total.connectorColor || "#ccc"
|
|
15026
|
+
);
|
|
15027
|
+
annotations.selectAll(".note-line").attr("hoverId", (d) => d.data.currentLegend).style("stroke", formatOptions.total.connectorColor || "#ccc").attr(
|
|
15028
|
+
"stroke-dasharray",
|
|
15029
|
+
connectedStyle[formatOptions.total.connectorStyle.toLowerCase()]
|
|
15030
|
+
).filter((d) => d._dx == 0 && d._dy == 0).remove();
|
|
15031
|
+
}).accessorsInverse({
|
|
15032
|
+
x: (d) => xScale.invert(d.x),
|
|
15033
|
+
y: (d) => yScale.invert(d.y)
|
|
15034
|
+
}).notePadding(0).annotations(annotationsList);
|
|
15035
|
+
let annotations = appendTotalAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
15036
|
+
}
|
|
15037
|
+
} catch (error) {
|
|
15038
|
+
throw error;
|
|
15039
|
+
}
|
|
15040
|
+
}
|
|
15041
|
+
const appendTotalAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType) => {
|
|
15042
|
+
svg.selectAll(".annotation-group").remove();
|
|
15043
|
+
let annotations = svg.append("g").attr("id", "annotationGroup").attr("class", "annotation-group").attr("transform", `translate(${margin.left},${margin.top})`).style("fill", formatOptions.total.totalColor).style("font-family", formatOptions.total.totalFontFamily).style("font-size", formatOptions.total.totalFontSize).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
15044
|
+
"text-decoration",
|
|
15045
|
+
fontStyle.includes("Underline") ? "Underline" : ""
|
|
15046
|
+
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").call(makeAnnotations);
|
|
15047
|
+
annotations.selectAll("rect").style("visibility", "hidden");
|
|
15048
|
+
annotations.selectAll(".annotation-subject").remove();
|
|
15049
|
+
annotations.selectAll(".connector").style("stroke", formatOptions.total.connectorColor || "#ccc").attr("stroke-dasharray", connectedStyle[formatOptions.total.connectorStyle]);
|
|
15050
|
+
annotations.selectAll(`.connector-${ConnectorType}`).attr("fill", formatOptions.total.connectorColor || "#ccc").style("stroke", formatOptions.total.connectorColor || "#ccc");
|
|
15051
|
+
annotations.selectAll(".note-line").style("stroke", formatOptions.total.connectorColor || "#ccc").attr("stroke-dasharray", connectedStyle[formatOptions.total.connectorStyle]).filter((d) => d._dx == 0 && d._dy == 0).remove();
|
|
15052
|
+
annotations.selectAll(".connector-end").filter((d) => d.connector.end == "dot" && d._dx == 0 && d._dy == 0).remove();
|
|
15053
|
+
formatOptions.total.annotationType == "1" && annotations.selectAll(".annotation-note-content").attr("transform", function() {
|
|
15054
|
+
const transform = select$2(this).attr("transform");
|
|
15055
|
+
const translateValues = transform.match(/translate\(([^,]+),([^,]+)\)/);
|
|
15056
|
+
if (translateValues) {
|
|
15057
|
+
const currentX = parseFloat(translateValues[1]);
|
|
15058
|
+
return `translate(${currentX}, 0)`;
|
|
15059
|
+
}
|
|
15060
|
+
});
|
|
15061
|
+
annotations.selectAll("text").append("text").style("fill", formatOptions.total.totalColor !== commonColors.white ? formatOptions.total.totalColor : "none");
|
|
15062
|
+
return annotations;
|
|
15063
|
+
};
|
|
15064
|
+
function createTotalMeasureValueMap(data, totalValueMap, filteredDimension) {
|
|
15065
|
+
totalValueMap.clear();
|
|
15066
|
+
if (filteredDimension && filteredDimension.length > 0) {
|
|
15067
|
+
filteredDimension.forEach((dimension) => {
|
|
15068
|
+
let totalMeasureValue = 0;
|
|
15069
|
+
totalValueMap.set(dimension, totalMeasureValue);
|
|
15070
|
+
});
|
|
15071
|
+
}
|
|
15072
|
+
if (data.ChartData && data.ChartData.length > 0) {
|
|
15073
|
+
data.ChartData.forEach((series) => {
|
|
15074
|
+
series.data.forEach((dataPoint, index2) => {
|
|
15075
|
+
if (totalValueMap.has(dataPoint.dimension)) {
|
|
15076
|
+
let existingTotal = totalValueMap.get(dataPoint.dimension) || 0;
|
|
15077
|
+
existingTotal += dataPoint.value || 0;
|
|
15078
|
+
totalValueMap.set(dataPoint.dimension, existingTotal);
|
|
15079
|
+
}
|
|
15080
|
+
});
|
|
15081
|
+
});
|
|
15082
|
+
}
|
|
15083
|
+
}
|
|
14916
15084
|
const chartProperties = {
|
|
14917
15085
|
color: "defaultColor",
|
|
14918
15086
|
name: "",
|
|
14919
15087
|
type: "Line",
|
|
14920
|
-
axis:
|
|
15088
|
+
axis: axisTypes.primary,
|
|
14921
15089
|
alias: "",
|
|
14922
15090
|
fontSize: 11,
|
|
14923
15091
|
fontStyle: [],
|
|
14924
15092
|
fontFamily: "Helvetica",
|
|
14925
|
-
labelColor:
|
|
15093
|
+
labelColor: commonColors.black,
|
|
14926
15094
|
hideZeroValues: false,
|
|
14927
15095
|
markerShape: "Circle",
|
|
14928
15096
|
lineStyle: "Solid",
|
|
@@ -14956,7 +15124,7 @@ const chartProperties = {
|
|
|
14956
15124
|
valueFontStyle: [],
|
|
14957
15125
|
valueFont: "Helvetica",
|
|
14958
15126
|
valueFontColor: "black",
|
|
14959
|
-
backgroundColor:
|
|
15127
|
+
backgroundColor: commonColors.white,
|
|
14960
15128
|
nodeHeight: 5,
|
|
14961
15129
|
nodeWidth: 12,
|
|
14962
15130
|
setColorScale: false,
|
|
@@ -14967,7 +15135,7 @@ const chartProperties = {
|
|
|
14967
15135
|
actualChartType: "chartType",
|
|
14968
15136
|
secondaryAxisBgColor: "#e5e5e5",
|
|
14969
15137
|
stackBorderWidth: 1,
|
|
14970
|
-
stackBorderColor:
|
|
15138
|
+
stackBorderColor: commonColors.black,
|
|
14971
15139
|
stackBorderStyle: 0,
|
|
14972
15140
|
seriesLabelVisibility: true,
|
|
14973
15141
|
individualAnnotationVisibility: "1",
|
|
@@ -15003,9 +15171,8 @@ const fileName$b = "CommonFunctions.ts";
|
|
|
15003
15171
|
chartTypes.Speedometer,
|
|
15004
15172
|
chartTypes.RadialBarChart
|
|
15005
15173
|
];
|
|
15006
|
-
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions,
|
|
15174
|
+
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, seriesData, chartId, legendShape, chartType) {
|
|
15007
15175
|
try {
|
|
15008
|
-
let seriesData = chartType !== chartTypes.TornadoChart ? [...inputSeries].reverse() : [...inputSeries];
|
|
15009
15176
|
let position = formatOptions.legends.legendPosition;
|
|
15010
15177
|
let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
|
|
15011
15178
|
let verticalLegendAlignment = formatOptions.legends.legendAlignment;
|
|
@@ -15108,21 +15275,13 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
15108
15275
|
chartData.forEach(
|
|
15109
15276
|
(d) => d.data.forEach(
|
|
15110
15277
|
(j) => {
|
|
15111
|
-
j["markerShape"] = type
|
|
15278
|
+
j["markerShape"] = [chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) && !formatOptions.plotArea.plotAreaHideLineAndMarkers ? "None" : d.properties.markerShape ? d.properties.markerShape : "Circle";
|
|
15112
15279
|
j["currentMeasure"] = d.properties.currentMeasure;
|
|
15280
|
+
j["markerColor"] = d.properties.markerColor ? d.properties.markerColor : "Blue";
|
|
15281
|
+
j["markerSize"] = d.properties.markerShape != "None" && d.properties.markerSize && d.properties.markerShape != "None" ? type === "Area" ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? d.properties.markerSize : 0 : d.properties.markerSize : 0;
|
|
15113
15282
|
}
|
|
15114
15283
|
)
|
|
15115
15284
|
);
|
|
15116
|
-
chartData.forEach(
|
|
15117
|
-
(d) => d.data.forEach(
|
|
15118
|
-
(j) => j["markerColor"] = d.properties.markerColor ? d.properties.markerColor : "Blue"
|
|
15119
|
-
)
|
|
15120
|
-
);
|
|
15121
|
-
chartData.forEach(
|
|
15122
|
-
(d) => d.data.forEach(
|
|
15123
|
-
(j) => j["markerSize"] = d.properties.markerShape != "None" && d.properties.markerSize && d.properties.markerShape != "None" ? type === "Area" ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? d.properties.markerSize : 0 : d.properties.markerSize : 0
|
|
15124
|
-
)
|
|
15125
|
-
);
|
|
15126
15285
|
let markerGroups = lines.selectAll(".lineGroup").data(chartData, (d) => d.legend);
|
|
15127
15286
|
let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
|
|
15128
15287
|
let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
|
|
@@ -15134,12 +15293,12 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
15134
15293
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
15135
15294
|
}).attr("visibility", (d) => {
|
|
15136
15295
|
const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
|
|
15137
|
-
const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ?
|
|
15138
|
-
return hideByX ?
|
|
15296
|
+
const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ? visibilityCondition.hidden : [chartTypes.NormalizedStackLineChart, chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : [chartTypes.StackAreaChart, chartTypes.AreaChart, chartTypes.CombinationStackArea].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : visibilityCondition.visible : [chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) ? visibilityCondition.visible : ["Area"].includes(type) ? formatOptions.plotArea.plotAreaHideLineAndMarkers ? visibilityCondition.visible : visibilityCondition.hidden : visibilityCondition.hidden;
|
|
15297
|
+
return hideByX ? visibilityCondition.hidden : visible;
|
|
15139
15298
|
}).attr("transform", (d) => {
|
|
15140
|
-
let requiredYScale = d.axis ==
|
|
15299
|
+
let requiredYScale = d.axis == axisTypes.primary ? yScale : yScaleRight;
|
|
15141
15300
|
const x2 = xScale(d.dimension);
|
|
15142
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15301
|
+
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, chartTypes.CombinationStackArea].includes(type) ? d[1] > 0 ? requiredYScale(d[1]) : requiredYScale(d[0]) : requiredYScale(d.value);
|
|
15143
15302
|
return `translate(${x2},${y2})`;
|
|
15144
15303
|
}).on("mousemove", function(event2, d) {
|
|
15145
15304
|
const dataPoint = d;
|
|
@@ -15177,13 +15336,13 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
15177
15336
|
);
|
|
15178
15337
|
parentG.selectAll(".halo").remove();
|
|
15179
15338
|
parentG.insert("circle", ":first-child").attr("class", "halo").attr("cx", xScale(dataPoint.dimension)).attr("cy", () => {
|
|
15180
|
-
const requiredYScale = dataPoint.axis ===
|
|
15181
|
-
return [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15339
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15340
|
+
return [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, chartTypes.CombinationStackArea].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
|
|
15182
15341
|
}).attr("fill", legendEntry.markerColor).attr("opacity", 0.5).attr("r", legendEntry.markerSize * 10);
|
|
15183
15342
|
select$2(this).transition().duration(100).attr("transform", () => {
|
|
15184
|
-
const requiredYScale = dataPoint.axis ===
|
|
15343
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15185
15344
|
const x2 = xScale(dataPoint.dimension);
|
|
15186
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15345
|
+
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, chartTypes.CombinationStackArea].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
|
|
15187
15346
|
return `translate(${x2},${y2}) scale(1.3)`;
|
|
15188
15347
|
});
|
|
15189
15348
|
}).on("mouseout", function(event2, d) {
|
|
@@ -15192,9 +15351,9 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
15192
15351
|
hideTooltipOnMouseOut();
|
|
15193
15352
|
parentG.selectAll(".halo").remove();
|
|
15194
15353
|
select$2(this).transition().duration(100).attr("transform", () => {
|
|
15195
|
-
const requiredYScale = dataPoint.axis ===
|
|
15354
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15196
15355
|
const x2 = xScale(dataPoint.dimension);
|
|
15197
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15356
|
+
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart, chartTypes.CombinationStackArea].includes(type) ? dataPoint[1] > 0 ? requiredYScale(dataPoint[1]) : requiredYScale(dataPoint[0]) : requiredYScale(dataPoint.value);
|
|
15198
15357
|
return `translate(${x2},${y2}) scale(1)`;
|
|
15199
15358
|
});
|
|
15200
15359
|
});
|
|
@@ -15206,10 +15365,10 @@ function lineMarkers(lines, chartData, type, xScale, yScale, yScaleRight, toolti
|
|
|
15206
15365
|
const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) => {
|
|
15207
15366
|
try {
|
|
15208
15367
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
15209
|
-
return hideZeroValues && d.
|
|
15368
|
+
return hideZeroValues && d.value == 0 || d.value > secondaryCustomYaxisMaxValue || d.value < secondaryCustomYaxisMinValue;
|
|
15210
15369
|
} else if (type.includes("Stack")) {
|
|
15211
|
-
return d.
|
|
15212
|
-
} else return hideZeroValues && d.
|
|
15370
|
+
return d.value > 0 ? hideZeroValues && d[1] == 0 || d[1] < customYaxisMinValue || d[1] > customYaxisMaxValue : hideZeroValues && d[0] == 0 || d[0] < customYaxisMinValue || d[0] > customYaxisMaxValue;
|
|
15371
|
+
} else return hideZeroValues && d.value == 0 || d.value < customYaxisMinValue || d.value > customYaxisMaxValue;
|
|
15213
15372
|
} catch (error) {
|
|
15214
15373
|
logError$2(fileName$b, "checkVisibleConditions", error);
|
|
15215
15374
|
}
|
|
@@ -15419,13 +15578,13 @@ function getAutoNumberWithFormat(value2) {
|
|
|
15419
15578
|
}
|
|
15420
15579
|
function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
15421
15580
|
try {
|
|
15422
|
-
const markerColor = prop?.markerColor ?? "blue";
|
|
15581
|
+
const markerColor = prop.color ?? prop?.markerColor ?? "blue";
|
|
15423
15582
|
const markerShape = prop?.markerShape.toLowerCase() ?? "circle";
|
|
15424
15583
|
const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
|
|
15425
15584
|
const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
|
|
15426
|
-
const textColor = isLightTheme ? "black" :
|
|
15585
|
+
const textColor = isLightTheme ? "black" : commonColors.white;
|
|
15427
15586
|
const subTextColor = isLightTheme ? "gray" : "#d1d5db";
|
|
15428
|
-
selectAll(".chartTooltip").style("visibility",
|
|
15587
|
+
selectAll(".chartTooltip").style("visibility", visibilityCondition.hidden);
|
|
15429
15588
|
const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
|
|
15430
15589
|
"class",
|
|
15431
15590
|
isLightTheme ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
|
|
@@ -15517,7 +15676,7 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
|
15517
15676
|
}
|
|
15518
15677
|
tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
|
|
15519
15678
|
"visibility",
|
|
15520
|
-
chartFormatOptions.toolTip.toolTipVisibility ?
|
|
15679
|
+
chartFormatOptions.toolTip.toolTipVisibility ? visibilityCondition.visible : visibilityCondition.hidden
|
|
15521
15680
|
).style("transform", "scale(1)").style("opacity", "1");
|
|
15522
15681
|
tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
|
|
15523
15682
|
} catch (error) {
|
|
@@ -15526,7 +15685,7 @@ function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
|
15526
15685
|
}
|
|
15527
15686
|
function hideTooltipOnMouseOut() {
|
|
15528
15687
|
try {
|
|
15529
|
-
select$2("#chartTooltipDiv").html("").style("visibility",
|
|
15688
|
+
select$2("#chartTooltipDiv").html("").style("visibility", visibilityCondition.hidden);
|
|
15530
15689
|
} catch (error) {
|
|
15531
15690
|
logError$2(fileName$b, "hideTooltipOnMouseOut", error);
|
|
15532
15691
|
}
|
|
@@ -15536,14 +15695,14 @@ const drawChartTitle = (chartSvg, chartTitleHeight, chartTitleWidth, chartFormat
|
|
|
15536
15695
|
let svg = select$2(chartSvg.current);
|
|
15537
15696
|
let object2 = svg.append("foreignObject").attr(
|
|
15538
15697
|
"visibility",
|
|
15539
|
-
chartFormatOptions.chartTitle.chartTitleVisibility ?
|
|
15698
|
+
chartFormatOptions.chartTitle.chartTitleVisibility ? visibilityCondition.visible : visibilityCondition.hidden
|
|
15540
15699
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", chartTitleWidth).attr("height", chartTitleHeight + "px");
|
|
15541
15700
|
if (chartFormatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
15542
|
-
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").style("overflow",
|
|
15701
|
+
object2.append("xhtml:div").style("color", "rgba(119,119,119)").attr("title", chartFormatOptions.chartTitle.chartTitleText).style("white-space", "pre").style("text-overflow", "ellipsis").style("overflow", visibilityCondition.visible).style("line-height", "1.3em").html(
|
|
15543
15702
|
chartFormatOptions.chartTitle.chartTitleHTML ? chartFormatOptions.chartTitle.chartTitleHTML : chartFormatOptions.chartTitle.chartTitleText
|
|
15544
15703
|
);
|
|
15545
15704
|
} else {
|
|
15546
|
-
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow",
|
|
15705
|
+
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow", visibilityCondition.visible).style("line-height", "1.3em").attr("class", "chartTiltle").attr("id", "chartTitleId").style("text-anchor", "start").style("color", "rgba(119,119,119)").style("font-size", "16px").style(
|
|
15547
15706
|
"font-family",
|
|
15548
15707
|
chartFormatOptions.chartTitle.chartTitleFontFamily
|
|
15549
15708
|
).attr("title", chartFormatOptions.chartTitle.chartTitleText).html(chartFormatOptions.chartTitle.chartTitleText);
|
|
@@ -15626,7 +15785,7 @@ const legendsWithScroll = (svg, seriesData, x2, y2, width, height, legendPositio
|
|
|
15626
15785
|
}
|
|
15627
15786
|
}
|
|
15628
15787
|
let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
|
|
15629
|
-
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color :
|
|
15788
|
+
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
15630
15789
|
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).style("font-size", (!isVennChart ? d.properties.fontSize : chartFormatOptions.legends.legendFontSize) + "px").style("font-family", !isVennChart ? d.properties.fontFamily : chartFormatOptions.legends.legendFontFamily).style(
|
|
15631
15790
|
"font-style",
|
|
15632
15791
|
() => {
|
|
@@ -15668,7 +15827,7 @@ function getHollowCircleShape(d, innerDiv) {
|
|
|
15668
15827
|
}
|
|
15669
15828
|
function getLineShape(d, innerDiv, formatOptions) {
|
|
15670
15829
|
try {
|
|
15671
|
-
let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties.lineStyle == "solid" ? d.properties.color :
|
|
15830
|
+
let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties.lineStyle == "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);
|
|
15672
15831
|
if (formatOptions.marker.markerVisibility) {
|
|
15673
15832
|
switch (d.properties.markerShape.toLowerCase()) {
|
|
15674
15833
|
case "circle":
|
|
@@ -15977,7 +16136,7 @@ const convertStringToNumber = (value2) => {
|
|
|
15977
16136
|
logError$2(fileName$b, "convertStringToNumber", error);
|
|
15978
16137
|
}
|
|
15979
16138
|
};
|
|
15980
|
-
function generalizedChartData(chartData, dimensionList) {
|
|
16139
|
+
function generalizedChartData(chartData, dimensionList, isTornadoChart = false) {
|
|
15981
16140
|
try {
|
|
15982
16141
|
return chartData.map((item) => {
|
|
15983
16142
|
let properties;
|
|
@@ -16007,7 +16166,7 @@ function generalizedChartData(chartData, dimensionList) {
|
|
|
16007
16166
|
return {
|
|
16008
16167
|
...item,
|
|
16009
16168
|
properties,
|
|
16010
|
-
data: item.data
|
|
16169
|
+
data: isTornadoChart ? item.data : normalizedData
|
|
16011
16170
|
};
|
|
16012
16171
|
});
|
|
16013
16172
|
} catch (error) {
|
|
@@ -16471,7 +16630,9 @@ const ColumnChart = ({
|
|
|
16471
16630
|
)
|
|
16472
16631
|
).tickSize(
|
|
16473
16632
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
16474
|
-
).tickValues(
|
|
16633
|
+
).tickValues(
|
|
16634
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
16635
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
16475
16636
|
}
|
|
16476
16637
|
if (isSecondaryAxisDrawn) {
|
|
16477
16638
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
@@ -16520,7 +16681,13 @@ const ColumnChart = ({
|
|
|
16520
16681
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
16521
16682
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
16522
16683
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
16523
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
16684
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
16685
|
+
"hoverId",
|
|
16686
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
16687
|
+
/\s+/g,
|
|
16688
|
+
"-"
|
|
16689
|
+
)
|
|
16690
|
+
).attr(
|
|
16524
16691
|
"transform",
|
|
16525
16692
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
16526
16693
|
);
|
|
@@ -16533,9 +16700,12 @@ const ColumnChart = ({
|
|
|
16533
16700
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
16534
16701
|
);
|
|
16535
16702
|
const bars = columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legend)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
16536
|
-
const yScale = data2.properties.axis ===
|
|
16703
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16537
16704
|
return yScale(0);
|
|
16538
|
-
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
16705
|
+
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
16706
|
+
"stroke-dasharray",
|
|
16707
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
16708
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
16539
16709
|
"stroke",
|
|
16540
16710
|
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
16541
16711
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
@@ -16544,10 +16714,10 @@ const ColumnChart = ({
|
|
|
16544
16714
|
);
|
|
16545
16715
|
const finalBars = bars;
|
|
16546
16716
|
finalBars.attr("y", (d) => {
|
|
16547
|
-
const yScale = data2.properties.axis ===
|
|
16717
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16548
16718
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
16549
16719
|
}).attr("height", (d) => {
|
|
16550
|
-
const yScale = data2.properties.axis ===
|
|
16720
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16551
16721
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
16552
16722
|
});
|
|
16553
16723
|
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
@@ -16743,10 +16913,6 @@ const CustomColumnChart = ({
|
|
|
16743
16913
|
let xScale;
|
|
16744
16914
|
let xScaleForLegends;
|
|
16745
16915
|
let calculatedRange;
|
|
16746
|
-
let stackAreaChartDataForPrimaryAxis = [];
|
|
16747
|
-
let stackAreaChartDataForSecondaryAxis = [];
|
|
16748
|
-
let stackColumnChartDataForPrimaryAxis = [];
|
|
16749
|
-
let stackColumnChartDataForSecondaryAxis = [];
|
|
16750
16916
|
let primaryStackAxisData = [];
|
|
16751
16917
|
let secondaryStackAxisData = [];
|
|
16752
16918
|
let primaryStackAreaAxisData = [];
|
|
@@ -16854,6 +17020,7 @@ const CustomColumnChart = ({
|
|
|
16854
17020
|
innerHeight2,
|
|
16855
17021
|
chartType
|
|
16856
17022
|
);
|
|
17023
|
+
updateStackAxisExtremes();
|
|
16857
17024
|
initScale();
|
|
16858
17025
|
initAxis();
|
|
16859
17026
|
initYaxis$1(
|
|
@@ -16962,7 +17129,7 @@ const CustomColumnChart = ({
|
|
|
16962
17129
|
secondaryStackAreaAxisData.push(series);
|
|
16963
17130
|
}
|
|
16964
17131
|
}
|
|
16965
|
-
if (series.properties.axis ===
|
|
17132
|
+
if (series.properties.axis === axisTypes.primary) {
|
|
16966
17133
|
primaryStackAxisData.push(series);
|
|
16967
17134
|
if (series.properties.type == chartTypes.StackColumnChart) {
|
|
16968
17135
|
primaryStackColumnAxisData.push(series);
|
|
@@ -17018,132 +17185,91 @@ const CustomColumnChart = ({
|
|
|
17018
17185
|
primaryStackAreaAxisData,
|
|
17019
17186
|
primaryStackColumnAxisData,
|
|
17020
17187
|
secondaryStackAreaAxisData,
|
|
17021
|
-
secondaryStackColumnAxisData
|
|
17188
|
+
secondaryStackColumnAxisData,
|
|
17189
|
+
seriesData
|
|
17022
17190
|
);
|
|
17023
|
-
if (primaryStackAxisData.length > 0) {
|
|
17024
|
-
let valueArray = [];
|
|
17025
|
-
let stackDataForPrimaryAxis = getStackedData(
|
|
17026
|
-
filteredDimension,
|
|
17027
|
-
primaryStackAxisData,
|
|
17028
|
-
false
|
|
17029
|
-
);
|
|
17030
|
-
stackDataForPrimaryAxis.forEach((d) => {
|
|
17031
|
-
valueArray.push(d.total);
|
|
17032
|
-
});
|
|
17033
|
-
chartJSON.yMaxLeft = Math.max(
|
|
17034
|
-
chartJSON.yMaxLeft,
|
|
17035
|
-
Math.max(...valueArray)
|
|
17036
|
-
);
|
|
17037
|
-
chartJSON.yMinLeft = Math.min(
|
|
17038
|
-
chartJSON.yMinLeft,
|
|
17039
|
-
Math.min(...valueArray)
|
|
17040
|
-
);
|
|
17041
|
-
}
|
|
17042
|
-
if (secondaryStackAxisData.length > 0) {
|
|
17043
|
-
let valueArray = [];
|
|
17044
|
-
let stackDataForSecondaryAxis = getStackedData(
|
|
17045
|
-
filteredDimension,
|
|
17046
|
-
secondaryStackAxisData,
|
|
17047
|
-
false
|
|
17048
|
-
);
|
|
17049
|
-
stackDataForSecondaryAxis.forEach((d) => {
|
|
17050
|
-
valueArray.push(d.total);
|
|
17051
|
-
});
|
|
17052
|
-
chartJSON.yMaxRight = Math.max(
|
|
17053
|
-
chartJSON.yMaxRight,
|
|
17054
|
-
Math.max(...valueArray)
|
|
17055
|
-
);
|
|
17056
|
-
chartJSON.yMinRight = Math.min(
|
|
17057
|
-
chartJSON.yMinRight,
|
|
17058
|
-
Math.min(...valueArray)
|
|
17059
|
-
);
|
|
17060
|
-
}
|
|
17061
17191
|
};
|
|
17062
|
-
const checkAndupdateInputData = (primaryStackAreaAxisData2, primaryStackColumnAxisData2, secondaryStackAreaAxisData2, secondaryStackColumnAxisData2) => {
|
|
17063
|
-
|
|
17192
|
+
const checkAndupdateInputData = (primaryStackAreaAxisData2, primaryStackColumnAxisData2, secondaryStackAreaAxisData2, secondaryStackColumnAxisData2, ChartData) => {
|
|
17193
|
+
const tempStackAreaChartDataForPrimaryAxis = getStackedData(
|
|
17064
17194
|
filteredDimension,
|
|
17065
17195
|
primaryStackAreaAxisData2,
|
|
17066
17196
|
false
|
|
17067
17197
|
);
|
|
17068
|
-
|
|
17198
|
+
const tempStackAreaChartDataForSecondaryAxis = getStackedData(
|
|
17069
17199
|
filteredDimension,
|
|
17070
17200
|
secondaryStackAreaAxisData2,
|
|
17071
17201
|
false
|
|
17072
17202
|
);
|
|
17073
|
-
|
|
17203
|
+
const tempStackColumnChartDataForPrimaryAxis = getStackedData(
|
|
17074
17204
|
filteredDimension,
|
|
17075
17205
|
primaryStackColumnAxisData2,
|
|
17076
17206
|
false
|
|
17077
17207
|
);
|
|
17078
|
-
|
|
17208
|
+
const tempStackColumnChartDataForSecondaryAxis = getStackedData(
|
|
17079
17209
|
filteredDimension,
|
|
17080
17210
|
secondaryStackColumnAxisData2,
|
|
17081
17211
|
false
|
|
17082
17212
|
);
|
|
17083
17213
|
requiredData = [];
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
legend: d.properties.legend
|
|
17095
|
-
},
|
|
17096
|
-
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17097
|
-
data: primaryStackAreaAxisData2
|
|
17098
|
-
});
|
|
17214
|
+
const allGeneratedData = [];
|
|
17215
|
+
primaryStackAreaAxisData2.forEach((d) => {
|
|
17216
|
+
allGeneratedData.push({
|
|
17217
|
+
properties: {
|
|
17218
|
+
axis: d.properties.axis,
|
|
17219
|
+
type: d.properties.type,
|
|
17220
|
+
legend: d.properties.legend
|
|
17221
|
+
},
|
|
17222
|
+
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17223
|
+
data: primaryStackAreaAxisData2
|
|
17099
17224
|
});
|
|
17100
|
-
}
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
data: secondaryStackAreaAxisData2
|
|
17111
|
-
});
|
|
17225
|
+
});
|
|
17226
|
+
secondaryStackAreaAxisData2.forEach((d) => {
|
|
17227
|
+
allGeneratedData.push({
|
|
17228
|
+
properties: {
|
|
17229
|
+
axis: d.properties.axis,
|
|
17230
|
+
type: d.properties.type,
|
|
17231
|
+
legend: d.properties.legend
|
|
17232
|
+
},
|
|
17233
|
+
stackData: tempStackAreaChartDataForSecondaryAxis,
|
|
17234
|
+
data: secondaryStackAreaAxisData2
|
|
17112
17235
|
});
|
|
17113
|
-
}
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
|
|
17120
|
-
|
|
17121
|
-
|
|
17122
|
-
|
|
17123
|
-
data: primaryStackColumnAxisData2
|
|
17124
|
-
});
|
|
17236
|
+
});
|
|
17237
|
+
primaryStackColumnAxisData2.forEach((d) => {
|
|
17238
|
+
allGeneratedData.push({
|
|
17239
|
+
properties: {
|
|
17240
|
+
axis: d.properties.axis,
|
|
17241
|
+
type: d.properties.type,
|
|
17242
|
+
legend: d.properties.legend
|
|
17243
|
+
},
|
|
17244
|
+
stackData: tempStackColumnChartDataForPrimaryAxis,
|
|
17245
|
+
data: primaryStackColumnAxisData2
|
|
17125
17246
|
});
|
|
17126
|
-
}
|
|
17127
|
-
|
|
17128
|
-
|
|
17129
|
-
|
|
17130
|
-
|
|
17131
|
-
|
|
17132
|
-
|
|
17133
|
-
|
|
17134
|
-
|
|
17135
|
-
|
|
17136
|
-
|
|
17137
|
-
|
|
17247
|
+
});
|
|
17248
|
+
secondaryStackColumnAxisData2.forEach((d) => {
|
|
17249
|
+
allGeneratedData.push({
|
|
17250
|
+
properties: {
|
|
17251
|
+
axis: d.properties.axis,
|
|
17252
|
+
type: d.properties.type,
|
|
17253
|
+
legend: d.properties.legend
|
|
17254
|
+
},
|
|
17255
|
+
stackData: tempStackColumnChartDataForSecondaryAxis,
|
|
17256
|
+
data: secondaryStackColumnAxisData2
|
|
17257
|
+
});
|
|
17258
|
+
});
|
|
17259
|
+
allGeneratedData.push(...chartJSON.chartData);
|
|
17260
|
+
if (ChartData.length) {
|
|
17261
|
+
const ordered = [];
|
|
17262
|
+
ChartData.forEach((data2) => {
|
|
17263
|
+
ordered.push(
|
|
17264
|
+
...allGeneratedData.filter(
|
|
17265
|
+
(d) => d.properties?.type === data2.properties.type && d.properties.legend === data2.legend
|
|
17266
|
+
)
|
|
17267
|
+
);
|
|
17138
17268
|
});
|
|
17269
|
+
requiredData.push(...ordered);
|
|
17270
|
+
} else {
|
|
17271
|
+
requiredData.push(...allGeneratedData);
|
|
17139
17272
|
}
|
|
17140
|
-
requiredData.push(
|
|
17141
|
-
...chartJSON.chartData,
|
|
17142
|
-
...stackAreaChartDataForPrimaryAxis,
|
|
17143
|
-
...stackAreaChartDataForSecondaryAxis,
|
|
17144
|
-
...stackColumnChartDataForPrimaryAxis,
|
|
17145
|
-
...stackColumnChartDataForSecondaryAxis
|
|
17146
|
-
);
|
|
17147
17273
|
};
|
|
17148
17274
|
const initScale = () => {
|
|
17149
17275
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -17186,7 +17312,7 @@ const CustomColumnChart = ({
|
|
|
17186
17312
|
calculatedRange = [0, innerWidth2];
|
|
17187
17313
|
};
|
|
17188
17314
|
const getXScale = () => {
|
|
17189
|
-
xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
|
|
17315
|
+
xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
|
|
17190
17316
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
17191
17317
|
);
|
|
17192
17318
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -17216,6 +17342,15 @@ const CustomColumnChart = ({
|
|
|
17216
17342
|
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
17217
17343
|
}
|
|
17218
17344
|
if (isSecondaryAxisDrawn) {
|
|
17345
|
+
let responsiveLablesObj = responsiveYaxisLabel$1(
|
|
17346
|
+
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxRight,
|
|
17347
|
+
chartJSON.yMinRight,
|
|
17348
|
+
innerHeight2,
|
|
17349
|
+
formatOptions,
|
|
17350
|
+
chartJSON,
|
|
17351
|
+
customYaxisMinValue,
|
|
17352
|
+
customYaxisMaxValue
|
|
17353
|
+
);
|
|
17219
17354
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
17220
17355
|
(d) => getNumberWithFormat(
|
|
17221
17356
|
d,
|
|
@@ -17224,20 +17359,8 @@ const CustomColumnChart = ({
|
|
|
17224
17359
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
17225
17360
|
)
|
|
17226
17361
|
).tickValues(
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
chartJSON.yMinRight,
|
|
17230
|
-
formatOptions,
|
|
17231
|
-
chartJSON
|
|
17232
|
-
).secondaryYAxisLabelArray
|
|
17233
|
-
).ticks(
|
|
17234
|
-
responsiveSecondaryYaxisLabel(
|
|
17235
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
17236
|
-
chartJSON.yMinRight,
|
|
17237
|
-
formatOptions,
|
|
17238
|
-
chartJSON
|
|
17239
|
-
).secondaryCustomTickValue ?? innerHeight2 / 30
|
|
17240
|
-
).tickSize(
|
|
17362
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
17363
|
+
).ticks(responsiveLablesObj.customTickValue).tickSize(
|
|
17241
17364
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
17242
17365
|
).tickPadding(8).tickSizeOuter(0);
|
|
17243
17366
|
}
|
|
@@ -17254,10 +17377,8 @@ const CustomColumnChart = ({
|
|
|
17254
17377
|
drawColumnChart(data2);
|
|
17255
17378
|
break;
|
|
17256
17379
|
case chartTypes.LineChart:
|
|
17257
|
-
drawLineChart([data2]);
|
|
17258
17380
|
break;
|
|
17259
17381
|
case chartTypes.AreaChart:
|
|
17260
|
-
drawAreaChart([data2]);
|
|
17261
17382
|
break;
|
|
17262
17383
|
case chartTypes.StackColumnChart:
|
|
17263
17384
|
stackColumnData = createStackData(data2);
|
|
@@ -17269,6 +17390,18 @@ const CustomColumnChart = ({
|
|
|
17269
17390
|
break;
|
|
17270
17391
|
}
|
|
17271
17392
|
});
|
|
17393
|
+
const lineSeries = filteredData.filter(
|
|
17394
|
+
(d) => d.properties.type === chartTypes.LineChart
|
|
17395
|
+
);
|
|
17396
|
+
if (lineSeries.length) {
|
|
17397
|
+
drawLineChart(lineSeries);
|
|
17398
|
+
}
|
|
17399
|
+
const AreaSeries = filteredData.filter(
|
|
17400
|
+
(d) => d.properties.type === chartTypes.AreaChart
|
|
17401
|
+
);
|
|
17402
|
+
if (AreaSeries.length) {
|
|
17403
|
+
drawAreaChart(AreaSeries);
|
|
17404
|
+
}
|
|
17272
17405
|
gTag.selectAll(".parentGroup").raise();
|
|
17273
17406
|
};
|
|
17274
17407
|
const drawColumnChart = (data2) => {
|
|
@@ -17279,19 +17412,15 @@ const CustomColumnChart = ({
|
|
|
17279
17412
|
"hoverId",
|
|
17280
17413
|
(d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
|
|
17281
17414
|
).attr("transform", (d) => `translate(${xScale(d.dimension)}, 0)`);
|
|
17282
|
-
columnGroups.attr(
|
|
17283
|
-
"transform",
|
|
17284
|
-
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
17285
|
-
);
|
|
17286
17415
|
columnGroupsEnter.merge(columnGroups).attr(
|
|
17287
17416
|
"transform",
|
|
17288
17417
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
17289
17418
|
);
|
|
17290
17419
|
columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legend)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
17291
|
-
const yScale = data2.properties.axis ===
|
|
17420
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17292
17421
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
17293
17422
|
}).attr("height", (d) => {
|
|
17294
|
-
const yScale = data2.properties.axis ===
|
|
17423
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17295
17424
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
17296
17425
|
}).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) => d.stackBorderStyle === 2 ? "5,3" : "0").attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
17297
17426
|
"stroke",
|
|
@@ -17327,7 +17456,8 @@ const CustomColumnChart = ({
|
|
|
17327
17456
|
}
|
|
17328
17457
|
],
|
|
17329
17458
|
formatOptions,
|
|
17330
|
-
event2
|
|
17459
|
+
event2,
|
|
17460
|
+
seriesData.filter((e) => e.legend === d.legend)[0].properties
|
|
17331
17461
|
);
|
|
17332
17462
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
17333
17463
|
columnGroups.exit().remove();
|
|
@@ -17342,28 +17472,34 @@ const CustomColumnChart = ({
|
|
|
17342
17472
|
const lineGenerator = line$1().x(
|
|
17343
17473
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
17344
17474
|
).y(
|
|
17345
|
-
(d) => d.axis ==
|
|
17475
|
+
(d) => d.axis == axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)
|
|
17346
17476
|
).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
17347
|
-
let lines = gTag.selectAll(".parentGroup").data([
|
|
17477
|
+
let lines = gTag.selectAll(".lines.parentGroup").data([1]);
|
|
17348
17478
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
17349
|
-
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
17479
|
+
let lineGroups = lines.selectAll(".line-group").data(lineData, (d) => d.legend);
|
|
17350
17480
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", "line-group");
|
|
17351
|
-
lineGroupsEnter.attr(
|
|
17481
|
+
lineGroupsEnter.attr(
|
|
17482
|
+
"hoverId",
|
|
17483
|
+
(d) => (d.properties.alias || d.properties.name || "Legend").replace(
|
|
17484
|
+
/\s+/g,
|
|
17485
|
+
"-"
|
|
17486
|
+
)
|
|
17487
|
+
).append("path").attr("class", "line").attr("fill", "none");
|
|
17352
17488
|
lineGroupsEnter.merge(lineGroups).select("path").attr("d", (d) => lineGenerator(d.data)).attr(
|
|
17353
17489
|
"stroke",
|
|
17354
|
-
(d) => d.properties.color !==
|
|
17490
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
17355
17491
|
).attr("stroke-dasharray", (d) => {
|
|
17356
17492
|
switch (d.properties.lineStyle) {
|
|
17357
17493
|
case staticLineStyle.dotted:
|
|
17358
17494
|
return "0,3";
|
|
17359
17495
|
case staticLineStyle.dashed:
|
|
17360
|
-
return
|
|
17496
|
+
return strokeDashValues;
|
|
17361
17497
|
default:
|
|
17362
17498
|
return "";
|
|
17363
17499
|
}
|
|
17364
17500
|
}).attr(
|
|
17365
17501
|
"stroke-linecap",
|
|
17366
|
-
(d) => d.properties.lineStyle === staticLineStyle.dotted ?
|
|
17502
|
+
(d) => d.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
17367
17503
|
).attr(
|
|
17368
17504
|
"stroke-width",
|
|
17369
17505
|
(d) => d.properties.lineStyle !== "None" ? d.properties.lineWidth : "0"
|
|
@@ -17372,7 +17508,7 @@ const CustomColumnChart = ({
|
|
|
17372
17508
|
lineMarkers(
|
|
17373
17509
|
lines,
|
|
17374
17510
|
lineData,
|
|
17375
|
-
|
|
17511
|
+
chartTypes.CombinationLine,
|
|
17376
17512
|
xScale,
|
|
17377
17513
|
yScaleLeft,
|
|
17378
17514
|
yScaleRight,
|
|
@@ -17386,45 +17522,57 @@ const CustomColumnChart = ({
|
|
|
17386
17522
|
);
|
|
17387
17523
|
};
|
|
17388
17524
|
const drawAreaChart = (lineData) => {
|
|
17525
|
+
lineData.forEach((lData) => {
|
|
17526
|
+
lData.data.forEach((cData) => {
|
|
17527
|
+
cData.hideZero = lData.properties.hideZeroValues;
|
|
17528
|
+
cData.axis = lData.properties.axis;
|
|
17529
|
+
});
|
|
17530
|
+
});
|
|
17389
17531
|
const areaGenerator = area().x(
|
|
17390
17532
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
17391
17533
|
).y0(
|
|
17392
17534
|
(d) => (
|
|
17393
|
-
// d.axis ==
|
|
17535
|
+
// d.axis == axisTypes.primary ?
|
|
17394
17536
|
yScaleLeft(0)
|
|
17395
17537
|
)
|
|
17396
17538
|
// : yScaleRight(0)
|
|
17397
17539
|
).y1(
|
|
17398
17540
|
(d) => (
|
|
17399
|
-
// d.axis ==
|
|
17541
|
+
// d.axis == axisTypes.primary ?
|
|
17400
17542
|
yScaleLeft(d.value)
|
|
17401
17543
|
)
|
|
17402
17544
|
// : yScaleRight((d as TDataPoint).value)
|
|
17403
17545
|
).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
17404
|
-
let areas = gTag.selectAll(".parentGroup").data([
|
|
17546
|
+
let areas = gTag.selectAll(".areas.parentGroup").data([1]);
|
|
17405
17547
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
17406
17548
|
areas = areas.enter().append("g").attr("class", "areas parentGroup").merge(areas);
|
|
17407
|
-
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
17549
|
+
let areaGroups = areas.selectAll(".area-group").data(lineData, (d) => d.legend);
|
|
17408
17550
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
|
|
17409
|
-
areaGroupsEnter.attr(
|
|
17551
|
+
areaGroupsEnter.attr(
|
|
17552
|
+
"hoverId",
|
|
17553
|
+
(d) => (d.properties.alias || d.properties.name || "Legend").replace(
|
|
17554
|
+
/\s+/g,
|
|
17555
|
+
"-"
|
|
17556
|
+
)
|
|
17557
|
+
).append("path").attr("class", "area").attr(
|
|
17410
17558
|
"fill",
|
|
17411
|
-
(d) => d.properties.color !==
|
|
17559
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
17412
17560
|
).style("fill-opacity", formatOptions.plotArea.fillOpacity);
|
|
17413
17561
|
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d) => areaGenerator(d.data)).attr(
|
|
17414
17562
|
"stroke",
|
|
17415
|
-
(d) => d.properties.areaBorderColor !==
|
|
17563
|
+
(d) => d.properties.areaBorderColor !== commonColors.white ? d.properties.areaBorderColor : "none"
|
|
17416
17564
|
).attr("stroke-dasharray", (d) => {
|
|
17417
17565
|
switch (d.properties.lineStyle) {
|
|
17418
17566
|
case "dotted":
|
|
17419
17567
|
return "0,3";
|
|
17420
17568
|
case "dashed":
|
|
17421
|
-
return
|
|
17569
|
+
return strokeDashValues;
|
|
17422
17570
|
default:
|
|
17423
17571
|
return "";
|
|
17424
17572
|
}
|
|
17425
17573
|
}).attr(
|
|
17426
17574
|
"stroke-linecap",
|
|
17427
|
-
(d) => d.properties.lineStyle === "dotted" ?
|
|
17575
|
+
(d) => d.properties.lineStyle === "dotted" ? strokeLineCap.round : ""
|
|
17428
17576
|
).attr(
|
|
17429
17577
|
"stroke-width",
|
|
17430
17578
|
(d) => d.properties.lineStyle !== "None" && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d.properties.lineWidth : "0"
|
|
@@ -17440,14 +17588,35 @@ const CustomColumnChart = ({
|
|
|
17440
17588
|
chartType
|
|
17441
17589
|
);
|
|
17442
17590
|
areaGroups.exit().remove();
|
|
17591
|
+
lineMarkers(
|
|
17592
|
+
areas,
|
|
17593
|
+
lineData,
|
|
17594
|
+
chartTypes.CombinationArea,
|
|
17595
|
+
xScale,
|
|
17596
|
+
yScaleLeft,
|
|
17597
|
+
yScaleRight,
|
|
17598
|
+
null,
|
|
17599
|
+
formatOptions,
|
|
17600
|
+
chartJSON,
|
|
17601
|
+
secondaryCustomYaxisMaxValue,
|
|
17602
|
+
secondaryCustomYaxisMinValue,
|
|
17603
|
+
customYaxisMinValue,
|
|
17604
|
+
customYaxisMaxValue
|
|
17605
|
+
);
|
|
17443
17606
|
};
|
|
17444
17607
|
const drawStackAreaChart = (data2) => {
|
|
17608
|
+
data2.data.forEach((lData) => {
|
|
17609
|
+
lData.data.forEach((cData) => {
|
|
17610
|
+
cData.hideZero = lData.properties.hideZeroValues;
|
|
17611
|
+
cData.axis = lData.properties.axis;
|
|
17612
|
+
});
|
|
17613
|
+
});
|
|
17445
17614
|
const areaGenerator = area().x(
|
|
17446
17615
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
17447
17616
|
).y0(
|
|
17448
|
-
(d) => d.data.axis
|
|
17617
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[0]) : yScaleRight(d[0])
|
|
17449
17618
|
).y1(
|
|
17450
|
-
(d) => d.data.axis
|
|
17619
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17451
17620
|
).defined((d) => d.hideZero ? Boolean(d.key) : true).curve(getCurveType(formatOptions));
|
|
17452
17621
|
let areas = gTag.selectAll(".parentGroup").data([stackAreaData]);
|
|
17453
17622
|
gTag.append("g").attr("class", "focusClass");
|
|
@@ -17456,14 +17625,17 @@ const CustomColumnChart = ({
|
|
|
17456
17625
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
17457
17626
|
areaGroupsEnter.attr(
|
|
17458
17627
|
"hoverId",
|
|
17459
|
-
(d) =>
|
|
17460
|
-
).append("path").attr("class", "area").attr("fill", (d) => d.color !==
|
|
17461
|
-
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d, i) => areaGenerator(d)).style("opacity", formatOptions.plotArea.fillOpacity).attr(
|
|
17628
|
+
(d) => (data2.data.filter((e) => e.legend === d.key)[0].properties.alias || data2.data.filter((e) => e.legend === d.key)[0].properties.name || "Legend").replace(/\s+/g, "-")
|
|
17629
|
+
).append("path").attr("class", "area").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none");
|
|
17630
|
+
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d, i) => areaGenerator(d)).style("opacity", formatOptions.plotArea.fillOpacity).attr(
|
|
17631
|
+
"stroke",
|
|
17632
|
+
(d) => d.color !== commonColors.white ? d.color : "none"
|
|
17633
|
+
).attr(
|
|
17462
17634
|
"stroke-dasharray",
|
|
17463
|
-
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ?
|
|
17635
|
+
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ? strokeDashValues : ""
|
|
17464
17636
|
).attr(
|
|
17465
17637
|
"stroke-linecap",
|
|
17466
|
-
(d, i) => seriesData[i].properties.lineStyle === "dotted" ?
|
|
17638
|
+
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? strokeLineCap.round : ""
|
|
17467
17639
|
).attr(
|
|
17468
17640
|
"stroke-width",
|
|
17469
17641
|
(d, i) => seriesData[i].properties.lineStyle !== "None" ? seriesData[i].properties.lineWidth : "0"
|
|
@@ -17472,7 +17644,7 @@ const CustomColumnChart = ({
|
|
|
17472
17644
|
lineMarkers(
|
|
17473
17645
|
areas,
|
|
17474
17646
|
data2.data,
|
|
17475
|
-
|
|
17647
|
+
chartTypes.CombinationStackArea,
|
|
17476
17648
|
xScale,
|
|
17477
17649
|
yScaleLeft,
|
|
17478
17650
|
yScaleRight,
|
|
@@ -17500,10 +17672,10 @@ const CustomColumnChart = ({
|
|
|
17500
17672
|
(d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
|
|
17501
17673
|
).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
|
|
17502
17674
|
"y",
|
|
17503
|
-
(d) => d.data.axis ===
|
|
17675
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17504
17676
|
).attr(
|
|
17505
17677
|
"height",
|
|
17506
|
-
(d) => d.data.axis ===
|
|
17678
|
+
(d) => d.data.axis === axisTypes.primary ? customYaxisMaxValue && d[1] > customYaxisMaxValue ? yScaleLeft(d[0]) - yScaleLeft(customYaxisMaxValue) : yScaleLeft(d[0]) - yScaleLeft(d[1]) : secondaryCustomYaxisMaxValue && d[1] > secondaryCustomYaxisMaxValue ? yScaleRight(d[0]) - yScaleRight(secondaryCustomYaxisMaxValue) : yScaleRight(d[0]) - yScaleRight(d[1])
|
|
17507
17679
|
).attr("width", xScaleForLegends.bandwidth()).attr("fill", (d, i, nodes) => {
|
|
17508
17680
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17509
17681
|
(sdata) => sdata.legend === d.key
|
|
@@ -17547,7 +17719,8 @@ const CustomColumnChart = ({
|
|
|
17547
17719
|
}
|
|
17548
17720
|
],
|
|
17549
17721
|
formatOptions,
|
|
17550
|
-
event2
|
|
17722
|
+
event2,
|
|
17723
|
+
seriesData.filter((e) => e.legend === d.key)[0].properties
|
|
17551
17724
|
);
|
|
17552
17725
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
17553
17726
|
stackColumnGroups.exit().remove();
|
|
@@ -17564,7 +17737,8 @@ const CustomColumnChart = ({
|
|
|
17564
17737
|
primaryStackAreaAxisData,
|
|
17565
17738
|
primaryStackColumnAxisData,
|
|
17566
17739
|
secondaryStackAreaAxisData,
|
|
17567
|
-
secondaryStackColumnAxisData
|
|
17740
|
+
secondaryStackColumnAxisData,
|
|
17741
|
+
fData
|
|
17568
17742
|
);
|
|
17569
17743
|
filteredData = JSON.parse(JSON.stringify(requiredData));
|
|
17570
17744
|
filteredData.forEach((data2, i) => {
|
|
@@ -17674,6 +17848,20 @@ const CustomColumnChart = ({
|
|
|
17674
17848
|
});
|
|
17675
17849
|
return stackChartData;
|
|
17676
17850
|
};
|
|
17851
|
+
const updateStackAxisExtremes = () => {
|
|
17852
|
+
if (primaryStackAxisData.length > 0) {
|
|
17853
|
+
const stackData = primaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, primaryStackColumnAxisData, false) : getStackedData(filteredDimension, primaryStackAreaAxisData, false);
|
|
17854
|
+
const totals = stackData.map((d) => d.total);
|
|
17855
|
+
chartJSON.yMaxLeft = Math.max(chartJSON.yMaxLeft, ...totals);
|
|
17856
|
+
chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
|
|
17857
|
+
}
|
|
17858
|
+
if (secondaryStackAxisData.length > 0) {
|
|
17859
|
+
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
|
|
17860
|
+
const totals = stackData.map((d) => d.total);
|
|
17861
|
+
chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
|
|
17862
|
+
chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
|
|
17863
|
+
}
|
|
17864
|
+
};
|
|
17677
17865
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17678
17866
|
"svg",
|
|
17679
17867
|
{
|
|
@@ -18011,7 +18199,9 @@ const LayeredColumnChart = ({
|
|
|
18011
18199
|
)
|
|
18012
18200
|
).tickSize(
|
|
18013
18201
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
18014
|
-
).tickValues(
|
|
18202
|
+
).tickValues(
|
|
18203
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
18204
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
18015
18205
|
}
|
|
18016
18206
|
};
|
|
18017
18207
|
const getXAxis = () => {
|
|
@@ -18031,7 +18221,13 @@ const LayeredColumnChart = ({
|
|
|
18031
18221
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
18032
18222
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
18033
18223
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
18034
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
18224
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
18225
|
+
"hoverId",
|
|
18226
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
18227
|
+
/\s+/g,
|
|
18228
|
+
"-"
|
|
18229
|
+
)
|
|
18230
|
+
).attr(
|
|
18035
18231
|
"transform",
|
|
18036
18232
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
18037
18233
|
);
|
|
@@ -18044,10 +18240,10 @@ const LayeredColumnChart = ({
|
|
|
18044
18240
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
18045
18241
|
);
|
|
18046
18242
|
columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.dimension)).attr("width", index2 === 0 ? columnWidth : columnWidth / 2 + index2 * 2).attr("y", (d) => {
|
|
18047
|
-
const yScale = data2.properties.axis ===
|
|
18243
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18048
18244
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
18049
18245
|
}).attr("height", (d) => {
|
|
18050
|
-
const yScale = data2.properties.axis ===
|
|
18246
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18051
18247
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
18052
18248
|
}).attr("fill", data2.properties.color).attr(
|
|
18053
18249
|
"stroke-dasharray",
|
|
@@ -18208,11 +18404,8 @@ const StackColumnChart = ({
|
|
|
18208
18404
|
let scrollbarVisible = false;
|
|
18209
18405
|
const chartType = chartTypes.StackColumnChart;
|
|
18210
18406
|
const svgRef = useRef();
|
|
18211
|
-
const seriesData = generalizedChartData(
|
|
18212
|
-
data.ChartData,
|
|
18213
|
-
data.DimensionList
|
|
18214
|
-
)?.reverse();
|
|
18215
18407
|
const dimensionList = data.DimensionList;
|
|
18408
|
+
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
18216
18409
|
const barChart = false;
|
|
18217
18410
|
const isSecondaryAxisDrawn = false;
|
|
18218
18411
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
@@ -18254,6 +18447,7 @@ const StackColumnChart = ({
|
|
|
18254
18447
|
let scrollPosition = 0;
|
|
18255
18448
|
let visibleBars;
|
|
18256
18449
|
let stackChartData = [];
|
|
18450
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
18257
18451
|
const isNormalizedChart = false;
|
|
18258
18452
|
let chartJSON = {
|
|
18259
18453
|
dimensionList,
|
|
@@ -18276,15 +18470,6 @@ const StackColumnChart = ({
|
|
|
18276
18470
|
logError$2("StackStackColumnchart", "createStackColumnChart", error);
|
|
18277
18471
|
}
|
|
18278
18472
|
}, [formatOptions]);
|
|
18279
|
-
const getResponsiveYParams = () => responsiveYaxisLabel$1(
|
|
18280
|
-
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
|
|
18281
|
-
chartJSON.yMinLeft,
|
|
18282
|
-
innerHeight2,
|
|
18283
|
-
formatOptions,
|
|
18284
|
-
chartJSON,
|
|
18285
|
-
customYaxisMinValue,
|
|
18286
|
-
customYaxisMaxValue
|
|
18287
|
-
);
|
|
18288
18473
|
const createStackColumnChart = () => {
|
|
18289
18474
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
18290
18475
|
svgRef,
|
|
@@ -18408,7 +18593,7 @@ const StackColumnChart = ({
|
|
|
18408
18593
|
width,
|
|
18409
18594
|
legendMargin,
|
|
18410
18595
|
formatOptions,
|
|
18411
|
-
seriesData,
|
|
18596
|
+
[...seriesData].reverse(),
|
|
18412
18597
|
chartId,
|
|
18413
18598
|
staticLegendShape.rectangle
|
|
18414
18599
|
);
|
|
@@ -18471,10 +18656,6 @@ const StackColumnChart = ({
|
|
|
18471
18656
|
}
|
|
18472
18657
|
};
|
|
18473
18658
|
const initScale = () => {
|
|
18474
|
-
let responsiveParams = getResponsiveYParams();
|
|
18475
|
-
let yAxisLabelArray = responsiveParams.yAxisLabelArray;
|
|
18476
|
-
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
18477
|
-
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
18478
18659
|
{
|
|
18479
18660
|
yScaleLeft = linear$1().domain([
|
|
18480
18661
|
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
@@ -18509,7 +18690,9 @@ const StackColumnChart = ({
|
|
|
18509
18690
|
)
|
|
18510
18691
|
).tickSize(
|
|
18511
18692
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
18512
|
-
).tickValues(
|
|
18693
|
+
).tickValues(
|
|
18694
|
+
respParams.autoLabelFlag ? void 0 : respParams.yAxisLabelArray
|
|
18695
|
+
).ticks(respParams.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
18513
18696
|
}
|
|
18514
18697
|
};
|
|
18515
18698
|
const getXAxis = () => {
|
|
@@ -18608,6 +18791,7 @@ const StackColumnChart = ({
|
|
|
18608
18791
|
filteredData = fData;
|
|
18609
18792
|
filteredDimension = fDimension;
|
|
18610
18793
|
visibleBars = fVisibleBars;
|
|
18794
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
18611
18795
|
drawLineChart();
|
|
18612
18796
|
};
|
|
18613
18797
|
const drawLineChart = () => {
|
|
@@ -18657,6 +18841,20 @@ const StackColumnChart = ({
|
|
|
18657
18841
|
dataTableHeight,
|
|
18658
18842
|
isReportEditable
|
|
18659
18843
|
);
|
|
18844
|
+
addTotalValue(
|
|
18845
|
+
totalValueMap,
|
|
18846
|
+
xScale,
|
|
18847
|
+
yScaleLeft,
|
|
18848
|
+
margin,
|
|
18849
|
+
d3Annotation,
|
|
18850
|
+
[],
|
|
18851
|
+
formatOptions,
|
|
18852
|
+
chartType,
|
|
18853
|
+
height,
|
|
18854
|
+
width,
|
|
18855
|
+
svg,
|
|
18856
|
+
isReportEditable
|
|
18857
|
+
);
|
|
18660
18858
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
18661
18859
|
if (formatOptions.xAxisLabel.xAxisPosition != "1") {
|
|
18662
18860
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -18792,7 +18990,7 @@ const StackColumnChart = ({
|
|
|
18792
18990
|
gTag.selectAll("defs > #arrow").remove();
|
|
18793
18991
|
gTag.append("defs").append("marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerWidth", 10).attr("markerHeight", 7).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style(
|
|
18794
18992
|
"fill",
|
|
18795
|
-
connectorCfg.connectorMarkerColor !==
|
|
18993
|
+
connectorCfg.connectorMarkerColor !== commonColors.white ? connectorCfg.connectorMarkerColor : "none"
|
|
18796
18994
|
);
|
|
18797
18995
|
getConnectorPath(
|
|
18798
18996
|
pathLineData,
|
|
@@ -18833,7 +19031,7 @@ const StackColumnChart = ({
|
|
|
18833
19031
|
)} H ${xScale(nextBarHeight[i].Dimension) + xScale.bandwidth() / 2 - 10} V ${-10 + yScaleLeft(nextBarHeight[i].Total)}`
|
|
18834
19032
|
).style(
|
|
18835
19033
|
"stroke",
|
|
18836
|
-
formatOptions.connector.connectorLineColor !==
|
|
19034
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
18837
19035
|
).attr("stroke-width", formatOptions.connector.connectorLineThickness).style(
|
|
18838
19036
|
"visibility",
|
|
18839
19037
|
(d) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -18900,7 +19098,7 @@ const StackColumnChart = ({
|
|
|
18900
19098
|
);
|
|
18901
19099
|
}).style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
18902
19100
|
"fill",
|
|
18903
|
-
formatOptions.connector.connectorFontColor !==
|
|
19101
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
18904
19102
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
18905
19103
|
"text-decoration",
|
|
18906
19104
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -19128,7 +19326,7 @@ const NormalizedStackColumnChart = ({
|
|
|
19128
19326
|
width,
|
|
19129
19327
|
legendMargin,
|
|
19130
19328
|
formatOptions,
|
|
19131
|
-
seriesData,
|
|
19329
|
+
[...seriesData].reverse(),
|
|
19132
19330
|
chartId,
|
|
19133
19331
|
staticLegendShape.rectangle
|
|
19134
19332
|
);
|
|
@@ -19261,7 +19459,10 @@ const NormalizedStackColumnChart = ({
|
|
|
19261
19459
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
19262
19460
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
19263
19461
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
19264
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
19462
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
19463
|
+
"hoverId",
|
|
19464
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
19465
|
+
);
|
|
19265
19466
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
19266
19467
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
19267
19468
|
const getPropsForRect = (nodes, i) => {
|
|
@@ -19871,13 +20072,13 @@ function initYaxis(gTag, formatOptions, dataTableHeight, yLabel, yAxisLeft, inne
|
|
|
19871
20072
|
dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2
|
|
19872
20073
|
).attr("width", yLabel).attr(
|
|
19873
20074
|
"fill",
|
|
19874
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
20075
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
19875
20076
|
);
|
|
19876
20077
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
19877
20078
|
yAxisG.selectAll("line").style("shape-rendering", "crispEdges").attr("stroke", formatOptions.plotArea.gridLinesColor).attr("stroke-width", "0.05em").attr("stroke-opacity", formatOptions.plotArea.fitChart ? "1" : "0");
|
|
19878
20079
|
yAxisG.selectAll("text").style(
|
|
19879
20080
|
"fill",
|
|
19880
|
-
formatOptions.yAxisLabel.yAxisLabelColor !==
|
|
20081
|
+
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
19881
20082
|
).style("user-select", "none").style("font-size", formatOptions.yAxisLabel.yAxisLabelFontSize).style("font-family", formatOptions.yAxisLabel.yAxisLabelFontFamily).style("font-style", formatOptions.yAxisLabel.yAxisLabelFontStyle).style("font-style", fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "").style(
|
|
19882
20083
|
"text-decoration",
|
|
19883
20084
|
fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
@@ -19904,7 +20105,7 @@ function initXaxis(gTag, formatOptions, dataTableHeight, xLabel, xAxis, innerHei
|
|
|
19904
20105
|
`translate(1,${xaxisLabelPosition === "0" ? dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2 : xaxisLabelPosition === "1" ? -xLabel : yScale(0)})`
|
|
19905
20106
|
).attr("height", xLabel).attr("width", innerWidth2).attr(
|
|
19906
20107
|
"fill",
|
|
19907
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
20108
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
19908
20109
|
);
|
|
19909
20110
|
const XaxisG = gTag.append("g").attr(
|
|
19910
20111
|
"transform",
|
|
@@ -19949,7 +20150,7 @@ const setnumberOfBubbles = (svg, legendPosition, chartFormatOptions, height, wid
|
|
|
19949
20150
|
if (chartFormatOptions.plotArea.numberOfBubbles) {
|
|
19950
20151
|
let currentInnerHeight = legendPosition == "Bottom" ? height - 55 : height - 25;
|
|
19951
20152
|
let object2 = svg.append("foreignObject").attr("transform", `translate(${margins.left},${currentInnerHeight})`).attr("width", width).attr("height", "20px");
|
|
19952
|
-
object2.append("xhtml:div").style("white-space", "pre").style("color",
|
|
20153
|
+
object2.append("xhtml:div").style("white-space", "pre").style("color", commonColors.black).style("font-size", "12px ").style("text-overflow", "ellipsis").html((chartFormatOptions.plotArea.totalAlias ? chartFormatOptions.plotArea.totalAliasText : `Total count : `) + bubbleCount);
|
|
19953
20154
|
}
|
|
19954
20155
|
} catch (error) {
|
|
19955
20156
|
logError$1(fileName$a, "setnumberOfBubbles", error);
|
|
@@ -20213,7 +20414,9 @@ const ColumnHistogramChart = ({
|
|
|
20213
20414
|
);
|
|
20214
20415
|
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
20215
20416
|
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
20216
|
-
chartJSON.yMaxLeft = parseFloat(
|
|
20417
|
+
chartJSON.yMaxLeft = parseFloat(
|
|
20418
|
+
(yMin + "").length > (yMax + "").length ? yMin + "" : yMax + ""
|
|
20419
|
+
);
|
|
20217
20420
|
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
20218
20421
|
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
20219
20422
|
};
|
|
@@ -20278,7 +20481,10 @@ const ColumnHistogramChart = ({
|
|
|
20278
20481
|
bins.forEach((d) => d.forEach((j) => cumulativeLength.push(j.length)));
|
|
20279
20482
|
chartJSON.yMaxLeft = max$2(cumulativeLength);
|
|
20280
20483
|
chartJSON.yMinLeft = min$2(cumulativeLength);
|
|
20281
|
-
yScaleLeft = linear$1().range([innerHeight2, 0]).domain([
|
|
20484
|
+
yScaleLeft = linear$1().range([innerHeight2, 0]).domain([
|
|
20485
|
+
customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0,
|
|
20486
|
+
customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft
|
|
20487
|
+
]);
|
|
20282
20488
|
};
|
|
20283
20489
|
const initAxis = () => {
|
|
20284
20490
|
getXAxis();
|
|
@@ -20303,12 +20509,23 @@ const ColumnHistogramChart = ({
|
|
|
20303
20509
|
)
|
|
20304
20510
|
).tickSize(
|
|
20305
20511
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
20306
|
-
).tickValues(
|
|
20512
|
+
).tickValues(
|
|
20513
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
20514
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
20307
20515
|
}
|
|
20308
20516
|
};
|
|
20309
20517
|
const getXAxis = () => {
|
|
20310
20518
|
let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
|
|
20311
|
-
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
20519
|
+
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
20520
|
+
chartJSON.xMax,
|
|
20521
|
+
chartJSON.xMin,
|
|
20522
|
+
innerWidth2,
|
|
20523
|
+
formatOptions,
|
|
20524
|
+
customXaxisMinValue,
|
|
20525
|
+
customXaxisMaxValue,
|
|
20526
|
+
innerHeight2,
|
|
20527
|
+
false
|
|
20528
|
+
).xAxisLabelArray;
|
|
20312
20529
|
labelArray.shift();
|
|
20313
20530
|
xAxis = (xaxisLabelPosition == 1 ? axisTop(xScale) : axisBottom(xScale)).tickFormat(
|
|
20314
20531
|
(d) => getNumberWithFormat(
|
|
@@ -20324,7 +20541,10 @@ const ColumnHistogramChart = ({
|
|
|
20324
20541
|
formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
|
|
20325
20542
|
};
|
|
20326
20543
|
const getChartType = (lineData) => {
|
|
20327
|
-
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
20544
|
+
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
20545
|
+
"stroke",
|
|
20546
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
20547
|
+
).attr(
|
|
20328
20548
|
"stroke-width",
|
|
20329
20549
|
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness
|
|
20330
20550
|
).attr(
|
|
@@ -20336,7 +20556,7 @@ const ColumnHistogramChart = ({
|
|
|
20336
20556
|
return xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth) < 0 ? 0 : xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth);
|
|
20337
20557
|
}).attr("height", function(d) {
|
|
20338
20558
|
return innerHeight2 - yScaleLeft(d.length);
|
|
20339
|
-
}).style("fill", (d) => d.color !==
|
|
20559
|
+
}).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
20340
20560
|
showTooltipOnMouseMove(
|
|
20341
20561
|
[
|
|
20342
20562
|
{
|
|
@@ -20345,7 +20565,13 @@ const ColumnHistogramChart = ({
|
|
|
20345
20565
|
},
|
|
20346
20566
|
{
|
|
20347
20567
|
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
20348
|
-
value: getNumberWithFormat(
|
|
20568
|
+
value: getNumberWithFormat(
|
|
20569
|
+
formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length,
|
|
20570
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
20571
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
20572
|
+
formatOptions.toolTip.toolTipDecimalPrecision,
|
|
20573
|
+
false
|
|
20574
|
+
)
|
|
20349
20575
|
}
|
|
20350
20576
|
],
|
|
20351
20577
|
formatOptions,
|
|
@@ -20688,6 +20914,9 @@ const LineChart = ({
|
|
|
20688
20914
|
let yMinLeft = Infinity;
|
|
20689
20915
|
let yMaxRight = -Infinity;
|
|
20690
20916
|
let yMinRight = Infinity;
|
|
20917
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
20918
|
+
chartJSON.hideZeroValues = true;
|
|
20919
|
+
}
|
|
20691
20920
|
seriesData.forEach((series) => {
|
|
20692
20921
|
legendList.push(
|
|
20693
20922
|
series.properties.alias ? series.properties.alias : series.legend
|
|
@@ -20726,9 +20955,6 @@ const LineChart = ({
|
|
|
20726
20955
|
} else {
|
|
20727
20956
|
filteredDimension = chartJSON.dimensionList;
|
|
20728
20957
|
}
|
|
20729
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
20730
|
-
chartJSON.hideZeroValues = true;
|
|
20731
|
-
}
|
|
20732
20958
|
};
|
|
20733
20959
|
const initScale = () => {
|
|
20734
20960
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -20804,7 +21030,9 @@ const LineChart = ({
|
|
|
20804
21030
|
)
|
|
20805
21031
|
).tickSize(
|
|
20806
21032
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
20807
|
-
).tickValues(
|
|
21033
|
+
).tickValues(
|
|
21034
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
21035
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
20808
21036
|
}
|
|
20809
21037
|
if (isSecondaryAxisDrawn) {
|
|
20810
21038
|
let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
|
|
@@ -20820,7 +21048,9 @@ const LineChart = ({
|
|
|
20820
21048
|
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
20821
21049
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
20822
21050
|
)
|
|
20823
|
-
).tickValues(
|
|
21051
|
+
).tickValues(
|
|
21052
|
+
responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
|
|
21053
|
+
).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
|
|
20824
21054
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
20825
21055
|
).tickPadding(8).tickSizeOuter(0);
|
|
20826
21056
|
}
|
|
@@ -20841,8 +21071,10 @@ const LineChart = ({
|
|
|
20841
21071
|
const val = xScale(d.dimension);
|
|
20842
21072
|
return val != null ? val : 0;
|
|
20843
21073
|
}).y(
|
|
20844
|
-
(d) => d.axis ===
|
|
20845
|
-
).defined(
|
|
21074
|
+
(d) => d.axis === axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)
|
|
21075
|
+
).defined(
|
|
21076
|
+
(d) => d.hideZero || chartJSON.hideZeroValues ? Boolean(d.value) : true
|
|
21077
|
+
).curve(getCurveType(formatOptions));
|
|
20846
21078
|
let lines = gTag.selectAll(".parentGroup").data([lineData]);
|
|
20847
21079
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
20848
21080
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
@@ -20852,34 +21084,27 @@ const LineChart = ({
|
|
|
20852
21084
|
const g = select$2(this);
|
|
20853
21085
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
|
|
20854
21086
|
"stroke",
|
|
20855
|
-
(d2) => d2.properties.color !==
|
|
21087
|
+
(d2) => d2.properties.color !== commonColors.white ? d2.properties.color : "none"
|
|
20856
21088
|
).attr("stroke-dasharray", (d2) => {
|
|
21089
|
+
const lineWidth = parseInt(d2.properties.lineWidth);
|
|
20857
21090
|
switch (d2.properties.lineStyle) {
|
|
20858
21091
|
case staticLineStyle.dotted:
|
|
20859
|
-
return
|
|
21092
|
+
return `0,${lineWidth + 2}`;
|
|
20860
21093
|
case staticLineStyle.dashed:
|
|
20861
|
-
return
|
|
21094
|
+
return strokeDashValues;
|
|
20862
21095
|
default:
|
|
20863
21096
|
return "";
|
|
20864
21097
|
}
|
|
20865
21098
|
}).attr(
|
|
20866
21099
|
"stroke-linecap",
|
|
20867
|
-
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ?
|
|
21100
|
+
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
20868
21101
|
).attr(
|
|
20869
21102
|
"stroke-width",
|
|
20870
|
-
(d2) => d2.properties.lineStyle !== "None" ?
|
|
20871
|
-
).attr(
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
'[hoverId="' + getJQuerySelector(d2.properties.alias || d2.properties.name || "Legend").replace(/\s+/g, "-") + '"]'
|
|
20876
|
-
).classed("highlight", true).classed("unhighlight", false);
|
|
20877
|
-
}).on("mouseleave", function(event2, d2) {
|
|
20878
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
20879
|
-
svg.selectAll(
|
|
20880
|
-
'[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
|
|
20881
|
-
).classed("highlight", false).classed("unhighlight", false);
|
|
20882
|
-
});
|
|
21103
|
+
(d2) => d2.properties.lineStyle !== "None" ? d2.properties.lineWidth : 0
|
|
21104
|
+
).attr(
|
|
21105
|
+
"hoverId",
|
|
21106
|
+
(d.properties.alias || lineGroups.properties.name || "Legend").replace(/\s+/g, "-")
|
|
21107
|
+
).attr("d", (d2) => lineGenerator(d2.data));
|
|
20883
21108
|
});
|
|
20884
21109
|
lineGroups.exit().remove();
|
|
20885
21110
|
lineMarkers(
|
|
@@ -21006,12 +21231,10 @@ const StackLineChart = ({
|
|
|
21006
21231
|
const barWidth = 0;
|
|
21007
21232
|
const chartType = chartTypes.StackLineChart;
|
|
21008
21233
|
const svgRef = useRef();
|
|
21009
|
-
const seriesData = generalizedChartData(
|
|
21010
|
-
data.ChartData,
|
|
21011
|
-
data.DimensionList
|
|
21012
|
-
)?.reverse() || [];
|
|
21013
21234
|
const dimensionList = data.DimensionList;
|
|
21235
|
+
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
21014
21236
|
const barChart = false;
|
|
21237
|
+
const totalValueMap = /* @__PURE__ */ new Map();
|
|
21015
21238
|
const isSecondaryAxisDrawn = false;
|
|
21016
21239
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21017
21240
|
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
@@ -21200,7 +21423,7 @@ const StackLineChart = ({
|
|
|
21200
21423
|
width,
|
|
21201
21424
|
legendMargin,
|
|
21202
21425
|
formatOptions,
|
|
21203
|
-
seriesData,
|
|
21426
|
+
[...seriesData].reverse(),
|
|
21204
21427
|
chartId,
|
|
21205
21428
|
staticLegendShape.line
|
|
21206
21429
|
);
|
|
@@ -21218,10 +21441,27 @@ const StackLineChart = ({
|
|
|
21218
21441
|
false,
|
|
21219
21442
|
setAndUpdateChartData
|
|
21220
21443
|
);
|
|
21444
|
+
addTotalValue(
|
|
21445
|
+
totalValueMap,
|
|
21446
|
+
xScale,
|
|
21447
|
+
yScaleLeft,
|
|
21448
|
+
margin,
|
|
21449
|
+
d3Annotation,
|
|
21450
|
+
[],
|
|
21451
|
+
formatOptions,
|
|
21452
|
+
chartType,
|
|
21453
|
+
height,
|
|
21454
|
+
width,
|
|
21455
|
+
svg,
|
|
21456
|
+
isReportEditable
|
|
21457
|
+
);
|
|
21221
21458
|
};
|
|
21222
21459
|
const preProcessChartData = () => {
|
|
21223
21460
|
const allChartData = [];
|
|
21224
21461
|
const legendList = [];
|
|
21462
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
21463
|
+
chartJSON.hideZeroValues = true;
|
|
21464
|
+
}
|
|
21225
21465
|
seriesData.forEach((series, index2) => {
|
|
21226
21466
|
const prefixedLegend = `${index2}~$~${series.properties.alias ? series.properties.alias : series.legend}`;
|
|
21227
21467
|
series.properties.legend = prefixedLegend;
|
|
@@ -21270,9 +21510,6 @@ const StackLineChart = ({
|
|
|
21270
21510
|
chartJSON.dimensionList.forEach((d, i) => {
|
|
21271
21511
|
chartJSON.formattedDimensionListMap.set(d, formatedDimensionList[i]);
|
|
21272
21512
|
});
|
|
21273
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
21274
|
-
chartJSON.hideZeroValues = true;
|
|
21275
|
-
}
|
|
21276
21513
|
};
|
|
21277
21514
|
const initScale = () => {
|
|
21278
21515
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -21336,7 +21573,9 @@ const StackLineChart = ({
|
|
|
21336
21573
|
)
|
|
21337
21574
|
).tickSize(
|
|
21338
21575
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
21339
|
-
).tickValues(
|
|
21576
|
+
).tickValues(
|
|
21577
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
21578
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
21340
21579
|
}
|
|
21341
21580
|
};
|
|
21342
21581
|
const getXAxis = () => {
|
|
@@ -21353,7 +21592,10 @@ const StackLineChart = ({
|
|
|
21353
21592
|
});
|
|
21354
21593
|
const lineGenerator = line$1().x(
|
|
21355
21594
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
21356
|
-
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).
|
|
21595
|
+
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).defined((d) => {
|
|
21596
|
+
const a2 = d;
|
|
21597
|
+
return a2.hideZero || chartJSON.hideZeroValues ? a2.data[a2.key] : true;
|
|
21598
|
+
}).curve(getCurveType(formatOptions));
|
|
21357
21599
|
let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
21358
21600
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21359
21601
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
@@ -21361,24 +21603,38 @@ const StackLineChart = ({
|
|
|
21361
21603
|
lineGroupsEnter.append("path").attr("class", "line").attr("fill", "none");
|
|
21362
21604
|
lineGroupsEnter.merge(lineGroups).each(function(d, i) {
|
|
21363
21605
|
const g = select$2(this);
|
|
21364
|
-
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr(
|
|
21365
|
-
"
|
|
21366
|
-
seriesData[i]
|
|
21367
|
-
).attr(
|
|
21606
|
+
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr(
|
|
21607
|
+
"hoverId",
|
|
21608
|
+
(d2) => (seriesData[i]?.properties?.alias || seriesData[i]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
21609
|
+
).attr("d", lineGenerator(d)).attr("stroke", d.color !== commonColors.white ? d.color : "none").attr("stroke-dasharray", (d2) => {
|
|
21610
|
+
const lineWidth = parseInt(
|
|
21611
|
+
seriesData[i].properties.lineWidth.toString()
|
|
21612
|
+
);
|
|
21613
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
21614
|
+
case staticLineStyle.dotted:
|
|
21615
|
+
return `0,${lineWidth + 2}`;
|
|
21616
|
+
case staticLineStyle.dashed:
|
|
21617
|
+
return strokeDashValues;
|
|
21618
|
+
default:
|
|
21619
|
+
return "";
|
|
21620
|
+
}
|
|
21621
|
+
}).attr(
|
|
21368
21622
|
"stroke-linecap",
|
|
21369
|
-
seriesData[i].properties.lineStyle ===
|
|
21623
|
+
seriesData[i].properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
21370
21624
|
).attr(
|
|
21371
21625
|
"stroke-width",
|
|
21372
|
-
seriesData[i].properties.lineStyle !==
|
|
21626
|
+
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
21373
21627
|
).attr("fill", "none");
|
|
21374
21628
|
const totalLength = pathSel.node().getTotalLength();
|
|
21375
21629
|
{
|
|
21376
21630
|
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
21377
21631
|
}
|
|
21378
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke",
|
|
21632
|
+
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", commonColors.transparent).attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function() {
|
|
21379
21633
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
21380
21634
|
svg.selectAll(
|
|
21381
|
-
'[hoverId="' + getJQuerySelector(
|
|
21635
|
+
'[hoverId="' + getJQuerySelector(
|
|
21636
|
+
seriesData[i].properties.alias || seriesData[i].properties.name || "Legend"
|
|
21637
|
+
).replace(/\s+/g, "-") + '"]'
|
|
21382
21638
|
).classed("highlight", true).classed("unhighlight", false);
|
|
21383
21639
|
}).on("mouseleave", function() {
|
|
21384
21640
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
@@ -21509,7 +21765,11 @@ const StackLineChart = ({
|
|
|
21509
21765
|
(K2, j) => K2.forEach((d) => {
|
|
21510
21766
|
d["key"] = K2.key;
|
|
21511
21767
|
K2["color"] = JSON.parse(JSON.stringify(seriesData[j].properties.color));
|
|
21512
|
-
K2["individualAnnotationVisibility"] = JSON.parse(
|
|
21768
|
+
K2["individualAnnotationVisibility"] = JSON.parse(
|
|
21769
|
+
JSON.stringify(
|
|
21770
|
+
seriesData[j].properties.individualAnnotationVisibility
|
|
21771
|
+
)
|
|
21772
|
+
);
|
|
21513
21773
|
d.data.labelPosition = seriesData[j].properties.dataLabelPosition;
|
|
21514
21774
|
d.data["labelColor"] = seriesColor == "2" ? JSON.parse(JSON.stringify(seriesData[j].properties.color)) : seriesData[j].properties.labelColor;
|
|
21515
21775
|
d["hideZero"] = JSON.parse(
|
|
@@ -21522,6 +21782,7 @@ const StackLineChart = ({
|
|
|
21522
21782
|
filteredData = fData;
|
|
21523
21783
|
filteredDimension = fDimension;
|
|
21524
21784
|
visibleBars = fVisibleBars;
|
|
21785
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
21525
21786
|
drawLineChart();
|
|
21526
21787
|
};
|
|
21527
21788
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -21544,10 +21805,7 @@ const NormalisedStackLineChart = ({
|
|
|
21544
21805
|
const barWidth = 0;
|
|
21545
21806
|
const chartType = chartTypes.NormalizedStackLineChart;
|
|
21546
21807
|
const svgRef = useRef();
|
|
21547
|
-
const seriesData = generalizedChartData(
|
|
21548
|
-
data.ChartData,
|
|
21549
|
-
data.DimensionList
|
|
21550
|
-
)?.reverse() || [];
|
|
21808
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
21551
21809
|
const dimensionList = data.DimensionList;
|
|
21552
21810
|
const barChart = false;
|
|
21553
21811
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21730,7 +21988,7 @@ const NormalisedStackLineChart = ({
|
|
|
21730
21988
|
width,
|
|
21731
21989
|
legendMargin,
|
|
21732
21990
|
formatOptions,
|
|
21733
|
-
seriesData,
|
|
21991
|
+
[...seriesData].reverse(),
|
|
21734
21992
|
chartId,
|
|
21735
21993
|
staticLegendShape.line
|
|
21736
21994
|
);
|
|
@@ -21752,6 +22010,12 @@ const NormalisedStackLineChart = ({
|
|
|
21752
22010
|
const preProcessChartData = () => {
|
|
21753
22011
|
const allChartData = [];
|
|
21754
22012
|
const legendList = [];
|
|
22013
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
22014
|
+
chartJSON.hideZeroValues = true;
|
|
22015
|
+
seriesData.forEach((series) => {
|
|
22016
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
22017
|
+
});
|
|
22018
|
+
}
|
|
21755
22019
|
seriesData.forEach((series, index2) => {
|
|
21756
22020
|
const prefixedLegend = `${index2}~$~${series.properties.legend}`;
|
|
21757
22021
|
series.properties.legend = prefixedLegend;
|
|
@@ -21764,9 +22028,6 @@ const NormalisedStackLineChart = ({
|
|
|
21764
22028
|
chartJSON.legendList = legendList;
|
|
21765
22029
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
21766
22030
|
filteredDimension = chartJSON.dimensionList;
|
|
21767
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
21768
|
-
chartJSON.hideZeroValues = true;
|
|
21769
|
-
}
|
|
21770
22031
|
const tempStackLineData = getStackedData(
|
|
21771
22032
|
chartJSON.dimensionList,
|
|
21772
22033
|
seriesData,
|
|
@@ -21853,29 +22114,49 @@ const NormalisedStackLineChart = ({
|
|
|
21853
22114
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21854
22115
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
21855
22116
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
|
|
21856
|
-
lineGroupsEnter.attr(
|
|
22117
|
+
lineGroupsEnter.attr(
|
|
22118
|
+
"hoverId",
|
|
22119
|
+
(d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
22120
|
+
).append("path").attr("class", "line").attr("fill", "none");
|
|
21857
22121
|
lineGroupsEnter.merge(lineGroups).each(function(d, i) {
|
|
21858
22122
|
const g = select$2(this);
|
|
21859
|
-
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !==
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
22123
|
+
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !== commonColors.white ? d.color : "none").attr("stroke-dasharray", (d2) => {
|
|
22124
|
+
const lineWidth = parseInt(
|
|
22125
|
+
seriesData[i].properties.lineWidth.toString()
|
|
22126
|
+
);
|
|
22127
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
22128
|
+
case staticLineStyle.dotted:
|
|
22129
|
+
return `0,${lineWidth + 2}`;
|
|
22130
|
+
case staticLineStyle.dashed:
|
|
22131
|
+
return strokeDashValues;
|
|
22132
|
+
default:
|
|
22133
|
+
return "";
|
|
22134
|
+
}
|
|
22135
|
+
}).attr(
|
|
21863
22136
|
"stroke-linecap",
|
|
21864
|
-
seriesData[i].properties.lineStyle ===
|
|
22137
|
+
seriesData[i].properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
21865
22138
|
).attr(
|
|
21866
22139
|
"stroke-width",
|
|
21867
|
-
seriesData[i].properties.lineStyle !==
|
|
22140
|
+
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
21868
22141
|
).attr("fill", "none");
|
|
21869
22142
|
const totalLength = pathSel.node().getTotalLength();
|
|
21870
22143
|
{
|
|
21871
22144
|
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
21872
22145
|
}
|
|
21873
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke",
|
|
22146
|
+
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke", commonColors.transparent).attr("stroke-width", 20).attr("fill", "none").style("pointer-events", "stroke").on("mouseenter", function(event2, d2) {
|
|
21874
22147
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
21875
|
-
svg.selectAll(
|
|
22148
|
+
svg.selectAll(
|
|
22149
|
+
'[hoverId="' + getJQuerySelector(
|
|
22150
|
+
lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend"
|
|
22151
|
+
).replace(/\s+/g, "-") + '"]'
|
|
22152
|
+
).classed("highlight", true).classed("unhighlight", false);
|
|
21876
22153
|
}).on("mouseleave", function(event2, d2) {
|
|
21877
22154
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
21878
|
-
svg.selectAll(
|
|
22155
|
+
svg.selectAll(
|
|
22156
|
+
'[hoverId="' + getJQuerySelector(
|
|
22157
|
+
lineData[d2.index]?.properties?.alias || d2[d2.index]?.properties?.name || "Legend"
|
|
22158
|
+
).replace(/\s+/g, "-") + '"]'
|
|
22159
|
+
).classed("highlight", false).classed("unhighlight", false);
|
|
21879
22160
|
});
|
|
21880
22161
|
});
|
|
21881
22162
|
lineGroups.exit().remove();
|
|
@@ -22065,6 +22346,7 @@ const HorizontalBarChart = ({
|
|
|
22065
22346
|
let secondaryYLabel;
|
|
22066
22347
|
let maxNumberForPrimaryAxis;
|
|
22067
22348
|
let maxNumberForSecondaryAxis;
|
|
22349
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
22068
22350
|
let innerWidth2;
|
|
22069
22351
|
let innerHeight2;
|
|
22070
22352
|
let width;
|
|
@@ -22333,7 +22615,8 @@ const HorizontalBarChart = ({
|
|
|
22333
22615
|
formatOptions,
|
|
22334
22616
|
chartJSON,
|
|
22335
22617
|
customYaxisMinValue,
|
|
22336
|
-
customYaxisMaxValue
|
|
22618
|
+
customYaxisMaxValue,
|
|
22619
|
+
barChart
|
|
22337
22620
|
);
|
|
22338
22621
|
xAxisBottom = axisBottom(xScaleBottom).tickFormat(
|
|
22339
22622
|
(d) => getNumberWithFormat(
|
|
@@ -22344,7 +22627,9 @@ const HorizontalBarChart = ({
|
|
|
22344
22627
|
)
|
|
22345
22628
|
).tickSize(
|
|
22346
22629
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
|
|
22347
|
-
).tickValues(
|
|
22630
|
+
).tickValues(
|
|
22631
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
22632
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
22348
22633
|
}
|
|
22349
22634
|
if (isSecondaryAxisDrawn) {
|
|
22350
22635
|
let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
|
|
@@ -22360,7 +22645,9 @@ const HorizontalBarChart = ({
|
|
|
22360
22645
|
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
22361
22646
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
22362
22647
|
)
|
|
22363
|
-
).tickValues(
|
|
22648
|
+
).tickValues(
|
|
22649
|
+
responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
|
|
22650
|
+
).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
|
|
22364
22651
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
22365
22652
|
).tickPadding(8).tickSizeOuter(0);
|
|
22366
22653
|
}
|
|
@@ -22384,13 +22671,31 @@ const HorizontalBarChart = ({
|
|
|
22384
22671
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
22385
22672
|
column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
|
|
22386
22673
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
22387
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
22388
|
-
|
|
22389
|
-
|
|
22674
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
22675
|
+
"hoverId",
|
|
22676
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
22677
|
+
/\s+/g,
|
|
22678
|
+
"-"
|
|
22679
|
+
)
|
|
22680
|
+
).attr(
|
|
22681
|
+
"transform",
|
|
22682
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22683
|
+
);
|
|
22684
|
+
columnGroups.attr(
|
|
22685
|
+
"transform",
|
|
22686
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22687
|
+
);
|
|
22688
|
+
columnGroupsEnter.merge(columnGroups).attr(
|
|
22689
|
+
"transform",
|
|
22690
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22691
|
+
);
|
|
22390
22692
|
const bars = columnGroupsEnter.append("rect").attr("y", (d) => yScaleLegends(d.legend)).attr("height", yScaleLegends.bandwidth()).attr("x", (d) => {
|
|
22391
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22693
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22392
22694
|
return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(0);
|
|
22393
|
-
}).attr("width", 0).attr("fill", data2.properties.color).attr(
|
|
22695
|
+
}).attr("width", 0).attr("fill", data2.properties.color).attr(
|
|
22696
|
+
"stroke-dasharray",
|
|
22697
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
22698
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
22394
22699
|
"stroke",
|
|
22395
22700
|
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
22396
22701
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
@@ -22399,11 +22704,11 @@ const HorizontalBarChart = ({
|
|
|
22399
22704
|
);
|
|
22400
22705
|
const finalBars = bars;
|
|
22401
22706
|
finalBars.attr("x", (d) => {
|
|
22402
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22707
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22403
22708
|
return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(d.value);
|
|
22404
22709
|
}).attr("width", (d) => {
|
|
22405
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22406
|
-
const maxValue = data2.properties.axis ===
|
|
22710
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22711
|
+
const maxValue = data2.properties.axis === axisTypes.primary ? customYaxisMaxValue : secondaryCustomYaxisMaxValue;
|
|
22407
22712
|
if (d.value >= 0) {
|
|
22408
22713
|
return maxValue && d.value > maxValue ? xScaleUsed(maxValue) - xScaleUsed(0) : xScaleUsed(d.value) - xScaleUsed(0);
|
|
22409
22714
|
} else {
|
|
@@ -22426,7 +22731,11 @@ const HorizontalBarChart = ({
|
|
|
22426
22731
|
{
|
|
22427
22732
|
key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
|
|
22428
22733
|
value: getNumberWithFormat(
|
|
22429
|
-
[
|
|
22734
|
+
[
|
|
22735
|
+
chartTypes.NormalizedStackLineChart,
|
|
22736
|
+
chartTypes.NormalizedStackAreaChart,
|
|
22737
|
+
""
|
|
22738
|
+
].includes(chartType) ? d[1] - d[0] : d.value,
|
|
22430
22739
|
formatOptions.toolTip.toolTipDisplayUnits,
|
|
22431
22740
|
formatOptions.toolTip.toolTipNumberFormat,
|
|
22432
22741
|
formatOptions.toolTip.toolTipDecimalPrecision
|
|
@@ -22460,6 +22769,7 @@ const HorizontalBarChart = ({
|
|
|
22460
22769
|
filteredData = fData;
|
|
22461
22770
|
filteredDimension = fDimension;
|
|
22462
22771
|
visibleBars = fVisibleBars;
|
|
22772
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
22463
22773
|
drawColumnChart();
|
|
22464
22774
|
};
|
|
22465
22775
|
const drawColumnChart = () => {
|
|
@@ -22578,6 +22888,7 @@ const StackHorizontalChart = ({
|
|
|
22578
22888
|
let scrollbarVisible = false;
|
|
22579
22889
|
let stackChartData = [];
|
|
22580
22890
|
const isNormalizedChart = false;
|
|
22891
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
22581
22892
|
let chartJSON = {
|
|
22582
22893
|
dimensionList,
|
|
22583
22894
|
chartType,
|
|
@@ -22701,7 +23012,7 @@ const StackHorizontalChart = ({
|
|
|
22701
23012
|
width,
|
|
22702
23013
|
legendMargin,
|
|
22703
23014
|
formatOptions,
|
|
22704
|
-
seriesData,
|
|
23015
|
+
[...seriesData].reverse(),
|
|
22705
23016
|
chartId,
|
|
22706
23017
|
staticLegendShape.rectangle
|
|
22707
23018
|
);
|
|
@@ -22823,7 +23134,9 @@ const StackHorizontalChart = ({
|
|
|
22823
23134
|
)
|
|
22824
23135
|
).tickSize(
|
|
22825
23136
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
|
|
22826
|
-
).tickValues(
|
|
23137
|
+
).tickValues(
|
|
23138
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
23139
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
22827
23140
|
}
|
|
22828
23141
|
};
|
|
22829
23142
|
const getYAxis = () => {
|
|
@@ -22844,14 +23157,22 @@ const StackHorizontalChart = ({
|
|
|
22844
23157
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
22845
23158
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
22846
23159
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
22847
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23160
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23161
|
+
"hoverId",
|
|
23162
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
23163
|
+
);
|
|
22848
23164
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
22849
23165
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
22850
23166
|
const getPropsForRect = (nodes, i) => {
|
|
22851
|
-
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23167
|
+
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23168
|
+
nodes[i].parentNode
|
|
23169
|
+
);
|
|
22852
23170
|
return { props: seriesData[groupIndex]?.properties, groupIndex };
|
|
22853
23171
|
};
|
|
22854
|
-
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - columnWidth / 2).attr("height", columnWidth).attr(
|
|
23172
|
+
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - columnWidth / 2).attr("height", columnWidth).attr(
|
|
23173
|
+
"fill",
|
|
23174
|
+
(d, i, nodes) => getPropsForRect(nodes, i).props?.color || "gray"
|
|
23175
|
+
).attr("stroke", (d, i, nodes) => {
|
|
22855
23176
|
const props = getPropsForRect(nodes, i).props;
|
|
22856
23177
|
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
22857
23178
|
}).attr(
|
|
@@ -22915,6 +23236,7 @@ const StackHorizontalChart = ({
|
|
|
22915
23236
|
filteredData = fData;
|
|
22916
23237
|
filteredDimension = fDimension;
|
|
22917
23238
|
visibleBars = fVisibleBars;
|
|
23239
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
22918
23240
|
createStackLineData();
|
|
22919
23241
|
drawLineChart();
|
|
22920
23242
|
};
|
|
@@ -22966,6 +23288,21 @@ const StackHorizontalChart = ({
|
|
|
22966
23288
|
isReportEditable,
|
|
22967
23289
|
barChart
|
|
22968
23290
|
);
|
|
23291
|
+
addTotalValue(
|
|
23292
|
+
totalValueMap,
|
|
23293
|
+
yScale,
|
|
23294
|
+
xScaleBottom,
|
|
23295
|
+
margin,
|
|
23296
|
+
d3Annotation,
|
|
23297
|
+
[],
|
|
23298
|
+
formatOptions,
|
|
23299
|
+
chartType,
|
|
23300
|
+
height,
|
|
23301
|
+
width,
|
|
23302
|
+
svg,
|
|
23303
|
+
isReportEditable,
|
|
23304
|
+
barChart
|
|
23305
|
+
);
|
|
22969
23306
|
getConnectors();
|
|
22970
23307
|
gTag.selectAll(".connectors").raise();
|
|
22971
23308
|
};
|
|
@@ -23080,7 +23417,7 @@ const StackHorizontalChart = ({
|
|
|
23080
23417
|
}
|
|
23081
23418
|
gTag.append("defs").append("marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerWidth", 10).attr("markerHeight", 7).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style(
|
|
23082
23419
|
"fill",
|
|
23083
|
-
formatOptions.connector.connectorMarkerColor !==
|
|
23420
|
+
formatOptions.connector.connectorMarkerColor !== commonColors.white ? formatOptions.connector.connectorMarkerColor : "none"
|
|
23084
23421
|
);
|
|
23085
23422
|
getConnectorPath(
|
|
23086
23423
|
pathLineData,
|
|
@@ -23132,7 +23469,7 @@ const StackHorizontalChart = ({
|
|
|
23132
23469
|
}
|
|
23133
23470
|
}).style(
|
|
23134
23471
|
"stroke",
|
|
23135
|
-
formatOptions.connector.connectorLineColor !==
|
|
23472
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
23136
23473
|
).attr("stroke-width", formatOptions.connector.connectorLineThickness).style(
|
|
23137
23474
|
"visibility",
|
|
23138
23475
|
(d, i) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.yAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -23191,7 +23528,7 @@ const StackHorizontalChart = ({
|
|
|
23191
23528
|
);
|
|
23192
23529
|
}).style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
23193
23530
|
"fill",
|
|
23194
|
-
formatOptions.connector.connectorFontColor !==
|
|
23531
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
23195
23532
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
23196
23533
|
"text-decoration",
|
|
23197
23534
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -23223,7 +23560,10 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23223
23560
|
let columnWidth = 0;
|
|
23224
23561
|
const chartType = chartTypes.NormalizedStackHorizontalBarChart;
|
|
23225
23562
|
const svgRef = useRef();
|
|
23226
|
-
const seriesData = generalizedChartData(
|
|
23563
|
+
const seriesData = generalizedChartData(
|
|
23564
|
+
data.ChartData,
|
|
23565
|
+
data.DimensionList
|
|
23566
|
+
)?.reverse();
|
|
23227
23567
|
const dimensionList = data.DimensionList;
|
|
23228
23568
|
const barChart = true;
|
|
23229
23569
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23388,7 +23728,7 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23388
23728
|
width,
|
|
23389
23729
|
legendMargin,
|
|
23390
23730
|
formatOptions,
|
|
23391
|
-
seriesData,
|
|
23731
|
+
[...seriesData].reverse(),
|
|
23392
23732
|
chartId,
|
|
23393
23733
|
staticLegendShape.rectangle
|
|
23394
23734
|
);
|
|
@@ -23518,20 +23858,31 @@ const NormalizedStackHorizontalBarChart = ({
|
|
|
23518
23858
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
23519
23859
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
23520
23860
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
23521
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23861
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23862
|
+
"hoverId",
|
|
23863
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
23864
|
+
);
|
|
23522
23865
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
23523
23866
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
23524
23867
|
const getPropsForRect = (nodes, i) => {
|
|
23525
|
-
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23868
|
+
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23869
|
+
nodes[i].parentNode
|
|
23870
|
+
);
|
|
23526
23871
|
return { props: seriesData[groupIndex]?.properties, groupIndex };
|
|
23527
23872
|
};
|
|
23528
|
-
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr(
|
|
23873
|
+
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr(
|
|
23874
|
+
"fill",
|
|
23875
|
+
(d, i, nodes) => getPropsForRect(nodes, i).props?.color || "gray"
|
|
23876
|
+
).attr("stroke", (d, i, nodes) => {
|
|
23529
23877
|
const props = getPropsForRect(nodes, i).props;
|
|
23530
23878
|
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
23531
23879
|
}).attr(
|
|
23532
23880
|
"stroke-dasharray",
|
|
23533
23881
|
(d, i, nodes) => getPropsForRect(nodes, i).props?.stackBorderStyle === 2 ? "5,3" : "0"
|
|
23534
|
-
).attr(
|
|
23882
|
+
).attr(
|
|
23883
|
+
"stroke-width",
|
|
23884
|
+
(d, i, nodes) => (getPropsForRect(nodes, i).props?.stackBorderWidth || 0) + "px"
|
|
23885
|
+
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("x", (d) => xScaleBottom(0)).attr("width", 0).attr("visibility", (d, i, nodes) => {
|
|
23535
23886
|
const props = getPropsForRect(nodes, i).props;
|
|
23536
23887
|
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
23537
23888
|
}).on("mousemove", (event2, d) => {
|
|
@@ -23970,7 +24321,9 @@ const LayeredHorizontalBarChart = ({
|
|
|
23970
24321
|
)
|
|
23971
24322
|
).tickSize(
|
|
23972
24323
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 : 0 : 0
|
|
23973
|
-
).tickValues(
|
|
24324
|
+
).tickValues(
|
|
24325
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
24326
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
23974
24327
|
}
|
|
23975
24328
|
};
|
|
23976
24329
|
const getYAxis = () => {
|
|
@@ -23989,7 +24342,13 @@ const LayeredHorizontalBarChart = ({
|
|
|
23989
24342
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
23990
24343
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
23991
24344
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
23992
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
24345
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
24346
|
+
"hoverId",
|
|
24347
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
24348
|
+
/\s+/g,
|
|
24349
|
+
"-"
|
|
24350
|
+
)
|
|
24351
|
+
).attr(
|
|
23993
24352
|
"transform",
|
|
23994
24353
|
(d) => index2 === 0 ? `translate(0,${yScale(d.dimension) - columnWidth / 2})` : `translate(0,${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
|
|
23995
24354
|
);
|
|
@@ -24232,7 +24591,7 @@ const LayeredHorizontalBarChart = ({
|
|
|
24232
24591
|
}
|
|
24233
24592
|
gTag.append("defs").append("marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerWidth", 10).attr("markerHeight", 7).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style(
|
|
24234
24593
|
"fill",
|
|
24235
|
-
formatOptions.connector.connectorMarkerColor !==
|
|
24594
|
+
formatOptions.connector.connectorMarkerColor !== commonColors.white ? formatOptions.connector.connectorMarkerColor : "none"
|
|
24236
24595
|
);
|
|
24237
24596
|
getConnectorPath(
|
|
24238
24597
|
pathLineData,
|
|
@@ -24278,7 +24637,7 @@ const LayeredHorizontalBarChart = ({
|
|
|
24278
24637
|
`
|
|
24279
24638
|
).style(
|
|
24280
24639
|
"stroke",
|
|
24281
|
-
formatOptions.connector.connectorLineColor !==
|
|
24640
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
24282
24641
|
).attr("fill", "none").attr("stroke-width", formatOptions.connector.connectorLineThickness).attr("marker-end", "url(#arrow)").style(
|
|
24283
24642
|
"visibility",
|
|
24284
24643
|
(d) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.yAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -24330,7 +24689,7 @@ const LayeredHorizontalBarChart = ({
|
|
|
24330
24689
|
);
|
|
24331
24690
|
}).attr("text-anchor", "start").style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
24332
24691
|
"fill",
|
|
24333
|
-
formatOptions.connector.connectorFontColor !==
|
|
24692
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
24334
24693
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
24335
24694
|
"text-decoration",
|
|
24336
24695
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -24481,7 +24840,14 @@ const HorizontalHistogramChart = ({
|
|
|
24481
24840
|
));
|
|
24482
24841
|
initSvg$1(svg, width, height, formatOptions);
|
|
24483
24842
|
gTag = initChartArea$1(svg, margin);
|
|
24484
|
-
initPlotArea(
|
|
24843
|
+
initPlotArea(
|
|
24844
|
+
gTag,
|
|
24845
|
+
formatOptions,
|
|
24846
|
+
dataTableHeight,
|
|
24847
|
+
innerWidth2,
|
|
24848
|
+
innerHeight2,
|
|
24849
|
+
chartType
|
|
24850
|
+
);
|
|
24485
24851
|
binsCalculation();
|
|
24486
24852
|
initScale();
|
|
24487
24853
|
initAxis();
|
|
@@ -24610,7 +24976,9 @@ const HorizontalHistogramChart = ({
|
|
|
24610
24976
|
);
|
|
24611
24977
|
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
24612
24978
|
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
24613
|
-
chartJSON.yMaxLeft = parseFloat(
|
|
24979
|
+
chartJSON.yMaxLeft = parseFloat(
|
|
24980
|
+
(yMin + "").length > (yMax + "").length ? yMin + "" : yMax + ""
|
|
24981
|
+
);
|
|
24614
24982
|
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
24615
24983
|
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
24616
24984
|
};
|
|
@@ -24627,7 +24995,9 @@ const HorizontalHistogramChart = ({
|
|
|
24627
24995
|
}
|
|
24628
24996
|
};
|
|
24629
24997
|
const calculatingPeriodsWithBins = (isWithWidth) => {
|
|
24630
|
-
filteredData.forEach(
|
|
24998
|
+
filteredData.forEach(
|
|
24999
|
+
(d) => d.data.sort((a2, b) => a2.value - b.value)
|
|
25000
|
+
);
|
|
24631
25001
|
let range2 = chartJSON.xMax - chartJSON.xMin;
|
|
24632
25002
|
let tempPeriod;
|
|
24633
25003
|
if (isWithWidth) {
|
|
@@ -24699,11 +25069,22 @@ const HorizontalHistogramChart = ({
|
|
|
24699
25069
|
)
|
|
24700
25070
|
).tickSize(
|
|
24701
25071
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + 0 : 0 : 0
|
|
24702
|
-
).tickValues(
|
|
25072
|
+
).tickValues(
|
|
25073
|
+
responsiveLabelsObj.autoLabelFlag ? void 0 : responsiveLabelsObj.yAxisLabelArray
|
|
25074
|
+
).ticks(responsiveLabelsObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
24703
25075
|
}
|
|
24704
25076
|
};
|
|
24705
25077
|
const getYAxis = () => {
|
|
24706
|
-
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
25078
|
+
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
25079
|
+
chartJSON.xMax,
|
|
25080
|
+
chartJSON.xMin,
|
|
25081
|
+
innerHeight2,
|
|
25082
|
+
formatOptions,
|
|
25083
|
+
customXaxisMinValue,
|
|
25084
|
+
customXaxisMaxValue,
|
|
25085
|
+
innerWidth2,
|
|
25086
|
+
false
|
|
25087
|
+
).xAxisLabelArray;
|
|
24707
25088
|
labelArray.shift();
|
|
24708
25089
|
yAxisLeft = axisLeft(yScaleLeft).tickFormat(
|
|
24709
25090
|
(d) => getNumberWithFormat(
|
|
@@ -24719,7 +25100,16 @@ const HorizontalHistogramChart = ({
|
|
|
24719
25100
|
formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
|
|
24720
25101
|
};
|
|
24721
25102
|
const getChartType = (lineData) => {
|
|
24722
|
-
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
25103
|
+
gTag.append("g").attr("class", "parentGroup").selectAll("#scaling-svg" + chartId + " .rect").data(bins).enter().append("g").selectAll("rect").data((d) => d).enter().append("rect").attr("class", "rect").attr(
|
|
25104
|
+
"stroke",
|
|
25105
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
25106
|
+
).attr(
|
|
25107
|
+
"stroke-width",
|
|
25108
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness
|
|
25109
|
+
).attr(
|
|
25110
|
+
"stroke-opacity",
|
|
25111
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity
|
|
25112
|
+
).attr("x", 0).attr("y", (d) => {
|
|
24723
25113
|
const y02 = yScaleLeft(d.x0);
|
|
24724
25114
|
const y12 = yScaleLeft(d.x1);
|
|
24725
25115
|
return Math.min(y02, y12);
|
|
@@ -24728,7 +25118,7 @@ const HorizontalHistogramChart = ({
|
|
|
24728
25118
|
const y12 = yScaleLeft(d.x1);
|
|
24729
25119
|
const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
|
|
24730
25120
|
return Math.max(1, Math.abs(y12 - y02) - gap);
|
|
24731
|
-
}).attr("width", (d) => xScale(d.length)).style("fill", (d) => d.color !==
|
|
25121
|
+
}).attr("width", (d) => xScale(d.length)).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
24732
25122
|
showTooltipOnMouseMove(
|
|
24733
25123
|
[
|
|
24734
25124
|
{
|
|
@@ -24737,7 +25127,13 @@ const HorizontalHistogramChart = ({
|
|
|
24737
25127
|
},
|
|
24738
25128
|
{
|
|
24739
25129
|
key: formatOptions.xAxisTitle.xAxisTitleText,
|
|
24740
|
-
value: getNumberWithFormat(
|
|
25130
|
+
value: getNumberWithFormat(
|
|
25131
|
+
formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length,
|
|
25132
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
25133
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
25134
|
+
formatOptions.toolTip.toolTipDecimalPrecision,
|
|
25135
|
+
false
|
|
25136
|
+
)
|
|
24741
25137
|
}
|
|
24742
25138
|
],
|
|
24743
25139
|
formatOptions,
|
|
@@ -24810,7 +25206,14 @@ const HorizontalHistogramChart = ({
|
|
|
24810
25206
|
drawColumnChart();
|
|
24811
25207
|
};
|
|
24812
25208
|
const drawColumnChart = () => {
|
|
24813
|
-
initYaxis$1(
|
|
25209
|
+
initYaxis$1(
|
|
25210
|
+
gTag,
|
|
25211
|
+
formatOptions,
|
|
25212
|
+
dataTableHeight,
|
|
25213
|
+
yLabel,
|
|
25214
|
+
yAxisLeft,
|
|
25215
|
+
innerHeight2
|
|
25216
|
+
);
|
|
24814
25217
|
getChartType();
|
|
24815
25218
|
};
|
|
24816
25219
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -25052,6 +25455,12 @@ const AreaChart = ({
|
|
|
25052
25455
|
let yMinLeft = Infinity;
|
|
25053
25456
|
let yMaxRight = -Infinity;
|
|
25054
25457
|
let yMinRight = Infinity;
|
|
25458
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
25459
|
+
chartJSON.hideZeroValues = true;
|
|
25460
|
+
seriesData.forEach((series) => {
|
|
25461
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
25462
|
+
});
|
|
25463
|
+
}
|
|
25055
25464
|
seriesData.forEach((series) => {
|
|
25056
25465
|
legendList.push(
|
|
25057
25466
|
series.properties.alias ? series.properties.alias : series.legend
|
|
@@ -25086,9 +25495,6 @@ const AreaChart = ({
|
|
|
25086
25495
|
} else {
|
|
25087
25496
|
filteredDimension = chartJSON.dimensionList;
|
|
25088
25497
|
}
|
|
25089
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
25090
|
-
chartJSON.hideZeroValues = true;
|
|
25091
|
-
}
|
|
25092
25498
|
};
|
|
25093
25499
|
const initScale = () => {
|
|
25094
25500
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -25152,7 +25558,9 @@ const AreaChart = ({
|
|
|
25152
25558
|
)
|
|
25153
25559
|
).tickSize(
|
|
25154
25560
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
25155
|
-
).tickValues(
|
|
25561
|
+
).tickValues(
|
|
25562
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
25563
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
25156
25564
|
}
|
|
25157
25565
|
};
|
|
25158
25566
|
const getXAxis = () => {
|
|
@@ -25180,8 +25588,14 @@ const AreaChart = ({
|
|
|
25180
25588
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
|
|
25181
25589
|
areaGroupsEnter.append("path").attr("class", "area parentGroup").attr(
|
|
25182
25590
|
"fill",
|
|
25183
|
-
(d) => d.properties.color !==
|
|
25184
|
-
).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr(
|
|
25591
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
25592
|
+
).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr(
|
|
25593
|
+
"hoverId",
|
|
25594
|
+
(d) => (d.properties?.alias || d.properties?.name || "Legend").replace(
|
|
25595
|
+
/\s+/g,
|
|
25596
|
+
"-"
|
|
25597
|
+
)
|
|
25598
|
+
).attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
|
|
25185
25599
|
{
|
|
25186
25600
|
select$2(this).attr("d", areaGenerator(d.data));
|
|
25187
25601
|
}
|
|
@@ -25190,27 +25604,30 @@ const AreaChart = ({
|
|
|
25190
25604
|
const g = select$2(this);
|
|
25191
25605
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2.data)).attr(
|
|
25192
25606
|
"stroke",
|
|
25193
|
-
(d2) => d2.properties.areaBorderColor !==
|
|
25607
|
+
(d2) => d2.properties.areaBorderColor !== commonColors.white ? d2.properties.areaBorderColor : "none"
|
|
25194
25608
|
).attr("stroke-dasharray", (d2) => {
|
|
25609
|
+
const lineWidth = parseInt(d2.properties.lineWidth);
|
|
25195
25610
|
switch (d2.properties.lineStyle) {
|
|
25196
|
-
case
|
|
25197
|
-
return
|
|
25198
|
-
case
|
|
25199
|
-
return
|
|
25611
|
+
case staticLineStyle.dotted:
|
|
25612
|
+
return `0,${lineWidth + 2}`;
|
|
25613
|
+
case staticLineStyle.dashed:
|
|
25614
|
+
return strokeDashValues;
|
|
25200
25615
|
default:
|
|
25201
25616
|
return "";
|
|
25202
25617
|
}
|
|
25203
25618
|
}).attr(
|
|
25204
25619
|
"stroke-linecap",
|
|
25205
|
-
(d2) => d2.properties.lineStyle ===
|
|
25620
|
+
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
|
|
25206
25621
|
).attr(
|
|
25207
25622
|
"stroke-width",
|
|
25208
|
-
(d2) => d2.properties.lineStyle !==
|
|
25623
|
+
(d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25209
25624
|
).attr("fill", "none");
|
|
25210
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill",
|
|
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().on("mouseenter", function(event2, d2) {
|
|
25211
25626
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
|
|
25212
25627
|
svg.selectAll(
|
|
25213
|
-
'[hoverId="' + getJQuerySelector(
|
|
25628
|
+
'[hoverId="' + getJQuerySelector(
|
|
25629
|
+
d2.properties?.alias || d2.properties?.name || "Legend"
|
|
25630
|
+
).replace(/\s+/g, "-") + '"]'
|
|
25214
25631
|
).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
|
|
25215
25632
|
}).on("mouseleave", function(event2, d2) {
|
|
25216
25633
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
|
|
@@ -25358,10 +25775,7 @@ const StackAreaChart = ({
|
|
|
25358
25775
|
const barWidth = 0;
|
|
25359
25776
|
const chartType = chartTypes.StackAreaChart;
|
|
25360
25777
|
const svgRef = useRef();
|
|
25361
|
-
const seriesData = generalizedChartData(
|
|
25362
|
-
data.ChartData,
|
|
25363
|
-
data.DimensionList
|
|
25364
|
-
)?.reverse() || [];
|
|
25778
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
25365
25779
|
const dimensionList = data.DimensionList;
|
|
25366
25780
|
const barChart = false;
|
|
25367
25781
|
const isSecondaryAxisDrawn = false;
|
|
@@ -25385,6 +25799,7 @@ const StackAreaChart = ({
|
|
|
25385
25799
|
let secondaryYLabel;
|
|
25386
25800
|
let maxNumberForPrimaryAxis;
|
|
25387
25801
|
let maxNumberForSecondaryAxis;
|
|
25802
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
25388
25803
|
let innerWidth2;
|
|
25389
25804
|
let innerHeight2;
|
|
25390
25805
|
let width;
|
|
@@ -25552,7 +25967,7 @@ const StackAreaChart = ({
|
|
|
25552
25967
|
width,
|
|
25553
25968
|
legendMargin,
|
|
25554
25969
|
formatOptions,
|
|
25555
|
-
seriesData,
|
|
25970
|
+
[...seriesData].reverse(),
|
|
25556
25971
|
chartId,
|
|
25557
25972
|
staticLegendShape.areaWithLine
|
|
25558
25973
|
);
|
|
@@ -25575,6 +25990,12 @@ const StackAreaChart = ({
|
|
|
25575
25990
|
const preProcessChartData = () => {
|
|
25576
25991
|
const allChartData = [];
|
|
25577
25992
|
const legendList = [];
|
|
25993
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
25994
|
+
chartJSON.hideZeroValues = true;
|
|
25995
|
+
seriesData.forEach((series) => {
|
|
25996
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
25997
|
+
});
|
|
25998
|
+
}
|
|
25578
25999
|
seriesData.forEach((series, index2) => {
|
|
25579
26000
|
const prefixedLegend = `${index2}~$~${series.properties.alias}`;
|
|
25580
26001
|
series.properties.legend = prefixedLegend;
|
|
@@ -25623,9 +26044,6 @@ const StackAreaChart = ({
|
|
|
25623
26044
|
chartJSON.dimensionList.forEach((d, i) => {
|
|
25624
26045
|
chartJSON.formattedDimensionListMap.set(d, formatedDimensionList[i]);
|
|
25625
26046
|
});
|
|
25626
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
25627
|
-
chartJSON.hideZeroValues = true;
|
|
25628
|
-
}
|
|
25629
26047
|
};
|
|
25630
26048
|
const initScale = () => {
|
|
25631
26049
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -25689,7 +26107,9 @@ const StackAreaChart = ({
|
|
|
25689
26107
|
)
|
|
25690
26108
|
).tickSize(
|
|
25691
26109
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
25692
|
-
).tickValues(
|
|
26110
|
+
).tickValues(
|
|
26111
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
26112
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
25693
26113
|
}
|
|
25694
26114
|
};
|
|
25695
26115
|
const getXAxis = () => {
|
|
@@ -25719,31 +26139,39 @@ const StackAreaChart = ({
|
|
|
25719
26139
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
25720
26140
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
25721
26141
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
25722
|
-
areaGroupsEnter.append("path").attr(
|
|
26142
|
+
areaGroupsEnter.append("path").attr(
|
|
26143
|
+
"hoverId",
|
|
26144
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
26145
|
+
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => areaGeneratorStart(d)).each(function(d) {
|
|
25723
26146
|
{
|
|
25724
26147
|
select$2(this).attr("d", areaGenerator(d));
|
|
25725
26148
|
}
|
|
25726
26149
|
});
|
|
25727
26150
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
25728
26151
|
const g = select$2(this);
|
|
25729
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
25730
|
-
|
|
25731
|
-
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
|
|
25735
|
-
|
|
26152
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
26153
|
+
"stroke",
|
|
26154
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26155
|
+
).attr("stroke-dasharray", (d2) => {
|
|
26156
|
+
const lineWidth = parseInt(
|
|
26157
|
+
seriesData[i].properties.lineWidth.toString()
|
|
26158
|
+
);
|
|
26159
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
26160
|
+
case staticLineStyle.dotted:
|
|
26161
|
+
return `0,${lineWidth + 2}`;
|
|
26162
|
+
case staticLineStyle.dashed:
|
|
26163
|
+
return strokeDashValues;
|
|
25736
26164
|
default:
|
|
25737
26165
|
return "";
|
|
25738
26166
|
}
|
|
25739
26167
|
}).attr(
|
|
25740
26168
|
"stroke-linecap",
|
|
25741
|
-
() => seriesData[i]?.properties?.lineStyle ===
|
|
26169
|
+
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
25742
26170
|
).attr(
|
|
25743
26171
|
"stroke-width",
|
|
25744
|
-
(d2, i2) => seriesData[i2].properties.lineStyle !==
|
|
26172
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
25745
26173
|
).attr("fill", "none").style("pointer-events", "none");
|
|
25746
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill",
|
|
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().on("mouseenter", function(event2, d2) {
|
|
25747
26175
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
25748
26176
|
svg.selectAll(
|
|
25749
26177
|
'[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
|
|
@@ -25792,6 +26220,7 @@ const StackAreaChart = ({
|
|
|
25792
26220
|
filteredData = fData;
|
|
25793
26221
|
filteredDimension = fDimension;
|
|
25794
26222
|
visibleBars = fVisibleBars;
|
|
26223
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
25795
26224
|
createStackLineData();
|
|
25796
26225
|
drawLineChart();
|
|
25797
26226
|
};
|
|
@@ -25851,6 +26280,20 @@ const StackAreaChart = ({
|
|
|
25851
26280
|
true
|
|
25852
26281
|
).labelArray;
|
|
25853
26282
|
drawSeriesLabels(formatOptions, gTag, newSeriesLabelArray);
|
|
26283
|
+
addTotalValue(
|
|
26284
|
+
totalValueMap,
|
|
26285
|
+
xScale,
|
|
26286
|
+
yScaleLeft,
|
|
26287
|
+
margin,
|
|
26288
|
+
d3Annotation,
|
|
26289
|
+
[],
|
|
26290
|
+
formatOptions,
|
|
26291
|
+
chartType,
|
|
26292
|
+
height,
|
|
26293
|
+
width,
|
|
26294
|
+
svg,
|
|
26295
|
+
isReportEditable
|
|
26296
|
+
);
|
|
25854
26297
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
25855
26298
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
25856
26299
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -25903,6 +26346,7 @@ const StackAreaChart = ({
|
|
|
25903
26346
|
d["hideZero"] = JSON.parse(
|
|
25904
26347
|
JSON.stringify(seriesData[j].properties.hideZeroValues)
|
|
25905
26348
|
);
|
|
26349
|
+
d["properties"] = seriesData[j].properties;
|
|
25906
26350
|
})
|
|
25907
26351
|
);
|
|
25908
26352
|
};
|
|
@@ -25926,10 +26370,7 @@ const NormalizedStackAreaChart = ({
|
|
|
25926
26370
|
const barWidth = 0;
|
|
25927
26371
|
const chartType = chartTypes.NormalizedStackAreaChart;
|
|
25928
26372
|
const svgRef = useRef();
|
|
25929
|
-
const seriesData = generalizedChartData(
|
|
25930
|
-
data.ChartData,
|
|
25931
|
-
data.DimensionList
|
|
25932
|
-
)?.reverse() || [];
|
|
26373
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
25933
26374
|
const dimensionList = data.DimensionList;
|
|
25934
26375
|
const barChart = false;
|
|
25935
26376
|
const isSecondaryAxisDrawn = false;
|
|
@@ -26112,7 +26553,7 @@ const NormalizedStackAreaChart = ({
|
|
|
26112
26553
|
width,
|
|
26113
26554
|
legendMargin,
|
|
26114
26555
|
formatOptions,
|
|
26115
|
-
seriesData,
|
|
26556
|
+
[...seriesData].reverse(),
|
|
26116
26557
|
chartId,
|
|
26117
26558
|
staticLegendShape.areaWithLine
|
|
26118
26559
|
);
|
|
@@ -26134,6 +26575,12 @@ const NormalizedStackAreaChart = ({
|
|
|
26134
26575
|
const preProcessChartData = () => {
|
|
26135
26576
|
const allChartData = [];
|
|
26136
26577
|
const legendList = [];
|
|
26578
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
26579
|
+
chartJSON.hideZeroValues = true;
|
|
26580
|
+
seriesData.forEach((series) => {
|
|
26581
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
26582
|
+
});
|
|
26583
|
+
}
|
|
26137
26584
|
seriesData.forEach((series, index2) => {
|
|
26138
26585
|
const prefixedLegend = `${index2}~$~${series.properties.alias}`;
|
|
26139
26586
|
series.properties.legend = prefixedLegend;
|
|
@@ -26158,9 +26605,6 @@ const NormalizedStackAreaChart = ({
|
|
|
26158
26605
|
} else {
|
|
26159
26606
|
filteredDimension = chartJSON.dimensionList;
|
|
26160
26607
|
}
|
|
26161
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
26162
|
-
chartJSON.hideZeroValues = true;
|
|
26163
|
-
}
|
|
26164
26608
|
const tempStackLineData = getStackedData(
|
|
26165
26609
|
chartJSON.dimensionList,
|
|
26166
26610
|
seriesData,
|
|
@@ -26231,8 +26675,10 @@ const NormalizedStackAreaChart = ({
|
|
|
26231
26675
|
stackChartData.forEach(
|
|
26232
26676
|
(data2, i) => data2.forEach((item, position) => {
|
|
26233
26677
|
const total = item.data.total;
|
|
26234
|
-
lineData[i].data[position]
|
|
26235
|
-
|
|
26678
|
+
if (lineData[i].data[position]) {
|
|
26679
|
+
lineData[i].data[position][0] = item[0] = total === 0 ? 0 : item[0] / total;
|
|
26680
|
+
lineData[i].data[position][1] = item[1] = total === 0 ? 0 : item[1] / total;
|
|
26681
|
+
}
|
|
26236
26682
|
})
|
|
26237
26683
|
);
|
|
26238
26684
|
lineData.forEach((lData) => {
|
|
@@ -26254,7 +26700,10 @@ const NormalizedStackAreaChart = ({
|
|
|
26254
26700
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
26255
26701
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
26256
26702
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
26257
|
-
areaGroupsEnter.append("path").attr(
|
|
26703
|
+
areaGroupsEnter.append("path").attr(
|
|
26704
|
+
"hoverId",
|
|
26705
|
+
(d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
26706
|
+
).attr("class", "area parentGroup").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr("d", (d) => columnGeneratorStart(d)).each(function(d) {
|
|
26258
26707
|
const path2 = select$2(this);
|
|
26259
26708
|
{
|
|
26260
26709
|
path2.attr("d", columnGenerator(d));
|
|
@@ -26262,33 +26711,42 @@ const NormalizedStackAreaChart = ({
|
|
|
26262
26711
|
});
|
|
26263
26712
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
26264
26713
|
const g = select$2(this);
|
|
26265
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26266
|
-
|
|
26267
|
-
|
|
26268
|
-
|
|
26269
|
-
|
|
26270
|
-
|
|
26271
|
-
|
|
26714
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26715
|
+
"stroke",
|
|
26716
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26717
|
+
).attr("stroke-dasharray", (d2) => {
|
|
26718
|
+
const lineWidth = parseInt(
|
|
26719
|
+
seriesData[i].properties.lineWidth.toString()
|
|
26720
|
+
);
|
|
26721
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
26722
|
+
case staticLineStyle.dotted:
|
|
26723
|
+
return `0,${lineWidth + 2}`;
|
|
26724
|
+
case staticLineStyle.dashed:
|
|
26725
|
+
return strokeDashValues;
|
|
26272
26726
|
default:
|
|
26273
26727
|
return "";
|
|
26274
26728
|
}
|
|
26275
26729
|
}).attr(
|
|
26276
26730
|
"stroke-linecap",
|
|
26277
|
-
() => seriesData[i]?.properties?.lineStyle ===
|
|
26731
|
+
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26278
26732
|
).attr(
|
|
26279
26733
|
"stroke-width",
|
|
26280
|
-
(d2, i2) => seriesData[i2].properties.lineStyle !==
|
|
26734
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
26281
26735
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26282
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill",
|
|
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().on("mouseenter", function(event2, d2) {
|
|
26283
26737
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
26284
26738
|
svg.selectAll(
|
|
26285
|
-
'[hoverId="' + getJQuerySelector(
|
|
26739
|
+
'[hoverId="' + getJQuerySelector(
|
|
26740
|
+
(lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
26741
|
+
) + '"]'
|
|
26286
26742
|
).classed("highlight", true).classed("unhighlight", false);
|
|
26287
26743
|
}).on("mouseleave", function() {
|
|
26288
26744
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
26289
26745
|
});
|
|
26290
26746
|
svg.selectAll(
|
|
26291
|
-
'[hoverId="' + getJQuerySelector(
|
|
26747
|
+
'[hoverId="' + getJQuerySelector(
|
|
26748
|
+
(lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
26749
|
+
) + '"]'
|
|
26292
26750
|
).classed("highlight", false).classed("unhighlight", false);
|
|
26293
26751
|
});
|
|
26294
26752
|
areaGroups.exit().remove();
|
|
@@ -26425,8 +26883,10 @@ const NormalizedStackAreaChart = ({
|
|
|
26425
26883
|
stackChartData = stack().keys(chartJSON.legendList).offset(none$3)(stackLineData2);
|
|
26426
26884
|
filteredData.forEach(
|
|
26427
26885
|
(data2, index2) => data2.data.forEach((axisData, position) => {
|
|
26428
|
-
|
|
26429
|
-
|
|
26886
|
+
if (stackChartData[index2][position]) {
|
|
26887
|
+
axisData["0"] = stackChartData[index2][position][0];
|
|
26888
|
+
axisData["1"] = stackChartData[index2][position][1];
|
|
26889
|
+
}
|
|
26430
26890
|
})
|
|
26431
26891
|
);
|
|
26432
26892
|
let seriesColor = formatOptions.annotation.annotationSetLabelColor;
|
|
@@ -26544,7 +27004,7 @@ const drawTotalValue = (chartFormatOptions, totalValue, chartTitleHeight, chartA
|
|
|
26544
27004
|
let cords = getTotalValueCords(chartFormatOptions, chartTitleHeight, innerWidth2, innerHeight2);
|
|
26545
27005
|
chartAreaTagG.append("g").attr("transform", `translate(${cords.x}, ${cords.y})`).style("user-select", "none").append("text").text(`Total : ${formatedTotalValue}`).style(
|
|
26546
27006
|
"fill",
|
|
26547
|
-
chartFormatOptions.total.totalColor !==
|
|
27007
|
+
chartFormatOptions.total.totalColor !== commonColors.white ? chartFormatOptions.total.totalColor : "none"
|
|
26548
27008
|
).style("font-family", chartFormatOptions.total.totalFontFamily).style("font-size", chartFormatOptions.total.totalFontSize).style("font-style", fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "").style(
|
|
26549
27009
|
"text-decoration",
|
|
26550
27010
|
fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
@@ -26667,9 +27127,12 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26667
27127
|
try {
|
|
26668
27128
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
26669
27129
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
26670
|
-
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27130
|
+
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`).selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27131
|
+
"hoverId",
|
|
27132
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27133
|
+
).attr(
|
|
26671
27134
|
"fill",
|
|
26672
|
-
(d) => d.data.properties.color !==
|
|
27135
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
26673
27136
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
26674
27137
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
26675
27138
|
}).on("mousemove. ", (d) => {
|
|
@@ -26740,7 +27203,13 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26740
27203
|
pieChartData.filter(
|
|
26741
27204
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
26742
27205
|
)
|
|
26743
|
-
).enter().append("text").attr(
|
|
27206
|
+
).enter().append("text").attr(
|
|
27207
|
+
"hoverId",
|
|
27208
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27209
|
+
).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
27210
|
+
"fill",
|
|
27211
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
27212
|
+
).attr(
|
|
26744
27213
|
"font-style",
|
|
26745
27214
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
26746
27215
|
).attr(
|
|
@@ -26754,7 +27223,13 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26754
27223
|
).attr(
|
|
26755
27224
|
"font-family",
|
|
26756
27225
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
26757
|
-
).attr(
|
|
27226
|
+
).attr(
|
|
27227
|
+
"transform",
|
|
27228
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27229
|
+
).attr(
|
|
27230
|
+
"visibility",
|
|
27231
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27232
|
+
).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
26758
27233
|
const { plotArea } = chartFormatOptions;
|
|
26759
27234
|
if (plotArea.dataLabelName) {
|
|
26760
27235
|
return d.data.legend;
|
|
@@ -26765,7 +27240,13 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26765
27240
|
pieChartData.filter(
|
|
26766
27241
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
26767
27242
|
)
|
|
26768
|
-
).enter().append("text").attr(
|
|
27243
|
+
).enter().append("text").attr(
|
|
27244
|
+
"hoverId",
|
|
27245
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27246
|
+
).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
27247
|
+
"fill",
|
|
27248
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27249
|
+
).attr(
|
|
26769
27250
|
"font-style",
|
|
26770
27251
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
26771
27252
|
).attr(
|
|
@@ -26779,7 +27260,16 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26779
27260
|
).attr(
|
|
26780
27261
|
"font-family",
|
|
26781
27262
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26782
|
-
).attr(
|
|
27263
|
+
).attr(
|
|
27264
|
+
"transform",
|
|
27265
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27266
|
+
).attr(
|
|
27267
|
+
"visibility",
|
|
27268
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27269
|
+
).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr(
|
|
27270
|
+
"dy",
|
|
27271
|
+
chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0"
|
|
27272
|
+
).text((d) => {
|
|
26783
27273
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26784
27274
|
const dataValue = d.data.data[0].value;
|
|
26785
27275
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -26846,7 +27336,10 @@ const PieChart = ({ data, formatOptions, chartId }) => {
|
|
|
26846
27336
|
const textWidth = 80;
|
|
26847
27337
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
26848
27338
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
26849
|
-
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27339
|
+
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27340
|
+
"hoverId",
|
|
27341
|
+
(d) => (d.data.properties.alias || d.data.properties.name || "Legend").replace(/\s+/g, "-")
|
|
27342
|
+
).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
|
|
26850
27343
|
let value2 = d.data.data[0].value.toString();
|
|
26851
27344
|
if (d.data.data[0].value !== void 0) {
|
|
26852
27345
|
value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data[0].value / pieTotalValue) * 100).toFixed(
|
|
@@ -27028,9 +27521,12 @@ const DonutChart = ({
|
|
|
27028
27521
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
|
|
27029
27522
|
const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
|
|
27030
27523
|
const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
|
|
27031
|
-
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27524
|
+
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27525
|
+
"hoverId",
|
|
27526
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27527
|
+
).attr(
|
|
27032
27528
|
"fill",
|
|
27033
|
-
(d) => d.data.properties.color !==
|
|
27529
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27034
27530
|
).each(function(d) {
|
|
27035
27531
|
const thisPath = d;
|
|
27036
27532
|
thisPath._current = { startAngle: 0, endAngle: 0 };
|
|
@@ -27112,7 +27608,13 @@ const DonutChart = ({
|
|
|
27112
27608
|
pieChartData.filter(
|
|
27113
27609
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27114
27610
|
)
|
|
27115
|
-
).enter().append("text").attr(
|
|
27611
|
+
).enter().append("text").attr(
|
|
27612
|
+
"hoverId",
|
|
27613
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27614
|
+
).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
27615
|
+
"fill",
|
|
27616
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
27617
|
+
).attr(
|
|
27116
27618
|
"font-style",
|
|
27117
27619
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27118
27620
|
).attr(
|
|
@@ -27126,7 +27628,13 @@ const DonutChart = ({
|
|
|
27126
27628
|
).attr(
|
|
27127
27629
|
"font-family",
|
|
27128
27630
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
27129
|
-
).attr(
|
|
27631
|
+
).attr(
|
|
27632
|
+
"transform",
|
|
27633
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27634
|
+
).attr(
|
|
27635
|
+
"visibility",
|
|
27636
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27637
|
+
).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
27130
27638
|
const { plotArea } = chartFormatOptions;
|
|
27131
27639
|
if (plotArea.dataLabelName) {
|
|
27132
27640
|
return d.data.legend;
|
|
@@ -27137,7 +27645,13 @@ const DonutChart = ({
|
|
|
27137
27645
|
pieChartData.filter(
|
|
27138
27646
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27139
27647
|
)
|
|
27140
|
-
).enter().append("text").attr(
|
|
27648
|
+
).enter().append("text").attr(
|
|
27649
|
+
"hoverId",
|
|
27650
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27651
|
+
).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
27652
|
+
"fill",
|
|
27653
|
+
(d) => d.data.properties?.lableFontColor ?? commonColors.black
|
|
27654
|
+
).attr(
|
|
27141
27655
|
"font-style",
|
|
27142
27656
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27143
27657
|
).attr(
|
|
@@ -27151,7 +27665,19 @@ const DonutChart = ({
|
|
|
27151
27665
|
).attr(
|
|
27152
27666
|
"font-family",
|
|
27153
27667
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27154
|
-
).attr(
|
|
27668
|
+
).attr(
|
|
27669
|
+
"fill",
|
|
27670
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27671
|
+
).attr(
|
|
27672
|
+
"transform",
|
|
27673
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27674
|
+
).attr(
|
|
27675
|
+
"visibility",
|
|
27676
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27677
|
+
).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr(
|
|
27678
|
+
"dy",
|
|
27679
|
+
chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0"
|
|
27680
|
+
).text((d) => {
|
|
27155
27681
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27156
27682
|
const dataValue = d.data.data[0].value;
|
|
27157
27683
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27177,7 +27703,10 @@ const DonutChart = ({
|
|
|
27177
27703
|
).attr(
|
|
27178
27704
|
"font-weight",
|
|
27179
27705
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"
|
|
27180
|
-
).attr(
|
|
27706
|
+
).attr(
|
|
27707
|
+
"fill",
|
|
27708
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27709
|
+
).attr("fill-opacity", 0.5).text((d) => {
|
|
27181
27710
|
const dataValue = Math.abs(d.data.data[0].value);
|
|
27182
27711
|
if (chartFormatOptions.plotArea.plotAreaAbsoluteValue && dataValue !== void 0) {
|
|
27183
27712
|
return format(".2s")(dataValue);
|
|
@@ -27218,7 +27747,10 @@ const DonutChart = ({
|
|
|
27218
27747
|
const textWidth = 80;
|
|
27219
27748
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
27220
27749
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
27221
|
-
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27750
|
+
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27751
|
+
"hoverId",
|
|
27752
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27753
|
+
).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
|
|
27222
27754
|
try {
|
|
27223
27755
|
let value2 = d.data.data[0].value.toString();
|
|
27224
27756
|
if (d.data.data[0].value !== void 0) {
|
|
@@ -27293,7 +27825,7 @@ const DonutChart = ({
|
|
|
27293
27825
|
let fontStyle = chartFormatOptions.total.totalFontStyle;
|
|
27294
27826
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).attr("pointer-events", "none").attr("text-anchor", "middle").append("text").style(
|
|
27295
27827
|
"fill",
|
|
27296
|
-
chartFormatOptions.total.totalColor !==
|
|
27828
|
+
chartFormatOptions.total.totalColor !== commonColors.white ? chartFormatOptions.total.totalColor : "none"
|
|
27297
27829
|
).style("font-family", chartFormatOptions.total.totalFontFamily).style("font-size", chartFormatOptions.total.totalFontSize).style(
|
|
27298
27830
|
"font-style",
|
|
27299
27831
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -27493,29 +28025,33 @@ const Treemap = ({ data, formatOptions, chartId }) => {
|
|
|
27493
28025
|
);
|
|
27494
28026
|
}).on("mouseout", () => hideTooltipOnMouseOut());
|
|
27495
28027
|
leaf.append("clipPath").attr("id", (d, i) => `clip-${i}-${chartId}`).append("rect").attr("width", (d) => d.x1 - d.x0).attr("height", (d) => d.y1 - d.y0);
|
|
27496
|
-
|
|
27497
|
-
"font-style",
|
|
27498
|
-
|
|
27499
|
-
|
|
27500
|
-
|
|
27501
|
-
|
|
27502
|
-
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
28028
|
+
if (chartFormatOptions.plotArea.dataLabels) {
|
|
28029
|
+
leaf.append("text").style("fill", (d) => d.data.properties.labelFontColor).style("font-family", (d) => d.data.properties.fontFamily).style("font-size", (d) => d.data.properties.fontSize).style(
|
|
28030
|
+
"font-style",
|
|
28031
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
28032
|
+
).style(
|
|
28033
|
+
"text-decoration",
|
|
28034
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
28035
|
+
).style(
|
|
28036
|
+
"font-weight",
|
|
28037
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : ""
|
|
28038
|
+
).attr("clip-path", (d, i) => `url(#clip-${i}-${chartId})`);
|
|
28039
|
+
if (chartFormatOptions.plotArea.dataLabelName) {
|
|
28040
|
+
leaf.selectAll("text").append("tspan").attr("x", 5).attr("y", "1.1em").text((d) => d.data.legend);
|
|
28041
|
+
}
|
|
28042
|
+
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
28043
|
+
leaf.selectAll("text").append("tspan").attr("x", 5).attr(
|
|
28044
|
+
"y",
|
|
28045
|
+
chartFormatOptions.plotArea.dataLabelName ? "2.1em" : "1.1em"
|
|
28046
|
+
).text(
|
|
28047
|
+
(d) => getNumberWithFormatFunction(
|
|
28048
|
+
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
28049
|
+
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
28050
|
+
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
28051
|
+
)(d.data.data[0].value)
|
|
28052
|
+
);
|
|
28053
|
+
}
|
|
27508
28054
|
}
|
|
27509
|
-
leaf.selectAll("text").append("tspan").attr("x", 5).attr(
|
|
27510
|
-
"y",
|
|
27511
|
-
chartFormatOptions.plotArea.dataLabelName ? "2.1em" : "1.1em"
|
|
27512
|
-
).text(
|
|
27513
|
-
(d) => getNumberWithFormatFunction(
|
|
27514
|
-
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
27515
|
-
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
27516
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27517
|
-
)(d.data.data[0].value)
|
|
27518
|
-
);
|
|
27519
28055
|
} catch (error) {
|
|
27520
28056
|
logError$2(fileName$6, "initChartRect", error);
|
|
27521
28057
|
}
|
|
@@ -27650,7 +28186,7 @@ const PieofPie = ({
|
|
|
27650
28186
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
27651
28187
|
chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getParentPiePosition()}`).selectAll("path").data(pieOfPieData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
|
|
27652
28188
|
"fill",
|
|
27653
|
-
(d) => d.data.properties.color !==
|
|
28189
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27654
28190
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
27655
28191
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
27656
28192
|
}).on("mousemove.text", (d) => {
|
|
@@ -27718,7 +28254,7 @@ const PieofPie = ({
|
|
|
27718
28254
|
const arcOver = arc$1().innerRadius(0).outerRadius(childRadius + 10);
|
|
27719
28255
|
chartAreaTagG.append("g").attr("class", "childGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getChildPiePosition()}`).selectAll("path").data(childPieData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr(
|
|
27720
28256
|
"fill",
|
|
27721
|
-
(d) => d.data.properties.color !==
|
|
28257
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27722
28258
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
27723
28259
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
27724
28260
|
}).on("mousemove.text", (d) => {
|
|
@@ -27788,7 +28324,10 @@ const PieofPie = ({
|
|
|
27788
28324
|
const drawParentPieDataLabels = () => {
|
|
27789
28325
|
try {
|
|
27790
28326
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27791
|
-
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
28327
|
+
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
28328
|
+
"fill",
|
|
28329
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
28330
|
+
).attr(
|
|
27792
28331
|
"font-style",
|
|
27793
28332
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27794
28333
|
).attr(
|
|
@@ -27809,7 +28348,10 @@ const PieofPie = ({
|
|
|
27809
28348
|
}
|
|
27810
28349
|
return "";
|
|
27811
28350
|
});
|
|
27812
|
-
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
28351
|
+
chartAreaTagG.append("g").attr("class", "parentLabels parentGroup").attr("transform", `${getParentPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(pieOfPieData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
28352
|
+
"fill",
|
|
28353
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
28354
|
+
).attr(
|
|
27813
28355
|
"font-style",
|
|
27814
28356
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27815
28357
|
).attr(
|
|
@@ -27852,7 +28394,10 @@ const PieofPie = ({
|
|
|
27852
28394
|
const drawChildPieDataLabels = (childData) => {
|
|
27853
28395
|
try {
|
|
27854
28396
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27855
|
-
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
28397
|
+
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
28398
|
+
"fill",
|
|
28399
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
28400
|
+
).attr(
|
|
27856
28401
|
"font-style",
|
|
27857
28402
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27858
28403
|
).attr(
|
|
@@ -27873,7 +28418,10 @@ const PieofPie = ({
|
|
|
27873
28418
|
}
|
|
27874
28419
|
return "";
|
|
27875
28420
|
});
|
|
27876
|
-
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
28421
|
+
chartAreaTagG.append("g").attr("class", "childLabels parentGroup").attr("transform", `${getChildPiePosition()}`).attr("pointer-events", "none").attr("text-anchor", "middle").selectAll("text").data(childData).enter().append("text").attr("hoverId", (d) => d.data.legend.replace(/ /g, "-")).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
28422
|
+
"fill",
|
|
28423
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
28424
|
+
).attr(
|
|
27877
28425
|
"font-style",
|
|
27878
28426
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27879
28427
|
).attr(
|
|
@@ -27934,18 +28482,6 @@ const PieofPie = ({
|
|
|
27934
28482
|
data: []
|
|
27935
28483
|
};
|
|
27936
28484
|
});
|
|
27937
|
-
initLegendListWithTotalValueAllowance(
|
|
27938
|
-
chartFormatOptions,
|
|
27939
|
-
svg,
|
|
27940
|
-
seriesData,
|
|
27941
|
-
width,
|
|
27942
|
-
height,
|
|
27943
|
-
legendListWidth,
|
|
27944
|
-
chartTitleHeight,
|
|
27945
|
-
chartId,
|
|
27946
|
-
margins,
|
|
27947
|
-
staticLegendShape.circle
|
|
27948
|
-
);
|
|
27949
28485
|
} catch (error) {
|
|
27950
28486
|
logError$2(fileName$5, "initLegendList", error);
|
|
27951
28487
|
}
|
|
@@ -28278,7 +28814,7 @@ const PyramidChart = ({
|
|
|
28278
28814
|
width: 15
|
|
28279
28815
|
},
|
|
28280
28816
|
type: AnnotationTypeMap[annotationType],
|
|
28281
|
-
color: chartFormatOptions.plotArea.dataLabelNameColor !=
|
|
28817
|
+
color: chartFormatOptions.plotArea.dataLabelNameColor != commonColors.black ? chartFormatOptions.plotArea.dataLabelNameColor : commonColors.black,
|
|
28282
28818
|
height: width,
|
|
28283
28819
|
width,
|
|
28284
28820
|
index: i
|
|
@@ -28434,7 +28970,7 @@ const ProgressChart = ({
|
|
|
28434
28970
|
],
|
|
28435
28971
|
chartFormatOptions,
|
|
28436
28972
|
void 0,
|
|
28437
|
-
|
|
28973
|
+
ChartData[0].properties
|
|
28438
28974
|
);
|
|
28439
28975
|
} catch (error) {
|
|
28440
28976
|
logError$2(
|
|
@@ -28478,7 +29014,9 @@ const ProgressChart = ({
|
|
|
28478
29014
|
)(progressValue)
|
|
28479
29015
|
}
|
|
28480
29016
|
],
|
|
28481
|
-
chartFormatOptions
|
|
29017
|
+
chartFormatOptions,
|
|
29018
|
+
void 0,
|
|
29019
|
+
ChartData[1].properties
|
|
28482
29020
|
);
|
|
28483
29021
|
} catch (error) {
|
|
28484
29022
|
logError$2(
|
|
@@ -28521,7 +29059,7 @@ const ProgressChart = ({
|
|
|
28521
29059
|
chartFormatOptions.plotArea.dataLabels ? "visible" : "hidden"
|
|
28522
29060
|
).attr(
|
|
28523
29061
|
"fill",
|
|
28524
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29062
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : chartFormatOptions.toolTip.toolTipDisplayUnits
|
|
28525
29063
|
).attr(
|
|
28526
29064
|
"font-style",
|
|
28527
29065
|
valuefontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -28536,9 +29074,9 @@ const ProgressChart = ({
|
|
|
28536
29074
|
chartFormatOptions.plotArea.dataLabelValueFontFamily
|
|
28537
29075
|
).attr("font-size", chartFormatOptions.plotArea.dataLabelValueFontSize).text(() => {
|
|
28538
29076
|
return chartFormatOptions.plotArea.dataLabelNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
28539
|
-
chartFormatOptions.plotArea.
|
|
29077
|
+
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
28540
29078
|
chartFormatOptions.plotArea.dataLabelNumberFormatProgress,
|
|
28541
|
-
chartFormatOptions.plotArea.
|
|
29079
|
+
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
28542
29080
|
)(progressValue);
|
|
28543
29081
|
});
|
|
28544
29082
|
} catch (error) {
|
|
@@ -28622,10 +29160,9 @@ const Speedometer = ({
|
|
|
28622
29160
|
positionDominatorName = "height";
|
|
28623
29161
|
}
|
|
28624
29162
|
positionTransformString = centerTranslation(positionDominatorName);
|
|
28625
|
-
innerRadius =
|
|
28626
|
-
|
|
28627
|
-
|
|
28628
|
-
);
|
|
29163
|
+
innerRadius = convertStringToNumber(
|
|
29164
|
+
chartFormatOptions.plotArea.innerRadiusForSpeedometer
|
|
29165
|
+
) / 100 * radius;
|
|
28629
29166
|
} catch (error) {
|
|
28630
29167
|
logError$2(fileName2, "initChartRadius", error);
|
|
28631
29168
|
}
|
|
@@ -28678,13 +29215,16 @@ const Speedometer = ({
|
|
|
28678
29215
|
}
|
|
28679
29216
|
if (colorThemeArray.length < 101) {
|
|
28680
29217
|
for (let index2 = colorThemeArray.length; index2 < 100; index2++) {
|
|
28681
|
-
colorThemeArray.push(
|
|
29218
|
+
colorThemeArray.push(commonColors.black);
|
|
28682
29219
|
}
|
|
28683
29220
|
}
|
|
28684
29221
|
} else {
|
|
28685
|
-
if (
|
|
28686
|
-
|
|
28687
|
-
|
|
29222
|
+
if (chartFormatOptions.colorScale.showColor == colorThemeTypes.none) {
|
|
29223
|
+
const color2 = ChartData[0].properties?.color ?? "#bac8de";
|
|
29224
|
+
for (let index2 = 1; index2 <= customTicksCount; index2++) {
|
|
29225
|
+
colorThemeArray.push(color2);
|
|
29226
|
+
}
|
|
29227
|
+
} else if (chartFormatOptions.colorScale.showColor == colorThemeTypes.discrete) {
|
|
28688
29228
|
for (let index2 = 1; index2 <= customTicksCount; index2++) {
|
|
28689
29229
|
colorThemeArray.push(
|
|
28690
29230
|
chartFormatOptions.colorScale["division" + index2]
|
|
@@ -28834,7 +29374,7 @@ const Speedometer = ({
|
|
|
28834
29374
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
28835
29375
|
).attr(
|
|
28836
29376
|
"fill",
|
|
28837
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29377
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
28838
29378
|
).attr(
|
|
28839
29379
|
"font-style",
|
|
28840
29380
|
chartFormatOptions.plotArea.dataLabelValueFontStyle.includes(
|
|
@@ -29005,7 +29545,7 @@ const Speedometer = ({
|
|
|
29005
29545
|
let comparedValue = chartAreaTagG.append("g").attr("class", "label").attr("transform", positionTransformString2);
|
|
29006
29546
|
comparedValue.selectAll("text").data(["chartData.dataArray[1].maximumMeasure"]).enter().append("text").attr("dy", "24").attr("text-anchor", "middle").attr("font-size", chartFormatOptions.pointerValue.pointerValueFontSize).attr(
|
|
29007
29547
|
"fill",
|
|
29008
|
-
chartFormatOptions.pointerValue.pointerValueColor !==
|
|
29548
|
+
chartFormatOptions.pointerValue.pointerValueColor !== commonColors.white ? chartFormatOptions.pointerValue.pointerValueColor : "none"
|
|
29009
29549
|
).attr(
|
|
29010
29550
|
"font-style",
|
|
29011
29551
|
valuefontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -29212,7 +29752,7 @@ const RadialBarChart = ({
|
|
|
29212
29752
|
)(d)
|
|
29213
29753
|
).attr(
|
|
29214
29754
|
"fill",
|
|
29215
|
-
chartFormatOptions.plotArea.axialAxisDataLabelColor !==
|
|
29755
|
+
chartFormatOptions.plotArea.axialAxisDataLabelColor !== commonColors.white ? chartFormatOptions.plotArea.axialAxisDataLabelColor : "none"
|
|
29216
29756
|
).style(
|
|
29217
29757
|
"font-size",
|
|
29218
29758
|
chartFormatOptions.plotArea.axialAxisDataLabelFontSize
|
|
@@ -29275,7 +29815,7 @@ const RadialBarChart = ({
|
|
|
29275
29815
|
)(d.data[0].value) : ""}`
|
|
29276
29816
|
).attr(
|
|
29277
29817
|
"fill",
|
|
29278
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29818
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
29279
29819
|
).style(
|
|
29280
29820
|
"font-size",
|
|
29281
29821
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
@@ -29707,7 +30247,11 @@ function requireD3Cloud() {
|
|
|
29707
30247
|
var d3CloudExports = requireD3Cloud();
|
|
29708
30248
|
const cloud = /* @__PURE__ */ getDefaultExportFromCjs(d3CloudExports);
|
|
29709
30249
|
const fileName$2 = "WordCloud.tsx";
|
|
29710
|
-
const WordCloud = ({
|
|
30250
|
+
const WordCloud = ({
|
|
30251
|
+
data: { ChartData },
|
|
30252
|
+
formatOptions,
|
|
30253
|
+
chartId
|
|
30254
|
+
}) => {
|
|
29711
30255
|
const svgRef = useRef();
|
|
29712
30256
|
let seriesData = generalizedChartData(ChartData);
|
|
29713
30257
|
let chartFormatOptions;
|
|
@@ -29782,7 +30326,7 @@ const WordCloud = ({ data: { ChartData }, formatOptions, chartId }) => {
|
|
|
29782
30326
|
}
|
|
29783
30327
|
}).attr("text-anchor", "middle").style("font-family", chartFormatOptions.text.textFontFamily).attr("fill", function(d) {
|
|
29784
30328
|
try {
|
|
29785
|
-
return d.properties.color !==
|
|
30329
|
+
return d.properties.color !== commonColors.white ? d.properties.color : "none";
|
|
29786
30330
|
} catch (error) {
|
|
29787
30331
|
logError$2(fileName$2, "draw-fill", error);
|
|
29788
30332
|
return "none";
|
|
@@ -33198,7 +33742,7 @@ const VennChart = ({
|
|
|
33198
33742
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
33199
33743
|
).attr(
|
|
33200
33744
|
"fill",
|
|
33201
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
33745
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
33202
33746
|
).style(
|
|
33203
33747
|
"font-style",
|
|
33204
33748
|
fontStyleValue.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "normal"
|
|
@@ -33251,7 +33795,7 @@ const VennChart = ({
|
|
|
33251
33795
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
33252
33796
|
).attr(
|
|
33253
33797
|
"fill",
|
|
33254
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
33798
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
33255
33799
|
).style(
|
|
33256
33800
|
"font-style",
|
|
33257
33801
|
fontStyleValue.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "normal"
|
|
@@ -34022,11 +34566,11 @@ const SankeyChart = ({
|
|
|
34022
34566
|
arrangeFlows();
|
|
34023
34567
|
const Nodes = chartAreaTagG.append("g").selectAll("rect").data(nodes).enter().append("rect").style("fill-opacity", nodesFillOpacity).attr("id", (d) => "Node" + d.index).attr("class", "sankey-nodes").attr(
|
|
34024
34568
|
"stroke",
|
|
34025
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34569
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34026
34570
|
).attr(
|
|
34027
34571
|
"stroke-width",
|
|
34028
34572
|
chartFormatOptions.nodes.nodesBorderVisibility ? chartFormatOptions.nodes.nodesBorderThickness : 0
|
|
34029
|
-
).attr("x", (d) => d.x0).attr("y", (d) => d.y0).attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => d.color ? d.color :
|
|
34573
|
+
).attr("x", (d) => d.x0).attr("y", (d) => d.y0).attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => d.color ? d.color : commonColors.white).on("mousemove", function(event2, d) {
|
|
34030
34574
|
try {
|
|
34031
34575
|
if (chartFormatOptions.toolTip.toolTipVisibility) {
|
|
34032
34576
|
showTooltipOnMouseMove(
|
|
@@ -34050,13 +34594,13 @@ const SankeyChart = ({
|
|
|
34050
34594
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", 0.1);
|
|
34051
34595
|
chartAreaTagG.select(`#Node${d.index}`).style(
|
|
34052
34596
|
"stroke",
|
|
34053
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34597
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34054
34598
|
).style("fill-opacity", nodesFillOpacity).style("cursor", "pointer");
|
|
34055
34599
|
chartAreaTagG.select(`#Label${d.index}`).style("opacity", 1);
|
|
34056
34600
|
d.sourceLinks.forEach((j) => {
|
|
34057
34601
|
chartAreaTagG.select(`#Node${j.target.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34058
34602
|
"stroke",
|
|
34059
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34603
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34060
34604
|
);
|
|
34061
34605
|
chartAreaTagG.select(`#Link${j.index}`).style("stroke-opacity", linksFillOpacity);
|
|
34062
34606
|
chartAreaTagG.select(`#Label${j.target.index}`).style("opacity", 1);
|
|
@@ -34064,7 +34608,7 @@ const SankeyChart = ({
|
|
|
34064
34608
|
d.targetLinks.forEach((j) => {
|
|
34065
34609
|
chartAreaTagG.select(`#Node${j.source.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34066
34610
|
"stroke",
|
|
34067
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34611
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34068
34612
|
);
|
|
34069
34613
|
chartAreaTagG.select(`#Link${j.index}`).style("stroke-opacity", linksFillOpacity);
|
|
34070
34614
|
chartAreaTagG.select(`#Label${j.source.index}`).style("opacity", 1);
|
|
@@ -34076,7 +34620,7 @@ const SankeyChart = ({
|
|
|
34076
34620
|
try {
|
|
34077
34621
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", nodesFillOpacity).style(
|
|
34078
34622
|
"stroke",
|
|
34079
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34623
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34080
34624
|
);
|
|
34081
34625
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", linksFillOpacity);
|
|
34082
34626
|
chartAreaTagG.selectAll(".sankey-nodes-texts").style("opacity", "1");
|
|
@@ -34099,11 +34643,11 @@ const SankeyChart = ({
|
|
|
34099
34643
|
chartAreaTagG.select(`#Link${d.index}`).style("stroke-opacity", linksFillOpacity).style("cursor", "pointer");
|
|
34100
34644
|
chartAreaTagG.select(`#Node${d.target.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34101
34645
|
"Stroke",
|
|
34102
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34646
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34103
34647
|
);
|
|
34104
34648
|
chartAreaTagG.select(`#Node${d.source.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34105
34649
|
"Stroke",
|
|
34106
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34650
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34107
34651
|
);
|
|
34108
34652
|
chartAreaTagG.select(`#Label${d.target.index}`).style("opacity", 1);
|
|
34109
34653
|
chartAreaTagG.select(`#Label${d.source.index}`).style("opacity", 1);
|
|
@@ -34135,7 +34679,7 @@ const SankeyChart = ({
|
|
|
34135
34679
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", nodesFillOpacity);
|
|
34136
34680
|
chartAreaTagG.selectAll(".sankey-nodes").style(
|
|
34137
34681
|
"stroke",
|
|
34138
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34682
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34139
34683
|
);
|
|
34140
34684
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", linksFillOpacity);
|
|
34141
34685
|
chartAreaTagG.selectAll(".sankey-nodes-texts").style("opacity", "1");
|
|
@@ -52360,7 +52904,7 @@ const BubbleChart = ({
|
|
|
52360
52904
|
(d) => d.legendName.replace(/ /g, "-")
|
|
52361
52905
|
).attr(
|
|
52362
52906
|
"fill",
|
|
52363
|
-
(d) => d.legendColor !==
|
|
52907
|
+
(d) => d.legendColor !== commonColors.white ? d.legendColor : "none"
|
|
52364
52908
|
).append("path").attr("class", "path").attr("id", function(d, i) {
|
|
52365
52909
|
select$2(this).attr(
|
|
52366
52910
|
"d",
|
|
@@ -52631,7 +53175,7 @@ const BubbleChart = ({
|
|
|
52631
53175
|
measure: d.value,
|
|
52632
53176
|
measureName: series.legend ?? "Measure",
|
|
52633
53177
|
legendName: series.legend,
|
|
52634
|
-
legendColor: series.properties?.color ??
|
|
53178
|
+
legendColor: series.properties?.color ?? commonColors.black,
|
|
52635
53179
|
tooltip: ""
|
|
52636
53180
|
}));
|
|
52637
53181
|
} catch (e) {
|
|
@@ -53143,7 +53687,7 @@ const ScatterChart = ({
|
|
|
53143
53687
|
if (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top)
|
|
53144
53688
|
innerdiv.style("margin-right", "16px").style("white-space", "nowrap");
|
|
53145
53689
|
innerdiv.append("div").style("height", "10px").style("width", "10px").style("background", d.color).style("border-radius", "1px");
|
|
53146
|
-
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? d.color ? d.color :
|
|
53690
|
+
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? d.color ? d.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
53147
53691
|
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).attr("title", d.name).style("font-size", chartFormatOptions.legends.legendFontSize + "px").style("font-family", chartFormatOptions.legends.legendFontFamily).style(
|
|
53148
53692
|
"font-style",
|
|
53149
53693
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -53200,7 +53744,7 @@ const ScatterChart = ({
|
|
|
53200
53744
|
if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
|
|
53201
53745
|
innerdiv.style("margin-right", "16px").style("white-space", "nowrap");
|
|
53202
53746
|
shapesForScatterPlot(innerdiv, d.markerShape);
|
|
53203
|
-
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ?
|
|
53747
|
+
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
53204
53748
|
innerdiv.append("div").style("margin-left", "5px").style("color", legendColor).attr("title", d.name).style("font-size", chartFormatOptions.legends.legendFontSize + "px").style("font-family", chartFormatOptions.legends.legendFontFamily).style(
|
|
53205
53749
|
"font-style",
|
|
53206
53750
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -53546,7 +54090,9 @@ const WaterfallChart = ({
|
|
|
53546
54090
|
if (formatOptions.xAxisLabel.hideZeroValues) {
|
|
53547
54091
|
if (tempDimensionList.length > 0) {
|
|
53548
54092
|
tempDimensionList.forEach((dimension) => {
|
|
53549
|
-
chartJSON.legendList = chartJSON.legendList.filter(
|
|
54093
|
+
chartJSON.legendList = chartJSON.legendList.filter(
|
|
54094
|
+
(dim) => dim !== dimension
|
|
54095
|
+
);
|
|
53550
54096
|
});
|
|
53551
54097
|
}
|
|
53552
54098
|
chartJSON.dimensionList = chartJSON.legendList;
|
|
@@ -53565,7 +54111,11 @@ const WaterfallChart = ({
|
|
|
53565
54111
|
tempWaterfallChartData && tempWaterfallChartData.forEach((d, i) => {
|
|
53566
54112
|
if (d.dimension) {
|
|
53567
54113
|
tempDimensionList.push(d.dimension);
|
|
53568
|
-
tempDimensionListWithIndex.push({
|
|
54114
|
+
tempDimensionListWithIndex.push({
|
|
54115
|
+
dimension: d.dimension,
|
|
54116
|
+
chartDataIndex: i,
|
|
54117
|
+
selfIndex: tempDimensionListWithIndex.length
|
|
54118
|
+
});
|
|
53569
54119
|
}
|
|
53570
54120
|
});
|
|
53571
54121
|
if (isDateType) {
|
|
@@ -53576,7 +54126,9 @@ const WaterfallChart = ({
|
|
|
53576
54126
|
} else {
|
|
53577
54127
|
tempformatedDimensionList = tempDimensionList;
|
|
53578
54128
|
}
|
|
53579
|
-
let formatedDimensionList = JSON.parse(
|
|
54129
|
+
let formatedDimensionList = JSON.parse(
|
|
54130
|
+
JSON.stringify(chartJSON.legendList)
|
|
54131
|
+
);
|
|
53580
54132
|
tempDimensionListWithIndex.forEach((listItem, i) => {
|
|
53581
54133
|
formatedDimensionList[listItem.chartDataIndex] = tempformatedDimensionList[listItem.selfIndex];
|
|
53582
54134
|
});
|
|
@@ -53649,7 +54201,9 @@ const WaterfallChart = ({
|
|
|
53649
54201
|
)
|
|
53650
54202
|
).tickSize(
|
|
53651
54203
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
53652
|
-
).tickValues(
|
|
54204
|
+
).tickValues(
|
|
54205
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
54206
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
53653
54207
|
}
|
|
53654
54208
|
colorScale = ordinal().domain(["base", "dimensionTotal", "up", "down"]).range([
|
|
53655
54209
|
formatOptions.plotArea.totalColor,
|
|
@@ -53665,9 +54219,7 @@ const WaterfallChart = ({
|
|
|
53665
54219
|
};
|
|
53666
54220
|
const getChartType = (lineData) => {
|
|
53667
54221
|
let totalStackData;
|
|
53668
|
-
waterFallData.forEach(
|
|
53669
|
-
(K2, j) => K2.forEach((d) => d["key"] = K2.key)
|
|
53670
|
-
);
|
|
54222
|
+
waterFallData.forEach((K2, j) => K2.forEach((d) => d["key"] = K2.key));
|
|
53671
54223
|
if (stackTotalData) {
|
|
53672
54224
|
let stackDataLegendList = filteredData.map((name) => name.legend);
|
|
53673
54225
|
totalStackData = stack().keys(stackDataLegendList)(stackTotalData);
|
|
@@ -53686,10 +54238,30 @@ const WaterfallChart = ({
|
|
|
53686
54238
|
let parentGroup = gTag.selectAll(`.parentGroup-${k2}`).data([null]);
|
|
53687
54239
|
parentGroup = parentGroup.enter().append("g").attr("class", `parentGroup parentGroup-${k2}`).merge(parentGroup);
|
|
53688
54240
|
let barGroups = parentGroup.selectAll(`.bar-group-${k2}`).data(waterFallData);
|
|
53689
|
-
const barGroupsEnter = barGroups.enter().append("g").attr("class", `bar-group-${k2}`).attr(
|
|
54241
|
+
const barGroupsEnter = barGroups.enter().append("g").attr("class", `bar-group-${k2}`).attr(
|
|
54242
|
+
"fill",
|
|
54243
|
+
(d) => d.color ? d.color : colorScale(d.key) !== commonColors.white ? colorScale(d.key) : "none"
|
|
54244
|
+
).attr("opacity", (d) => d.opacity);
|
|
53690
54245
|
barGroups = barGroupsEnter.merge(barGroups);
|
|
53691
|
-
let rects = barGroups.selectAll("rect").data(
|
|
53692
|
-
|
|
54246
|
+
let rects = barGroups.selectAll("rect").data(
|
|
54247
|
+
(d) => d,
|
|
54248
|
+
(d) => d.key || d.Key
|
|
54249
|
+
);
|
|
54250
|
+
const rectsEnter = rects.enter().append("rect").attr("class", "rect").attr(
|
|
54251
|
+
"class",
|
|
54252
|
+
(d) => d.key ? d.key.replace(/ /g, "-") : d.Key.replace(/ /g, "-")
|
|
54253
|
+
).attr(
|
|
54254
|
+
"x",
|
|
54255
|
+
(d) => xScale(
|
|
54256
|
+
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
54257
|
+
)
|
|
54258
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr(
|
|
54259
|
+
"height",
|
|
54260
|
+
(d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
|
|
54261
|
+
).attr("width", xScale.bandwidth()).attr(
|
|
54262
|
+
"visibility",
|
|
54263
|
+
(d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible"
|
|
54264
|
+
).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
53693
54265
|
const markerInfo = {
|
|
53694
54266
|
markerShape: "square",
|
|
53695
54267
|
markerColor: d.key === "dimensionTotal" ? formatOptions.plotArea.totalColor : d.key === "down" ? formatOptions.plotArea.negativeColor : formatOptions.plotArea.positiveColor
|
|
@@ -53728,7 +54300,15 @@ const WaterfallChart = ({
|
|
|
53728
54300
|
formatOptions.plotArea.dataLabelNumberFormat,
|
|
53729
54301
|
formatOptions.plotArea.dataLabelDecimalPrecision
|
|
53730
54302
|
)
|
|
53731
|
-
).attr(
|
|
54303
|
+
).attr(
|
|
54304
|
+
"x",
|
|
54305
|
+
(d) => xScale(
|
|
54306
|
+
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
54307
|
+
) + xScale.bandwidth() / 2
|
|
54308
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) - 15 : 0).style("font-size", "11px").attr("text-anchor", "middle").attr(
|
|
54309
|
+
"visibility",
|
|
54310
|
+
(d) => d[1] - d[0] !== 0 && yScaleLeft(d[1]) ? "visible" : "hidden"
|
|
54311
|
+
);
|
|
53732
54312
|
textGroups.exit().remove();
|
|
53733
54313
|
}
|
|
53734
54314
|
}
|
|
@@ -53891,7 +54471,11 @@ const WaterfallChart = ({
|
|
|
53891
54471
|
tempWaterFallData.push(waterFallArr2);
|
|
53892
54472
|
if (dataRequiredForStackTotal.length > 0) {
|
|
53893
54473
|
filteredData = dataRequiredForStackTotal;
|
|
53894
|
-
stackTotalData = getStackedData(
|
|
54474
|
+
stackTotalData = getStackedData(
|
|
54475
|
+
filteredDimension,
|
|
54476
|
+
dataRequiredForStackTotal,
|
|
54477
|
+
false
|
|
54478
|
+
);
|
|
53895
54479
|
}
|
|
53896
54480
|
return tempWaterFallData;
|
|
53897
54481
|
} catch (error) {
|
|
@@ -53899,14 +54483,8 @@ const WaterfallChart = ({
|
|
|
53899
54483
|
}
|
|
53900
54484
|
};
|
|
53901
54485
|
const toNumber = (v) => v === null || v === void 0 || v === "" ? 0 : Number(v);
|
|
53902
|
-
const isNonZero = (v) => !Number.isNaN(toNumber(v)) && toNumber(v) !== 0;
|
|
53903
54486
|
const mapAdvancedWaterfallData = (rawData) => {
|
|
53904
|
-
return rawData.filter((d) => d.Column1 && d.Column1 !== "*").
|
|
53905
|
-
const base = toNumber(d.Column3);
|
|
53906
|
-
const up = toNumber(d.Column4);
|
|
53907
|
-
const down = toNumber(d.Column5);
|
|
53908
|
-
return isNonZero(base) || isNonZero(up) || isNonZero(down);
|
|
53909
|
-
}).map((d) => ({
|
|
54487
|
+
return rawData.filter((d) => d.Column1 && d.Column1 !== "*").map((d) => ({
|
|
53910
54488
|
xKey: d.Column1,
|
|
53911
54489
|
base: toNumber(d.Column3),
|
|
53912
54490
|
up: toNumber(d.Column4),
|
|
@@ -53934,9 +54512,13 @@ const TornadoChart = ({
|
|
|
53934
54512
|
const chartId = crypto.randomUUID();
|
|
53935
54513
|
let columnWidth = 0;
|
|
53936
54514
|
const chartType = chartTypes.TornadoChart;
|
|
53937
|
-
const
|
|
54515
|
+
const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart;
|
|
53938
54516
|
const svgRef = useRef();
|
|
53939
|
-
const seriesData = generalizedChartData(
|
|
54517
|
+
const seriesData = generalizedChartData(
|
|
54518
|
+
data.ChartData,
|
|
54519
|
+
data.DimensionList,
|
|
54520
|
+
true
|
|
54521
|
+
);
|
|
53940
54522
|
const dimensionList = data.DimensionList;
|
|
53941
54523
|
const barChart = true;
|
|
53942
54524
|
const isSecondaryAxisDrawn = false;
|
|
@@ -54006,6 +54588,7 @@ const TornadoChart = ({
|
|
|
54006
54588
|
svgRef,
|
|
54007
54589
|
formatOptions
|
|
54008
54590
|
));
|
|
54591
|
+
formatOptions.xAxisLabel.labelTextWrap = false;
|
|
54009
54592
|
preProcessChartData();
|
|
54010
54593
|
({ maxNumberForPrimaryAxis, maxNumberForSecondaryAxis } = customYscaleLabelFormatting$1(
|
|
54011
54594
|
// for calculating primary/secondary axis max number so that we can calculate margin accordinglt
|
|
@@ -54034,7 +54617,7 @@ const TornadoChart = ({
|
|
|
54034
54617
|
maxNumberForSecondaryAxis,
|
|
54035
54618
|
chartJSON.yMaxLeft,
|
|
54036
54619
|
formatOptions,
|
|
54037
|
-
!
|
|
54620
|
+
!isAdvanceAnalyticsChart ? chartJSON.legendList.map((d) => d["alias"]) : chartJSON.legendList.map((d) => d["alias"].split(" - ")[0]),
|
|
54038
54621
|
chartJSON.dimensionList,
|
|
54039
54622
|
chartJSON.yMaxRight,
|
|
54040
54623
|
isSecondaryAxisDrawn,
|
|
@@ -54162,24 +54745,23 @@ const TornadoChart = ({
|
|
|
54162
54745
|
mapSeriesDataWithLegendList(
|
|
54163
54746
|
seriesData,
|
|
54164
54747
|
chartJSON.legendList,
|
|
54165
|
-
|
|
54748
|
+
isAdvanceAnalyticsChart,
|
|
54166
54749
|
formatOptions
|
|
54167
54750
|
),
|
|
54168
54751
|
chartId,
|
|
54169
|
-
staticLegendShape.rectangle
|
|
54170
|
-
chartType
|
|
54752
|
+
staticLegendShape.rectangle
|
|
54171
54753
|
);
|
|
54172
54754
|
};
|
|
54173
|
-
const mapSeriesDataWithLegendList = (seriesData2, legendList,
|
|
54755
|
+
const mapSeriesDataWithLegendList = (seriesData2, legendList, isAdvanceAnalyticsChart2, formatOptions2) => {
|
|
54174
54756
|
return seriesData2.map((series, index2) => {
|
|
54175
54757
|
const legend = legendList[index2];
|
|
54176
54758
|
if (!legend) return { ...series, properties: {} };
|
|
54177
54759
|
let updatedAlias = legend.alias;
|
|
54178
|
-
if (
|
|
54760
|
+
if (isAdvanceAnalyticsChart2 && legend.alias) {
|
|
54179
54761
|
updatedAlias = legend.alias.split(" - ")[0].trim();
|
|
54180
54762
|
}
|
|
54181
54763
|
let updatedColor = legend.color;
|
|
54182
|
-
if (
|
|
54764
|
+
if (isAdvanceAnalyticsChart2 && updatedAlias) {
|
|
54183
54765
|
if (updatedAlias.includes("+ve")) {
|
|
54184
54766
|
updatedColor = formatOptions2.plotArea.plotAreaCalculatedHigh;
|
|
54185
54767
|
} else if (updatedAlias.includes("-ve")) {
|
|
@@ -54200,7 +54782,7 @@ const TornadoChart = ({
|
|
|
54200
54782
|
};
|
|
54201
54783
|
const preProcessChartData = () => {
|
|
54202
54784
|
let processedSeriesData;
|
|
54203
|
-
if (!
|
|
54785
|
+
if (!isAdvanceAnalyticsChart) {
|
|
54204
54786
|
const firstMeasure = seriesData[0]?.properties.currentMeasure;
|
|
54205
54787
|
let yMaxLeft = 0;
|
|
54206
54788
|
let yMaxRight = -Infinity;
|
|
@@ -54234,12 +54816,13 @@ const TornadoChart = ({
|
|
|
54234
54816
|
chartJSON.dimensionList
|
|
54235
54817
|
) : chartJSON.dimensionList;
|
|
54236
54818
|
chartJSON.dimensionList.forEach((dim, i) => {
|
|
54237
|
-
chartJSON.formattedDimensionListMap.set(
|
|
54238
|
-
dim,
|
|
54239
|
-
formatedDimensionList[i]
|
|
54240
|
-
);
|
|
54819
|
+
chartJSON.formattedDimensionListMap.set(dim, formatedDimensionList[i]);
|
|
54241
54820
|
});
|
|
54242
|
-
filteredData = JSON.parse(
|
|
54821
|
+
filteredData = JSON.parse(
|
|
54822
|
+
JSON.stringify(
|
|
54823
|
+
!isAdvanceAnalyticsChart ? processedSeriesData : seriesData
|
|
54824
|
+
)
|
|
54825
|
+
);
|
|
54243
54826
|
filteredDimension = !formatOptions.plotArea.fitChart ? chartJSON.dimensionList.slice(
|
|
54244
54827
|
scrollPosition,
|
|
54245
54828
|
scrollPosition + visibleBars
|
|
@@ -54263,7 +54846,10 @@ const TornadoChart = ({
|
|
|
54263
54846
|
let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
|
|
54264
54847
|
let scaleFactor = formatOptions.annotation.annotationVisibility != "5" ? chartJSON.yMaxLeft / maxValue !== 1 ? Math.abs(chartJSON.yMaxLeft / maxValue) * 100 < 10 ? 3 : 0 : Math.abs(chartJSON.yMaxRight / maxValue) * 100 < 10 ? 3 : 0 : 0;
|
|
54265
54848
|
chartJSON.yMaxLeft = chartJSON.yMaxLeft;
|
|
54266
|
-
xScaleForLegends = linear$1().domain([
|
|
54849
|
+
xScaleForLegends = linear$1().domain([
|
|
54850
|
+
chartJSON.yMaxLeft * (1.2 + (left2 ? scaleFactor : 0)),
|
|
54851
|
+
chartJSON.yMaxRight * (1.2 + (right2 ? scaleFactor : 0))
|
|
54852
|
+
]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
|
|
54267
54853
|
xScale = xScaleForLegends;
|
|
54268
54854
|
calculatedRange = [0, innerWidth2];
|
|
54269
54855
|
getXScale();
|
|
@@ -54326,16 +54912,25 @@ const TornadoChart = ({
|
|
|
54326
54912
|
filteredData.flatMap(
|
|
54327
54913
|
(d) => d.data.map((child) => ({
|
|
54328
54914
|
...child,
|
|
54329
|
-
legendText: !
|
|
54915
|
+
legendText: !isAdvanceAnalyticsChart ? chartJSON.dimensionList[0] == chartTypes.TornadoDefaultEntry ? tornadoEntryName.default : d.legend.split("-")[1]?.trim() ?? d.legend : d.legend.split("ve) - ")[1]?.trim() ?? d.legend,
|
|
54330
54916
|
properties: d.properties
|
|
54331
54917
|
}))
|
|
54332
54918
|
)
|
|
54333
|
-
).enter().append("rect").attr("class", "rect").attr(
|
|
54919
|
+
).enter().append("rect").attr("class", "rect").attr(
|
|
54920
|
+
"y",
|
|
54921
|
+
(d) => d.legendText ? yScaleLeft(d.legendText) : yScaleLeft(chartTypes.TornadoDefaultEntry)
|
|
54922
|
+
).attr("height", yScaleLeft.bandwidth()).attr("x", (d) => d.value >= 0 ? xScale(0) : xScale(d.value)).attr("width", (d) => Math.abs(xScale(d.value) - xScale(0))).style("shape-rendering", "crispEdges").attr(
|
|
54923
|
+
"stroke-dasharray",
|
|
54924
|
+
(d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
54925
|
+
).attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
|
|
54926
|
+
"hoverId",
|
|
54927
|
+
(d) => ((isAdvanceAnalyticsChart ? d.legend.split(" - ")[0] : d["dimension"]) || "Legend").replace(/\s+/g, "-")
|
|
54928
|
+
).attr(
|
|
54334
54929
|
"stroke",
|
|
54335
54930
|
(d) => d.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.properties.stackBorderColor : "none"
|
|
54336
54931
|
).style(
|
|
54337
54932
|
"fill",
|
|
54338
|
-
(d) =>
|
|
54933
|
+
(d) => isAdvanceAnalyticsChart ? d.value > 0 ? positiveBarColor !== commonColors.white ? positiveBarColor : "none" : negativeBarColor !== commonColors.white ? negativeBarColor : "none" : d.properties.color
|
|
54339
54934
|
).on("mousemove", (event2, d) => {
|
|
54340
54935
|
showTooltipOnMouseMove(
|
|
54341
54936
|
[
|
|
@@ -54427,14 +55022,7 @@ const TornadoChart = ({
|
|
|
54427
55022
|
};
|
|
54428
55023
|
const drawColumnChart = () => {
|
|
54429
55024
|
getChartType();
|
|
54430
|
-
initXaxisBar(
|
|
54431
|
-
formatOptions,
|
|
54432
|
-
gTag,
|
|
54433
|
-
xLabel,
|
|
54434
|
-
innerHeight2,
|
|
54435
|
-
innerWidth2,
|
|
54436
|
-
xAxis
|
|
54437
|
-
);
|
|
55025
|
+
initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
|
|
54438
55026
|
commonAnnotations(
|
|
54439
55027
|
filteredData,
|
|
54440
55028
|
yScaleLeft,
|
|
@@ -54460,7 +55048,7 @@ const TornadoChart = ({
|
|
|
54460
55048
|
svg,
|
|
54461
55049
|
yScaleLeft,
|
|
54462
55050
|
columnWidth,
|
|
54463
|
-
|
|
55051
|
+
isAdvanceAnalyticsChart,
|
|
54464
55052
|
isReportEditable,
|
|
54465
55053
|
barChart
|
|
54466
55054
|
);
|