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
|
@@ -10721,11 +10721,29 @@
|
|
|
10721
10721
|
return connectedStyle2;
|
|
10722
10722
|
})(connectedStyle || {});
|
|
10723
10723
|
var staticLineStyle = /* @__PURE__ */ ((staticLineStyle2) => {
|
|
10724
|
-
staticLineStyle2["
|
|
10725
|
-
staticLineStyle2["
|
|
10726
|
-
staticLineStyle2["
|
|
10724
|
+
staticLineStyle2["none"] = "None";
|
|
10725
|
+
staticLineStyle2["solid"] = "Solid";
|
|
10726
|
+
staticLineStyle2["dotted"] = "Dotted";
|
|
10727
|
+
staticLineStyle2["dashed"] = "Dashed";
|
|
10727
10728
|
return staticLineStyle2;
|
|
10728
10729
|
})(staticLineStyle || {});
|
|
10730
|
+
var strokeLineCap = /* @__PURE__ */ ((strokeLineCap2) => {
|
|
10731
|
+
strokeLineCap2["butt"] = "butt";
|
|
10732
|
+
strokeLineCap2["round"] = "round";
|
|
10733
|
+
strokeLineCap2["square"] = "square";
|
|
10734
|
+
return strokeLineCap2;
|
|
10735
|
+
})(strokeLineCap || {});
|
|
10736
|
+
var axisTypes = /* @__PURE__ */ ((axisTypes2) => {
|
|
10737
|
+
axisTypes2["primary"] = "Primary";
|
|
10738
|
+
axisTypes2["secondary"] = "Secondary";
|
|
10739
|
+
return axisTypes2;
|
|
10740
|
+
})(axisTypes || {});
|
|
10741
|
+
var visibilityCondition = /* @__PURE__ */ ((visibilityCondition2) => {
|
|
10742
|
+
visibilityCondition2["visible"] = "visible";
|
|
10743
|
+
visibilityCondition2["hidden"] = "hidden";
|
|
10744
|
+
return visibilityCondition2;
|
|
10745
|
+
})(visibilityCondition || {});
|
|
10746
|
+
const strokeDashValues = "20,10,5,5,5,10";
|
|
10729
10747
|
const ConnecterCurve = {
|
|
10730
10748
|
"1": "",
|
|
10731
10749
|
"2": curveLinear$1,
|
|
@@ -10835,6 +10853,18 @@
|
|
|
10835
10853
|
Median: "Median",
|
|
10836
10854
|
Custom: "Custom"
|
|
10837
10855
|
};
|
|
10856
|
+
var commonColors = /* @__PURE__ */ ((commonColors2) => {
|
|
10857
|
+
commonColors2["white"] = "#FFFFFF";
|
|
10858
|
+
commonColors2["black"] = "#000000";
|
|
10859
|
+
commonColors2["transparent"] = "#FFFFFF00";
|
|
10860
|
+
return commonColors2;
|
|
10861
|
+
})(commonColors || {});
|
|
10862
|
+
var tornadoEntryName = /* @__PURE__ */ ((tornadoEntryName2) => {
|
|
10863
|
+
tornadoEntryName2["positive"] = "Positive";
|
|
10864
|
+
tornadoEntryName2["negative"] = "Negative";
|
|
10865
|
+
tornadoEntryName2["default"] = "defaultEntry";
|
|
10866
|
+
return tornadoEntryName2;
|
|
10867
|
+
})(tornadoEntryName || {});
|
|
10838
10868
|
const defaultChartFormatOptions = {
|
|
10839
10869
|
chartDescription: {
|
|
10840
10870
|
chartDescriptionVisibility: false,
|
|
@@ -10842,10 +10872,10 @@
|
|
|
10842
10872
|
chartDescriptionId: ""
|
|
10843
10873
|
},
|
|
10844
10874
|
chartArea: {
|
|
10845
|
-
chartAreaColor:
|
|
10875
|
+
chartAreaColor: commonColors.white,
|
|
10846
10876
|
chartAreaBorder: false,
|
|
10847
10877
|
chartAreaBorderThickness: "1",
|
|
10848
|
-
chartAreaBorderColor:
|
|
10878
|
+
chartAreaBorderColor: commonColors.black,
|
|
10849
10879
|
chartAreaBorderStyle: "1"
|
|
10850
10880
|
},
|
|
10851
10881
|
chartTitle: {
|
|
@@ -10853,20 +10883,20 @@
|
|
|
10853
10883
|
chartTitleFontSize: "15",
|
|
10854
10884
|
chartTitleFontFamily: "Helvetica",
|
|
10855
10885
|
chartTitleFontStyle: [],
|
|
10856
|
-
chartTitleColor:
|
|
10886
|
+
chartTitleColor: commonColors.black,
|
|
10857
10887
|
chartTitleText: "Chart Title Here",
|
|
10858
10888
|
dynamicTitleText: "",
|
|
10859
10889
|
chartTitleHTML: ""
|
|
10860
10890
|
},
|
|
10861
10891
|
xAxisLabel: {
|
|
10862
10892
|
xAxisLabelVisibility: true,
|
|
10863
|
-
xAxisColor:
|
|
10864
|
-
xAxisColorInverted:
|
|
10893
|
+
xAxisColor: commonColors.black,
|
|
10894
|
+
xAxisColorInverted: commonColors.transparent,
|
|
10865
10895
|
xAxisWidth: "0.5",
|
|
10866
10896
|
xAxisLabelFontSize: "11",
|
|
10867
10897
|
xAxisLabelFontFamily: "Helvetica",
|
|
10868
10898
|
xAxisLabelFontStyle: [],
|
|
10869
|
-
xAxisLabelColor:
|
|
10899
|
+
xAxisLabelColor: commonColors.black,
|
|
10870
10900
|
xAxisNumberFormat: "MMM-YY",
|
|
10871
10901
|
// "DD-MM-YYYY",
|
|
10872
10902
|
xAxisQuarterFormat: "Long",
|
|
@@ -10898,7 +10928,7 @@
|
|
|
10898
10928
|
xAxisTitleFontSize: "11",
|
|
10899
10929
|
xAxisTitleFontFamily: "Helvetica",
|
|
10900
10930
|
xAxisTitleFontStyle: [],
|
|
10901
|
-
xAxisTitleColor:
|
|
10931
|
+
xAxisTitleColor: commonColors.black,
|
|
10902
10932
|
xAxisTitleText: "Dimension",
|
|
10903
10933
|
xAxisDynamicTitleText: "",
|
|
10904
10934
|
xAxisTitleHTML: ""
|
|
@@ -10909,14 +10939,14 @@
|
|
|
10909
10939
|
},
|
|
10910
10940
|
yAxisLabel: {
|
|
10911
10941
|
yAxisLabelVisibility: true,
|
|
10912
|
-
yAxisColor:
|
|
10913
|
-
//
|
|
10914
|
-
yAxisColorInverted:
|
|
10942
|
+
yAxisColor: commonColors.transparent,
|
|
10943
|
+
//commonColors.black,
|
|
10944
|
+
yAxisColorInverted: commonColors.black,
|
|
10915
10945
|
yAxisWidth: "0.5",
|
|
10916
10946
|
yAxisLabelFontSize: "11",
|
|
10917
10947
|
yAxisLabelFontFamily: "Helvetica",
|
|
10918
10948
|
yAxisLabelFontStyle: [],
|
|
10919
|
-
yAxisLabelColor:
|
|
10949
|
+
yAxisLabelColor: commonColors.black,
|
|
10920
10950
|
yAxisNumberFormat: ",",
|
|
10921
10951
|
yAxisDisplayUnits: "Auto",
|
|
10922
10952
|
//"None",
|
|
@@ -10942,19 +10972,19 @@
|
|
|
10942
10972
|
yAxisTitleFontSize: "11",
|
|
10943
10973
|
yAxisTitleFontFamily: "Helvetica",
|
|
10944
10974
|
yAxisTitleFontStyle: [],
|
|
10945
|
-
yAxisTitleColor:
|
|
10975
|
+
yAxisTitleColor: commonColors.black,
|
|
10946
10976
|
yAxisTitleText: "Measure",
|
|
10947
10977
|
yAxisDynamicTitleText: "",
|
|
10948
10978
|
yAxisTitleHTML: ""
|
|
10949
10979
|
},
|
|
10950
10980
|
secondaryYAxisLabel: {
|
|
10951
10981
|
secondaryYAxisLabelVisibility: true,
|
|
10952
|
-
secondaryYAxisColor:
|
|
10982
|
+
secondaryYAxisColor: commonColors.black,
|
|
10953
10983
|
secondaryYAxisWidth: "0.5",
|
|
10954
10984
|
secondaryYAxisLabelFontSize: "11",
|
|
10955
10985
|
secondaryYAxisLabelFontFamily: "Helvetica",
|
|
10956
10986
|
secondaryYAxisLabelFontStyle: [],
|
|
10957
|
-
secondaryYAxisLabelColor:
|
|
10987
|
+
secondaryYAxisLabelColor: commonColors.black,
|
|
10958
10988
|
secondaryYAxisNumberFormat: ",",
|
|
10959
10989
|
secondaryYAxisDisplayUnits: "None",
|
|
10960
10990
|
secondaryYAxisDisplayUnitsLabel: false,
|
|
@@ -10972,7 +11002,7 @@
|
|
|
10972
11002
|
secondaryYAxisTitleFontSize: "11",
|
|
10973
11003
|
secondaryYAxisTitleFontFamily: "Helvetica",
|
|
10974
11004
|
secondaryYAxisTitleFontStyle: [],
|
|
10975
|
-
secondaryYAxisTitleColor:
|
|
11005
|
+
secondaryYAxisTitleColor: commonColors.black,
|
|
10976
11006
|
secondaryYAxisTitleText: "Measure",
|
|
10977
11007
|
secondaryYAxisDynamicTitleText: "",
|
|
10978
11008
|
secondaryYAxisTitleHTML: ""
|
|
@@ -10997,17 +11027,17 @@
|
|
|
10997
11027
|
legendFontStyle: [],
|
|
10998
11028
|
legendBorder: false,
|
|
10999
11029
|
legendBorderThickness: "1",
|
|
11000
|
-
legendBorderColor:
|
|
11001
|
-
vennLabelColor:
|
|
11030
|
+
legendBorderColor: commonColors.black,
|
|
11031
|
+
vennLabelColor: commonColors.black,
|
|
11002
11032
|
onHoverEffect: true,
|
|
11003
11033
|
legendColorMode: "1",
|
|
11004
|
-
legendSelectedUnicolor:
|
|
11034
|
+
legendSelectedUnicolor: commonColors.black
|
|
11005
11035
|
},
|
|
11006
11036
|
plotArea: {
|
|
11007
|
-
plotAreaColor:
|
|
11037
|
+
plotAreaColor: commonColors.white,
|
|
11008
11038
|
plotAreaBorder: false,
|
|
11009
11039
|
plotAreaBorderThickness: "1",
|
|
11010
|
-
plotAreaBorderColor:
|
|
11040
|
+
plotAreaBorderColor: commonColors.black,
|
|
11011
11041
|
plotAreaGapWidth: "50",
|
|
11012
11042
|
plotAreaSeriesWidth: "50",
|
|
11013
11043
|
plotAreaBarWidth: "50",
|
|
@@ -11028,21 +11058,21 @@
|
|
|
11028
11058
|
dataLabelsforMaps: false,
|
|
11029
11059
|
dataLabelPosition: "1",
|
|
11030
11060
|
dataLabelSize: "12",
|
|
11031
|
-
dataLabelValueColor:
|
|
11061
|
+
dataLabelValueColor: commonColors.black,
|
|
11032
11062
|
dataLabelValueFontSize: "11",
|
|
11033
11063
|
dataLabelValueFontFamily: "Helvetica",
|
|
11034
11064
|
dataLabelValueFontStyle: [],
|
|
11035
11065
|
dataLabelNumberFormat: ",",
|
|
11036
11066
|
dataLabelNumberFormatProgress: ",.0%",
|
|
11037
11067
|
axialAxis: true,
|
|
11038
|
-
axialAxisDataLabelColor:
|
|
11068
|
+
axialAxisDataLabelColor: commonColors.black,
|
|
11039
11069
|
axialAxisDataLabelFontSize: "11",
|
|
11040
11070
|
axialAxisDataLabelFontFamily: "Helvetica",
|
|
11041
11071
|
axialAxisDataLabelFontStyle: [],
|
|
11042
11072
|
axialAxisDataLabelNumberFormat: ",",
|
|
11043
11073
|
axialAxisDataLabelDecimalPrecision: "2",
|
|
11044
11074
|
dataLabelDecimalPrecision: "2",
|
|
11045
|
-
dataLabelNameColor:
|
|
11075
|
+
dataLabelNameColor: commonColors.black,
|
|
11046
11076
|
dataLabelNameFontSize: "11",
|
|
11047
11077
|
dataLabelNameFontFamily: "Helvetica",
|
|
11048
11078
|
dataLabelNameFontStyle: [],
|
|
@@ -11056,7 +11086,7 @@
|
|
|
11056
11086
|
arcTransition: true,
|
|
11057
11087
|
innerRadiusForSpeedometer: "30",
|
|
11058
11088
|
ticks: "3",
|
|
11059
|
-
pointerColor:
|
|
11089
|
+
pointerColor: commonColors.black,
|
|
11060
11090
|
pointerHeadLength: "8",
|
|
11061
11091
|
totalColor: "#41a5b4",
|
|
11062
11092
|
positiveColor: "#9fb700",
|
|
@@ -11067,14 +11097,14 @@
|
|
|
11067
11097
|
bubbleSizeIndex: "1",
|
|
11068
11098
|
scatterSizeIndex: "4",
|
|
11069
11099
|
hideZeroValues: false,
|
|
11070
|
-
boxLineColor:
|
|
11100
|
+
boxLineColor: commonColors.black,
|
|
11071
11101
|
boxLineWidth: "1",
|
|
11072
11102
|
boxOutlier: false,
|
|
11073
11103
|
boxOutlierRadius: "3",
|
|
11074
11104
|
plotAreaShowTrendLine: false,
|
|
11075
11105
|
plotAreaTrendLine: "Linear",
|
|
11076
11106
|
plotAreaTrendLineWidth: "1",
|
|
11077
|
-
plotAreaTrendLineColor:
|
|
11107
|
+
plotAreaTrendLineColor: commonColors.black,
|
|
11078
11108
|
opacity: "0.5",
|
|
11079
11109
|
plotAreaCalculatedHigh: "#00FF00",
|
|
11080
11110
|
plotAreaCalculatedLow: "#FF0000",
|
|
@@ -11088,7 +11118,7 @@
|
|
|
11088
11118
|
totalAlias: false,
|
|
11089
11119
|
totalAliasText: "",
|
|
11090
11120
|
refLineBorderThickness: "1",
|
|
11091
|
-
refLineBorderColor:
|
|
11121
|
+
refLineBorderColor: commonColors.black,
|
|
11092
11122
|
flipPyramid: false,
|
|
11093
11123
|
opacityforProgressScale: "0.2",
|
|
11094
11124
|
opacityforProgressGoal: "1",
|
|
@@ -11115,7 +11145,7 @@
|
|
|
11115
11145
|
markerSize: "1",
|
|
11116
11146
|
markerShape: "Circle",
|
|
11117
11147
|
lineWidth: "1.5",
|
|
11118
|
-
markerColor:
|
|
11148
|
+
markerColor: commonColors.black
|
|
11119
11149
|
},
|
|
11120
11150
|
annotation: {
|
|
11121
11151
|
annotationDraggable: false,
|
|
@@ -11127,7 +11157,7 @@
|
|
|
11127
11157
|
annotationVisibility: "5",
|
|
11128
11158
|
annotationPosition: "1",
|
|
11129
11159
|
annotationNumberFormat: ",",
|
|
11130
|
-
annotationColor:
|
|
11160
|
+
annotationColor: commonColors.black,
|
|
11131
11161
|
annotationFontSize: "9",
|
|
11132
11162
|
annotationFontFamily: "Helvetica",
|
|
11133
11163
|
annotationFontStyle: [],
|
|
@@ -11148,7 +11178,7 @@
|
|
|
11148
11178
|
connectorStyle: "solid",
|
|
11149
11179
|
dataLabelsCoordinates: [],
|
|
11150
11180
|
totalNumberFormat: ",",
|
|
11151
|
-
totalColor:
|
|
11181
|
+
totalColor: commonColors.black,
|
|
11152
11182
|
totalFontSize: "9",
|
|
11153
11183
|
totalFontFamily: "Helvetica",
|
|
11154
11184
|
totalFontStyle: [],
|
|
@@ -11182,7 +11212,7 @@
|
|
|
11182
11212
|
curviness: "0.5",
|
|
11183
11213
|
nodesBorderVisibility: true,
|
|
11184
11214
|
nodesBorderThickness: "1",
|
|
11185
|
-
nodesBorderColor:
|
|
11215
|
+
nodesBorderColor: commonColors.black,
|
|
11186
11216
|
nodeBorderStyle: "solid",
|
|
11187
11217
|
nodesLabelVisibility: true,
|
|
11188
11218
|
nodesLabelFontSize: "11",
|
|
@@ -11190,7 +11220,7 @@
|
|
|
11190
11220
|
nodesLabelFontStyle: [],
|
|
11191
11221
|
nodeLabelNumberFormat: ",",
|
|
11192
11222
|
nodeLabelDecimalPrecision: "2",
|
|
11193
|
-
nodesLabelColor:
|
|
11223
|
+
nodesLabelColor: commonColors.black,
|
|
11194
11224
|
nodesLabelDisplayUnits: "None",
|
|
11195
11225
|
nodesLabelOverlap: false,
|
|
11196
11226
|
nodesLabelWrap: true,
|
|
@@ -11198,13 +11228,13 @@
|
|
|
11198
11228
|
nodeWidth: "12",
|
|
11199
11229
|
nodeType: "rectangle",
|
|
11200
11230
|
nodesBorderRadius: "1",
|
|
11201
|
-
dataLabelValueColor:
|
|
11231
|
+
dataLabelValueColor: commonColors.black,
|
|
11202
11232
|
dataLabelValueFontSize: "11",
|
|
11203
11233
|
dataLabelValueFontFamily: "Arial",
|
|
11204
11234
|
dataLabelNumberFormat: ",",
|
|
11205
11235
|
dataLabelDecimalPrecision: "2",
|
|
11206
11236
|
dataLabelValueStyle: [],
|
|
11207
|
-
nodesLabelFontColor:
|
|
11237
|
+
nodesLabelFontColor: commonColors.black,
|
|
11208
11238
|
nodesDisplayUnits: "None",
|
|
11209
11239
|
percentageVisibility: false,
|
|
11210
11240
|
nodesLabelOverflow: true
|
|
@@ -11220,7 +11250,7 @@
|
|
|
11220
11250
|
binsCalculationValue: "3",
|
|
11221
11251
|
binsBorderVisibility: false,
|
|
11222
11252
|
binsBorderThickness: "1",
|
|
11223
|
-
binsBorderColor:
|
|
11253
|
+
binsBorderColor: commonColors.black,
|
|
11224
11254
|
binsBorderOpacity: "0.5"
|
|
11225
11255
|
},
|
|
11226
11256
|
connector: {
|
|
@@ -11236,15 +11266,15 @@
|
|
|
11236
11266
|
connectorNumberFormat: ",",
|
|
11237
11267
|
connectorLineThickness: "1",
|
|
11238
11268
|
connectorLineColor: "#080808",
|
|
11239
|
-
connectorMarkerColor:
|
|
11240
|
-
connectorFontColor:
|
|
11269
|
+
connectorMarkerColor: commonColors.black,
|
|
11270
|
+
connectorFontColor: commonColors.black,
|
|
11241
11271
|
connectorDecimalPrecision: "2",
|
|
11242
11272
|
connectorDisplayUnits: "None",
|
|
11243
11273
|
connectorStyle: "solid",
|
|
11244
11274
|
lineType: "straight",
|
|
11245
11275
|
connectorType: "straight",
|
|
11246
11276
|
connectorColorOption: "Discrete",
|
|
11247
|
-
connectorUniformLineColor:
|
|
11277
|
+
connectorUniformLineColor: commonColors.black
|
|
11248
11278
|
},
|
|
11249
11279
|
footerNote: {
|
|
11250
11280
|
footerNoteVisibility: false,
|
|
@@ -11252,28 +11282,28 @@
|
|
|
11252
11282
|
footerNoteFontSize: "11",
|
|
11253
11283
|
footerNoteFontFamily: "Helvetica",
|
|
11254
11284
|
footerNoteFontStyle: [],
|
|
11255
|
-
footerNoteFontColor:
|
|
11285
|
+
footerNoteFontColor: commonColors.black,
|
|
11256
11286
|
footerNoteBorder: false,
|
|
11257
11287
|
footerNoteBorderThickness: "1",
|
|
11258
|
-
footerNoteBorderColor:
|
|
11288
|
+
footerNoteBorderColor: commonColors.black
|
|
11259
11289
|
},
|
|
11260
11290
|
pieofPie: {
|
|
11261
11291
|
pieOfPieDataLabels: true,
|
|
11262
11292
|
pieOfPieDataLabelValue: true,
|
|
11263
11293
|
pieOfPieAbsoluteValue: false,
|
|
11264
|
-
pieOfPieValueColor:
|
|
11294
|
+
pieOfPieValueColor: commonColors.black,
|
|
11265
11295
|
pieOfPieValueFontSize: "11",
|
|
11266
11296
|
pieOfPieValueFontFamily: "Helvetica",
|
|
11267
11297
|
pieOfPieValueFontStyle: [],
|
|
11268
11298
|
pieOfPieNumberFormat: ",",
|
|
11269
11299
|
pieOfPieName: true,
|
|
11270
|
-
pieOfPieNameColor:
|
|
11300
|
+
pieOfPieNameColor: commonColors.black,
|
|
11271
11301
|
pieOfPieNameFontSize: "11",
|
|
11272
11302
|
pieOfPieNameFontFamily: "Helvetica",
|
|
11273
11303
|
pieOfPieNameFontStyle: [],
|
|
11274
11304
|
pieOfPieRadius: 90,
|
|
11275
11305
|
pieOfPieLineWidth: "1",
|
|
11276
|
-
pieOfPieLineColor:
|
|
11306
|
+
pieOfPieLineColor: commonColors.black,
|
|
11277
11307
|
pointerValueDecimalPrecision: "2",
|
|
11278
11308
|
displayUnits: "None"
|
|
11279
11309
|
},
|
|
@@ -11338,7 +11368,7 @@
|
|
|
11338
11368
|
pointerValueFontSize: "11",
|
|
11339
11369
|
pointerValueFontFamily: "Helvetica",
|
|
11340
11370
|
pointerValueFontStyle: [],
|
|
11341
|
-
pointerValueColor:
|
|
11371
|
+
pointerValueColor: commonColors.black,
|
|
11342
11372
|
pointerValueAlias: false,
|
|
11343
11373
|
pointerValueAliasText: ""
|
|
11344
11374
|
},
|
|
@@ -11356,8 +11386,8 @@
|
|
|
11356
11386
|
},
|
|
11357
11387
|
bubbleformatting: {
|
|
11358
11388
|
showBubble: true,
|
|
11359
|
-
bubbleColor:
|
|
11360
|
-
bubbleBorderColor:
|
|
11389
|
+
bubbleColor: commonColors.black,
|
|
11390
|
+
bubbleBorderColor: commonColors.black,
|
|
11361
11391
|
bubbleBorderWidth: "1",
|
|
11362
11392
|
bubbleOpacity: "4"
|
|
11363
11393
|
},
|
|
@@ -11368,7 +11398,7 @@
|
|
|
11368
11398
|
},
|
|
11369
11399
|
columnBreakLine: {
|
|
11370
11400
|
breakLineVisibility: true,
|
|
11371
|
-
breakLineColor:
|
|
11401
|
+
breakLineColor: commonColors.black,
|
|
11372
11402
|
breakLineWidth: "1",
|
|
11373
11403
|
breakLineStyle: "Double"
|
|
11374
11404
|
},
|
|
@@ -11382,7 +11412,7 @@
|
|
|
11382
11412
|
column: {
|
|
11383
11413
|
stackBorderVisibility: false,
|
|
11384
11414
|
stackBorderWidth: "1",
|
|
11385
|
-
stackBorderColor:
|
|
11415
|
+
stackBorderColor: commonColors.black,
|
|
11386
11416
|
stackBorderStyle: "0"
|
|
11387
11417
|
},
|
|
11388
11418
|
line: {
|
|
@@ -11397,7 +11427,7 @@
|
|
|
11397
11427
|
seriesLabelFontFamily: "Helvetica",
|
|
11398
11428
|
seriesLabelFontSize: "11",
|
|
11399
11429
|
seriesLabelFontStyle: [],
|
|
11400
|
-
seriesLabelBackgroundColor:
|
|
11430
|
+
seriesLabelBackgroundColor: commonColors.transparent,
|
|
11401
11431
|
seriesLabelPosition: "Right"
|
|
11402
11432
|
},
|
|
11403
11433
|
dataTableProperties: {
|
|
@@ -11408,7 +11438,7 @@
|
|
|
11408
11438
|
dataTableNumberFormat: ",",
|
|
11409
11439
|
dataTableDecimalPrecision: "2",
|
|
11410
11440
|
dataTableDisplayUnits: "None",
|
|
11411
|
-
dataTableLabelColor:
|
|
11441
|
+
dataTableLabelColor: commonColors.black
|
|
11412
11442
|
},
|
|
11413
11443
|
dataTableOuterBorder: {
|
|
11414
11444
|
borderButtonVisibility: true,
|
|
@@ -11473,6 +11503,10 @@
|
|
|
11473
11503
|
chartTypes2["PyramidChart"] = "PyramidChart";
|
|
11474
11504
|
chartTypes2["ProgressChart"] = "ProgressChart";
|
|
11475
11505
|
chartTypes2["RadialBarChart"] = "RadialBarChart";
|
|
11506
|
+
chartTypes2["CombinationLine"] = "CombinationLine";
|
|
11507
|
+
chartTypes2["CombinationArea"] = "CombinationArea";
|
|
11508
|
+
chartTypes2["CombinationStackArea"] = "CombinationStackArea";
|
|
11509
|
+
chartTypes2["TornadoDefaultEntry"] = "defaultEntry";
|
|
11476
11510
|
return chartTypes2;
|
|
11477
11511
|
})(chartTypes || {});
|
|
11478
11512
|
const connecterCurve = {
|
|
@@ -11527,7 +11561,7 @@
|
|
|
11527
11561
|
var boundingRect = div.getBoundingClientRect();
|
|
11528
11562
|
var width = boundingRect.width;
|
|
11529
11563
|
var height = boundingRect.height;
|
|
11530
|
-
if (rotationDegree) {
|
|
11564
|
+
if (rotationDegree != null) {
|
|
11531
11565
|
div.style.transform = `rotate(${rotationDegree}deg)`;
|
|
11532
11566
|
boundingRect = div.getBoundingClientRect();
|
|
11533
11567
|
div.remove();
|
|
@@ -11597,8 +11631,7 @@
|
|
|
11597
11631
|
"Helvetica"
|
|
11598
11632
|
)[1] : 0;
|
|
11599
11633
|
yTitle = yTitle > width * 0.1 ? width * 0.1 : yTitle;
|
|
11600
|
-
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) +
|
|
11601
|
-
yLabel += 8;
|
|
11634
|
+
let yLabel = formatOptions.yAxisLabel.yAxisLabelVisibility ? responsiveYaxisMargin(maxNumberForPrimaryAxis, yMaxLeft, formatOptions, false, isNormalizedChart) + 5 : getYAxisLabel(formatOptions, max$2(legendList, (d) => d?.length || 0) || 0) + 10;
|
|
11602
11635
|
let secondaryYLabel = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? responsiveYaxisMargin(
|
|
11603
11636
|
maxNumberForSecondaryAxis,
|
|
11604
11637
|
yMaxRight,
|
|
@@ -11665,7 +11698,7 @@
|
|
|
11665
11698
|
left2 = yAxisRelatedMargin + 5;
|
|
11666
11699
|
break;
|
|
11667
11700
|
case staticLegendPosition.top:
|
|
11668
|
-
right2 =
|
|
11701
|
+
right2 = 15 + secondaryExtra;
|
|
11669
11702
|
left2 = yAxisRelatedMargin + 5;
|
|
11670
11703
|
break;
|
|
11671
11704
|
case staticLegendPosition.right:
|
|
@@ -12241,7 +12274,7 @@
|
|
|
12241
12274
|
formatOptions.plotArea.plotAreaBorder && !chartsWithoutPlotArea.includes(chartType) ? formatOptions.plotArea.plotAreaBorderColor : "none"
|
|
12242
12275
|
).attr("stroke-width", formatOptions.plotArea.plotAreaBorderThickness).attr(
|
|
12243
12276
|
"fill",
|
|
12244
|
-
formatOptions.plotArea.plotAreaColor !==
|
|
12277
|
+
formatOptions.plotArea.plotAreaColor !== commonColors.white && !chartsWithoutPlotArea.includes(chartType) ? formatOptions.plotArea.plotAreaColor : "none"
|
|
12245
12278
|
);
|
|
12246
12279
|
} catch (error) {
|
|
12247
12280
|
throw error;
|
|
@@ -12263,7 +12296,7 @@
|
|
|
12263
12296
|
);
|
|
12264
12297
|
let yAxisLabelArray = [];
|
|
12265
12298
|
let customTickValue;
|
|
12266
|
-
const isTornadoChart =
|
|
12299
|
+
const isTornadoChart = chartJSON.chartType === chartTypes.TornadoChart;
|
|
12267
12300
|
if (isTornadoChart) {
|
|
12268
12301
|
const maxAbs = Math.max(Math.abs(Ymin), Math.abs(Ymax));
|
|
12269
12302
|
const finalMax = customYaxisMaxValue || maxAbs;
|
|
@@ -12352,31 +12385,21 @@
|
|
|
12352
12385
|
}
|
|
12353
12386
|
function getLabelsFromAlgo(dataMin, dataMax, axisLengthPx, labelWidthPx = 80) {
|
|
12354
12387
|
const dataRange = dataMax - dataMin;
|
|
12355
|
-
if (dataRange
|
|
12356
|
-
return [dataMin];
|
|
12388
|
+
if (!isFinite(dataRange) || Math.abs(dataRange) < 1e-12) {
|
|
12389
|
+
return [Number(dataMin.toFixed(12))];
|
|
12357
12390
|
}
|
|
12358
12391
|
const maxLabels = dataRange < 10 ? 10 : Math.max(2, Math.floor(axisLengthPx / labelWidthPx));
|
|
12359
12392
|
const rawInterval = dataRange / maxLabels;
|
|
12360
12393
|
const magnitude = Math.pow(10, Math.floor(Math.log10(rawInterval)));
|
|
12361
12394
|
const niceNumbers = [1, 1.5, 2, 2.5, 5, 10];
|
|
12362
|
-
let interval2 =
|
|
12363
|
-
|
|
12364
|
-
const candidate = n * magnitude;
|
|
12365
|
-
if (Math.ceil(dataRange / candidate) <= maxLabels) {
|
|
12366
|
-
interval2 = candidate;
|
|
12367
|
-
break;
|
|
12368
|
-
}
|
|
12369
|
-
}
|
|
12370
|
-
if (interval2 === null) {
|
|
12371
|
-
interval2 = niceNumbers[niceNumbers.length - 1] * magnitude;
|
|
12372
|
-
}
|
|
12395
|
+
let interval2 = niceNumbers.map((n) => n * magnitude).find((i) => Math.ceil(dataRange / i) <= maxLabels);
|
|
12396
|
+
if (!interval2) interval2 = niceNumbers.at(-1) * magnitude;
|
|
12373
12397
|
const minLabel = Math.floor(dataMin / interval2) * interval2;
|
|
12374
12398
|
const maxLabel = Math.ceil(dataMax / interval2) * interval2;
|
|
12375
|
-
const
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
labels
|
|
12379
|
-
current += interval2;
|
|
12399
|
+
const steps = Math.round((maxLabel - minLabel) / interval2);
|
|
12400
|
+
const labels = new Array(steps + 1);
|
|
12401
|
+
for (let i = 0; i <= steps; i++) {
|
|
12402
|
+
labels[i] = Number((minLabel + i * interval2).toFixed(12));
|
|
12380
12403
|
}
|
|
12381
12404
|
return labels;
|
|
12382
12405
|
}
|
|
@@ -12388,13 +12411,13 @@
|
|
|
12388
12411
|
dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2
|
|
12389
12412
|
).attr("width", yLabel).attr(
|
|
12390
12413
|
"fill",
|
|
12391
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
12414
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12392
12415
|
);
|
|
12393
12416
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
12394
12417
|
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");
|
|
12395
12418
|
yAxisG.selectAll("text").style(
|
|
12396
12419
|
"fill",
|
|
12397
|
-
formatOptions.yAxisLabel.yAxisLabelColor !==
|
|
12420
|
+
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
12398
12421
|
).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(
|
|
12399
12422
|
"text-decoration",
|
|
12400
12423
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -12414,12 +12437,12 @@
|
|
|
12414
12437
|
let fontStyle = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontStyle;
|
|
12415
12438
|
gTag.append("rect").attr("transform", `translate(${innerWidth2},0)`).attr("height", dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2).attr("width", secondaryYLabel).attr(
|
|
12416
12439
|
"fill",
|
|
12417
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !==
|
|
12440
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12418
12441
|
);
|
|
12419
12442
|
const secondaryYAxisG = gTag.append("g").call(yAxisRight).attr("transform", `translate(${innerWidth2},0)`);
|
|
12420
12443
|
secondaryYAxisG.selectAll("text").style(
|
|
12421
12444
|
"fill",
|
|
12422
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !==
|
|
12445
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor : "none"
|
|
12423
12446
|
).style(
|
|
12424
12447
|
"font-size",
|
|
12425
12448
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontSize
|
|
@@ -12531,7 +12554,7 @@
|
|
|
12531
12554
|
`translate(1,${xaxisLabelPosition === "0" ? dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2 : xaxisLabelPosition === "1" ? -xLabel : yScaleLeft(0)})`
|
|
12532
12555
|
).attr("height", xLabel).attr("width", innerWidth2).attr(
|
|
12533
12556
|
"fill",
|
|
12534
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
12557
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
12535
12558
|
);
|
|
12536
12559
|
const XaxisG = xAxisTag.append("g").attr(
|
|
12537
12560
|
"transform",
|
|
@@ -12812,6 +12835,7 @@
|
|
|
12812
12835
|
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) {
|
|
12813
12836
|
try {
|
|
12814
12837
|
let annotationType = formatOptions.annotation.annotationType ?? "1";
|
|
12838
|
+
let annotationPosition = formatOptions.annotation.annotationPosition.toString() != "4" ? formatOptions.annotation.annotationPosition : null;
|
|
12815
12839
|
if (formatOptions.annotation.annotationVisibility) {
|
|
12816
12840
|
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
12817
12841
|
let labelData = [];
|
|
@@ -12838,61 +12862,77 @@
|
|
|
12838
12862
|
switch (labelType) {
|
|
12839
12863
|
case "2":
|
|
12840
12864
|
chartData.forEach(
|
|
12841
|
-
(d) =>
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12865
|
+
(d) => {
|
|
12866
|
+
if (d.data[0])
|
|
12867
|
+
labelData.push({
|
|
12868
|
+
Dimension: d.data[0].dimension,
|
|
12869
|
+
Measure: d.data[0].value,
|
|
12870
|
+
Legend: d.data[0].legend,
|
|
12871
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12872
|
+
Labelcolor: d.properties.labelColor,
|
|
12873
|
+
Axis: d.properties.axis
|
|
12874
|
+
});
|
|
12875
|
+
}
|
|
12849
12876
|
);
|
|
12850
12877
|
break;
|
|
12851
12878
|
case "3":
|
|
12852
12879
|
chartData.forEach(
|
|
12853
|
-
(d) =>
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12880
|
+
(d) => {
|
|
12881
|
+
if (d.data[d.data.length - 1]) {
|
|
12882
|
+
labelData.push({
|
|
12883
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12884
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12885
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12886
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12887
|
+
Labelcolor: d.properties.labelColor,
|
|
12888
|
+
Axis: d.properties.axis
|
|
12889
|
+
});
|
|
12890
|
+
}
|
|
12891
|
+
}
|
|
12861
12892
|
);
|
|
12862
12893
|
break;
|
|
12863
12894
|
case "4":
|
|
12864
12895
|
chartData.forEach(
|
|
12865
|
-
(d) =>
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12896
|
+
(d) => {
|
|
12897
|
+
if (d.data[0])
|
|
12898
|
+
labelData.push({
|
|
12899
|
+
Dimension: d.data[0].dimension,
|
|
12900
|
+
Measure: d.data[0].value,
|
|
12901
|
+
Legend: d.data[0].legend,
|
|
12902
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12903
|
+
Labelcolor: d.properties.labelColor,
|
|
12904
|
+
Axis: d.properties.axis
|
|
12905
|
+
});
|
|
12906
|
+
}
|
|
12873
12907
|
);
|
|
12874
12908
|
chartData.forEach(
|
|
12875
|
-
(d) =>
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12909
|
+
(d) => {
|
|
12910
|
+
if (d.data[d.data.length - 1])
|
|
12911
|
+
labelData.push({
|
|
12912
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12913
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12914
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12915
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12916
|
+
Labelcolor: d.properties.labelColor,
|
|
12917
|
+
Axis: d.properties.axis
|
|
12918
|
+
});
|
|
12919
|
+
}
|
|
12883
12920
|
);
|
|
12884
12921
|
break;
|
|
12885
12922
|
case "1":
|
|
12886
12923
|
for (let i = 0; i < chartData[0].data.length; i++) {
|
|
12887
12924
|
chartData.forEach(
|
|
12888
|
-
(d) =>
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12925
|
+
(d) => {
|
|
12926
|
+
if (d.data[i])
|
|
12927
|
+
labelData.push({
|
|
12928
|
+
Dimension: d.data[i].dimension,
|
|
12929
|
+
Measure: d.data[i].value,
|
|
12930
|
+
Legend: d.data[i].legend,
|
|
12931
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12932
|
+
Labelcolor: d.properties.labelColor,
|
|
12933
|
+
Axis: d.properties.axis
|
|
12934
|
+
});
|
|
12935
|
+
}
|
|
12896
12936
|
);
|
|
12897
12937
|
}
|
|
12898
12938
|
break;
|
|
@@ -12901,60 +12941,65 @@
|
|
|
12901
12941
|
break;
|
|
12902
12942
|
case "6":
|
|
12903
12943
|
chartData.forEach((d) => {
|
|
12904
|
-
let annotationVisibility = d.properties.
|
|
12944
|
+
let annotationVisibility = d.properties.annotation.toString();
|
|
12905
12945
|
switch (annotationVisibility) {
|
|
12906
12946
|
case "1":
|
|
12907
12947
|
for (let i = 0; i < chartData[0].data.length; i++) {
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12948
|
+
if (d.data[i])
|
|
12949
|
+
labelData.push({
|
|
12950
|
+
Dimension: d.data[i].dimension,
|
|
12951
|
+
Measure: d.data[i].value,
|
|
12952
|
+
Legend: d.data[i].legend,
|
|
12953
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12954
|
+
Labelcolor: d.properties.labelColor,
|
|
12955
|
+
Axis: d.properties.axis
|
|
12956
|
+
});
|
|
12916
12957
|
}
|
|
12917
12958
|
break;
|
|
12918
12959
|
case "2":
|
|
12919
12960
|
labelData;
|
|
12920
12961
|
break;
|
|
12921
12962
|
case "3":
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12963
|
+
if (d.data[0])
|
|
12964
|
+
labelData.push({
|
|
12965
|
+
Dimension: d.data[0].dimension,
|
|
12966
|
+
Measure: d.data[0].value,
|
|
12967
|
+
Legend: d.data[0].legend,
|
|
12968
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12969
|
+
Labelcolor: d.properties.labelColor,
|
|
12970
|
+
Axis: d.properties.axis
|
|
12971
|
+
});
|
|
12930
12972
|
break;
|
|
12931
12973
|
case "4":
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12974
|
+
if (d.data[d.data.length - 1])
|
|
12975
|
+
labelData.push({
|
|
12976
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12977
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12978
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12979
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12980
|
+
Labelcolor: d.properties.labelColor,
|
|
12981
|
+
Axis: d.properties.axis
|
|
12982
|
+
});
|
|
12940
12983
|
break;
|
|
12941
12984
|
case "5":
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12985
|
+
if (d.data[0])
|
|
12986
|
+
labelData.push({
|
|
12987
|
+
Dimension: d.data[0].dimension,
|
|
12988
|
+
Measure: d.data[0].value,
|
|
12989
|
+
Legend: d.data[0].legend,
|
|
12990
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
12991
|
+
Labelcolor: d.properties.labelColor,
|
|
12992
|
+
Axis: d.properties.axis
|
|
12993
|
+
});
|
|
12994
|
+
if (d.data[d.data.length - 1])
|
|
12995
|
+
labelData.push({
|
|
12996
|
+
Dimension: d.data[d.data.length - 1].dimension,
|
|
12997
|
+
Measure: d.data[d.data.length - 1].value,
|
|
12998
|
+
Legend: d.data[d.data.length - 1].legend,
|
|
12999
|
+
LabelPosition: annotationPosition ? annotationPosition : d.properties.annotationPosition,
|
|
13000
|
+
Labelcolor: d.properties.labelColor,
|
|
13001
|
+
Axis: d.properties.axis
|
|
13002
|
+
});
|
|
12958
13003
|
break;
|
|
12959
13004
|
}
|
|
12960
13005
|
});
|
|
@@ -12982,13 +13027,14 @@
|
|
|
12982
13027
|
y: d.Dimension,
|
|
12983
13028
|
x: { measure: d.Measure, axis: d.Axis },
|
|
12984
13029
|
position: parseInt(d.LabelPosition),
|
|
12985
|
-
currentLegend: d.Legend
|
|
13030
|
+
currentLegend: d.Legend,
|
|
13031
|
+
//d.Legend.replaceAll(" ", "-"), need to check for this case by space replaced with -
|
|
12986
13032
|
isVisible: true
|
|
12987
13033
|
} : {
|
|
12988
13034
|
x: d.Dimension,
|
|
12989
13035
|
y: { measure: d.Measure, axis: d.Axis },
|
|
12990
13036
|
position: parseInt(d.LabelPosition),
|
|
12991
|
-
currentLegend: d.Legend
|
|
13037
|
+
currentLegend: d.Legend,
|
|
12992
13038
|
isVisible: true
|
|
12993
13039
|
},
|
|
12994
13040
|
dx: 0,
|
|
@@ -13008,10 +13054,10 @@
|
|
|
13008
13054
|
width
|
|
13009
13055
|
};
|
|
13010
13056
|
if (barChart) {
|
|
13011
|
-
let requiredXScale = d.Axis ===
|
|
13057
|
+
let requiredXScale = d.Axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13012
13058
|
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && requiredXScale(d.Measure) <= innerWidth2 && requiredXScale(d.Measure) >= 0 ? annotationsList.push(singleAnnotation) : null;
|
|
13013
13059
|
} else {
|
|
13014
|
-
responsiveXaxisLabel(dimensionList, innerWidth2).includes(d.Dimension) && !labelExcludeList.includes(d.Legend) && (d.Axis ==
|
|
13060
|
+
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;
|
|
13015
13061
|
}
|
|
13016
13062
|
});
|
|
13017
13063
|
annotationsList = annotationsList.filter((d) => d.data.y.measure != 0);
|
|
@@ -13040,17 +13086,19 @@
|
|
|
13040
13086
|
makeAnnotations.editMode(formatOptions.annotation.annotationDraggable && isReportEditable).accessors({
|
|
13041
13087
|
x: function(d) {
|
|
13042
13088
|
if (barChart) {
|
|
13043
|
-
let requiredXScale = d.x.axis ===
|
|
13089
|
+
let requiredXScale = d.x.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
13044
13090
|
let axis2 = d.x.axis;
|
|
13045
13091
|
return dataLabelsPositionForBarChartFamily(formatOptions, d.x.measure ? d.x.measure : 0, d.position, requiredXScale, minValue, void 0, chartType, isSensitivityChart, axis2);
|
|
13046
13092
|
} else if (chartType === chartTypes.ColumnChart) {
|
|
13047
|
-
|
|
13093
|
+
const legend = xScaleForLegends(d.currentLegend);
|
|
13094
|
+
const x2 = legend != null ? xScale(d.x) + legend - (columnWidth - xScaleForLegends.bandwidth()) / 2 : xScale(d.x);
|
|
13095
|
+
return x2;
|
|
13048
13096
|
} else {
|
|
13049
13097
|
return xScale(d.x);
|
|
13050
13098
|
}
|
|
13051
13099
|
},
|
|
13052
13100
|
y: function(d) {
|
|
13053
|
-
if (d.y.axis ==
|
|
13101
|
+
if (d.y.axis == axisTypes.primary) {
|
|
13054
13102
|
return dataLabelsPosition(
|
|
13055
13103
|
d.y.measure,
|
|
13056
13104
|
parseFloat(d.position),
|
|
@@ -13061,8 +13109,7 @@
|
|
|
13061
13109
|
);
|
|
13062
13110
|
} else {
|
|
13063
13111
|
if (barChart) {
|
|
13064
|
-
|
|
13065
|
-
return (xScaleForLegends && xScaleForLegends(d.currentLegend) ? xScaleForLegends(d.currentLegend) + xScaleForLegends.bandwidth() / 2 : 0) + xScale(d.y) - 5;
|
|
13112
|
+
return xScaleForLegends ? xScale(d.y) + xScaleForLegends(d.currentLegend) - (columnWidth - xScaleForLegends.bandwidth()) / 2 - 5 : xScale(d.y) - 5;
|
|
13066
13113
|
} else
|
|
13067
13114
|
return dataLabelsPosition(
|
|
13068
13115
|
d.y.measure,
|
|
@@ -13319,11 +13366,11 @@
|
|
|
13319
13366
|
d["legend"] && d.dimension ? (
|
|
13320
13367
|
// ? finalLegendseries.includes(d.Legend.includes("~$~") ? d.Legend.split("~$~")[1] : d.Legend) &&
|
|
13321
13368
|
// filteredDimensionList.includes(d.Dimension) &&
|
|
13322
|
-
!labelExcludeList.includes(d.legend.includes("~$~") ? d.legend.split("~$~")[1] : d.legend) && (d.Axis ==
|
|
13369
|
+
!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
|
|
13323
13370
|
) : (
|
|
13324
13371
|
// finalLegendseries.includes(d["key"].includes("~$~") ? d["key"].split("~$~")[1] : d["key"]) &&
|
|
13325
13372
|
// this.filteredDimensionList.includes(d.data["Dimension"]) &&
|
|
13326
|
-
!labelExcludeList.includes(d["key"]) && (d.data.axis ==
|
|
13373
|
+
!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
|
|
13327
13374
|
);
|
|
13328
13375
|
});
|
|
13329
13376
|
oldAnnotationList = oldAnnotationList.length == 0 ? annotationsList : oldAnnotationList;
|
|
@@ -13367,7 +13414,7 @@
|
|
|
13367
13414
|
}
|
|
13368
13415
|
},
|
|
13369
13416
|
y: function(d) {
|
|
13370
|
-
if (d.x.axis ==
|
|
13417
|
+
if (d.x.axis == axisTypes.primary) {
|
|
13371
13418
|
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleLeft, minValue, d.prevValue, d.type);
|
|
13372
13419
|
} else {
|
|
13373
13420
|
return dataLabelsPosition(d.y, parseFloat(d.position), yScaleRight, minValue, d.prevValue, d.type);
|
|
@@ -13408,7 +13455,7 @@
|
|
|
13408
13455
|
}
|
|
13409
13456
|
}).accessorsInverse({
|
|
13410
13457
|
x: (d) => xScale.invert(d.x),
|
|
13411
|
-
y: (d) => d.x.axis ==
|
|
13458
|
+
y: (d) => d.x.axis == axisTypes.primary ? yScaleLeft.invert(d.y) : yScaleRight.invert(d.y)
|
|
13412
13459
|
}).notePadding(0).annotations(finalAnnotationList);
|
|
13413
13460
|
if (!formatOptions.plotArea.fitChart) svg.selectAll(".annotation-group").remove();
|
|
13414
13461
|
let annotations = appendAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
@@ -13596,7 +13643,7 @@
|
|
|
13596
13643
|
yCordinate = yCordinate + cellHeight;
|
|
13597
13644
|
cellHeight = data.properties.height;
|
|
13598
13645
|
getLegendsAppended(tag, i, data, cellHeight);
|
|
13599
|
-
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",
|
|
13646
|
+
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(
|
|
13600
13647
|
"transform",
|
|
13601
13648
|
(d, index2) => `translate(${index2 === 0 ? 0 : xAxis(d.dimension) - cellWidth / 2},0)`
|
|
13602
13649
|
);
|
|
@@ -14318,7 +14365,7 @@
|
|
|
14318
14365
|
let seriesObject = {};
|
|
14319
14366
|
let measureObject = seriesPosition == "Right" ? lineData.data[lineData.data.length - 1] : lineData.data[0];
|
|
14320
14367
|
let yPositionMeasure = isStackedChart ? measureObject.value > 0 ? measureObject[1] : measureObject[0] : measureObject.value;
|
|
14321
|
-
if (lineData.properties.axis ==
|
|
14368
|
+
if (lineData.properties.axis == axisTypes.primary || !yScaleRight) {
|
|
14322
14369
|
seriesObject["yPosition"] = yScaleLeft(yPositionMeasure) - hwObject[1] / 2;
|
|
14323
14370
|
} else if (isSecondaryAxisDrawn && yScaleRight) {
|
|
14324
14371
|
seriesObject["yPosition"] = yScaleRight(yPositionMeasure) - hwObject[1] / 2;
|
|
@@ -14411,7 +14458,7 @@
|
|
|
14411
14458
|
break;
|
|
14412
14459
|
case "6":
|
|
14413
14460
|
chartData.forEach((d) => {
|
|
14414
|
-
let annotationVisibility = d.
|
|
14461
|
+
let annotationVisibility = d[0].properties.annotation.toString();
|
|
14415
14462
|
switch (annotationVisibility) {
|
|
14416
14463
|
case "1":
|
|
14417
14464
|
for (let i = 0; i < chartData[0].length; i++) {
|
|
@@ -14482,7 +14529,7 @@
|
|
|
14482
14529
|
height: 15,
|
|
14483
14530
|
width: 15
|
|
14484
14531
|
},
|
|
14485
|
-
color:
|
|
14532
|
+
color: d.properties.labelColor,
|
|
14486
14533
|
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
14487
14534
|
height,
|
|
14488
14535
|
width
|
|
@@ -14590,7 +14637,7 @@
|
|
|
14590
14637
|
return `translate(${currentX}, 0)`;
|
|
14591
14638
|
}
|
|
14592
14639
|
});
|
|
14593
|
-
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !==
|
|
14640
|
+
annotations.selectAll("text").append("text").style("fill", formatOptions.annotation.annotationColor !== commonColors.white ? formatOptions.annotation.annotationColor : "none");
|
|
14594
14641
|
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");
|
|
14595
14642
|
return annotations;
|
|
14596
14643
|
};
|
|
@@ -14600,12 +14647,12 @@
|
|
|
14600
14647
|
let rotation = "rotate(" + -formatOptions.yAxisLabel.yAxisLabelRotation + ")";
|
|
14601
14648
|
gTag.append("rect").attr("transform", `translate(0,${innerHeight2})`).attr("height", yLabel + 10).attr("width", innerWidth2).attr(
|
|
14602
14649
|
"fill",
|
|
14603
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
14650
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
14604
14651
|
);
|
|
14605
14652
|
const xAxisG = gTag.append("g").call(xAxisBottom).attr("transform", `translate(0,${innerHeight2})`);
|
|
14606
14653
|
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");
|
|
14607
14654
|
;
|
|
14608
|
-
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 !==
|
|
14655
|
+
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(
|
|
14609
14656
|
"text-decoration",
|
|
14610
14657
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14611
14658
|
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr(
|
|
@@ -14644,7 +14691,7 @@
|
|
|
14644
14691
|
gTag.selectAll("#yAxisG").remove();
|
|
14645
14692
|
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(
|
|
14646
14693
|
"fill",
|
|
14647
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
14694
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
14648
14695
|
);
|
|
14649
14696
|
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);
|
|
14650
14697
|
if (true) {
|
|
@@ -14758,11 +14805,11 @@
|
|
|
14758
14805
|
let fontStyle = formatOptions.secondaryYAxisLabel.secondaryYAxisLabelFontStyle;
|
|
14759
14806
|
gTag.append("rect").attr("transform", `translate(0,-${xLabelSecondary})`).attr("height", xLabelSecondary).attr("width", innerWidth).attr(
|
|
14760
14807
|
"fill",
|
|
14761
|
-
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !==
|
|
14808
|
+
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelVisibility ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor !== commonColors.white ? formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : "none" : formatOptions.secondaryYAxisLabel.secondaryYAxisBackgroundColor : formatOptions.chartArea.chartAreaColor
|
|
14762
14809
|
);
|
|
14763
14810
|
const XaxisG = gTag.append("g").call(xAxisTop).attr("transform", `translate(0,0)`);
|
|
14764
14811
|
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");
|
|
14765
|
-
XaxisG.selectAll("text").attr("transform", "rotate(270) translate(5,5)").style("text-anchor", "start").style("fill", formatOptions.secondaryYAxisLabel.secondaryYAxisLabelColor !==
|
|
14812
|
+
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(
|
|
14766
14813
|
"text-decoration",
|
|
14767
14814
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
14768
14815
|
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr(
|
|
@@ -14916,16 +14963,137 @@
|
|
|
14916
14963
|
true
|
|
14917
14964
|
);
|
|
14918
14965
|
};
|
|
14966
|
+
function addTotalValue(totalValueMap, xScale, yScale, margin, d3Annotation2, oldAnnotationList, formatOptions, chartType, height, width, svg, isReportEditable, isBarChart) {
|
|
14967
|
+
try {
|
|
14968
|
+
if (formatOptions.total.totalVisibility) {
|
|
14969
|
+
const dataLabelHeight = formatOptions.annotation.annotationVisibility != "5" ? 10 : 0;
|
|
14970
|
+
let annotationType = formatOptions.total.annotationType ?? "1";
|
|
14971
|
+
let Disable = [annotationType == "1" ? "connector" : ""];
|
|
14972
|
+
let makeAnnotations = d3Annotation2.annotation();
|
|
14973
|
+
let connector = formatOptions.total.connectorType;
|
|
14974
|
+
let fontStyle = formatOptions.total.totalFontStyle;
|
|
14975
|
+
let connectorType = formatOptions.total.connectorType ? formatOptions.total.connectorType.toLowerCase() : "None";
|
|
14976
|
+
oldAnnotationList = [];
|
|
14977
|
+
let annotationsList = [];
|
|
14978
|
+
let totalValuesArray = Array.from(totalValueMap, ([Dimension, Measure]) => ({ Dimension, Measure }));
|
|
14979
|
+
if (formatOptions.total.totalHideZeroValues) {
|
|
14980
|
+
totalValuesArray = totalValuesArray.filter((d) => d.Measure !== 0);
|
|
14981
|
+
}
|
|
14982
|
+
totalValuesArray.forEach((d, i) => {
|
|
14983
|
+
let singleAnnotation = {
|
|
14984
|
+
note: {
|
|
14985
|
+
label: d.Measure >= 1e9 && formatOptions.total.totalNumberFormat === ".2s" ? Math.round(d.Measure / 1e9) + "B" : getNumberWithFormat(
|
|
14986
|
+
d.Measure,
|
|
14987
|
+
formatOptions.total.totalDisplayUnits || formatOptions.plotArea.plotAreaDisplayUnits,
|
|
14988
|
+
formatOptions.total.totalNumberFormat,
|
|
14989
|
+
formatOptions.total.totalDecimalPrecision
|
|
14990
|
+
)
|
|
14991
|
+
},
|
|
14992
|
+
data: {
|
|
14993
|
+
y: d.Measure,
|
|
14994
|
+
x: d.Dimension
|
|
14995
|
+
},
|
|
14996
|
+
dx: 0,
|
|
14997
|
+
dy: 0,
|
|
14998
|
+
connector: {
|
|
14999
|
+
end: connectorType,
|
|
15000
|
+
curve: connecterCurve[formatOptions.total.connectorCurve]
|
|
15001
|
+
},
|
|
15002
|
+
disable: Disable,
|
|
15003
|
+
subject: {
|
|
15004
|
+
height: 15,
|
|
15005
|
+
width: 15
|
|
15006
|
+
},
|
|
15007
|
+
color: formatOptions.total.totalColor,
|
|
15008
|
+
type: annotationTypeforCharts(d3Annotation2, parseFloat(annotationType)),
|
|
15009
|
+
height,
|
|
15010
|
+
width
|
|
15011
|
+
};
|
|
15012
|
+
annotationsList.push(singleAnnotation);
|
|
15013
|
+
});
|
|
15014
|
+
makeAnnotations.editMode(formatOptions.total.annotationDraggable && isReportEditable).accessors({
|
|
15015
|
+
x: function(d) {
|
|
15016
|
+
return isBarChart ? yScale(d.y) + 25 : xScale(d.x);
|
|
15017
|
+
},
|
|
15018
|
+
y: function(d) {
|
|
15019
|
+
return isBarChart ? xScale(d.x) - 5 : yScale(d.y) - dataLabelHeight - 15;
|
|
15020
|
+
}
|
|
15021
|
+
}).on("dragend", function(annotation2) {
|
|
15022
|
+
annotations.selectAll(".connector").style("stroke", formatOptions.annotation.connectorColor || "#ccc").attr(
|
|
15023
|
+
"stroke-dasharray",
|
|
15024
|
+
connectedStyle[formatOptions.total.connectorStyle.toLowerCase()]
|
|
15025
|
+
);
|
|
15026
|
+
annotations.selectAll(`.connector-${connectorType}`).attr("fill", formatOptions.total.connectorColor || "#ccc").style(
|
|
15027
|
+
"stroke",
|
|
15028
|
+
formatOptions.total.connectorColor || "#ccc"
|
|
15029
|
+
);
|
|
15030
|
+
annotations.selectAll(".note-line").attr("hoverId", (d) => d.data.currentLegend).style("stroke", formatOptions.total.connectorColor || "#ccc").attr(
|
|
15031
|
+
"stroke-dasharray",
|
|
15032
|
+
connectedStyle[formatOptions.total.connectorStyle.toLowerCase()]
|
|
15033
|
+
).filter((d) => d._dx == 0 && d._dy == 0).remove();
|
|
15034
|
+
}).accessorsInverse({
|
|
15035
|
+
x: (d) => xScale.invert(d.x),
|
|
15036
|
+
y: (d) => yScale.invert(d.y)
|
|
15037
|
+
}).notePadding(0).annotations(annotationsList);
|
|
15038
|
+
let annotations = appendTotalAnnotations(svg, formatOptions, margin, fontStyle, makeAnnotations, connectorType);
|
|
15039
|
+
}
|
|
15040
|
+
} catch (error) {
|
|
15041
|
+
throw error;
|
|
15042
|
+
}
|
|
15043
|
+
}
|
|
15044
|
+
const appendTotalAnnotations = (svg, formatOptions, margin, fontStyle, makeAnnotations, ConnectorType) => {
|
|
15045
|
+
svg.selectAll(".annotation-group").remove();
|
|
15046
|
+
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(
|
|
15047
|
+
"text-decoration",
|
|
15048
|
+
fontStyle.includes("Underline") ? "Underline" : ""
|
|
15049
|
+
).style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").call(makeAnnotations);
|
|
15050
|
+
annotations.selectAll("rect").style("visibility", "hidden");
|
|
15051
|
+
annotations.selectAll(".annotation-subject").remove();
|
|
15052
|
+
annotations.selectAll(".connector").style("stroke", formatOptions.total.connectorColor || "#ccc").attr("stroke-dasharray", connectedStyle[formatOptions.total.connectorStyle]);
|
|
15053
|
+
annotations.selectAll(`.connector-${ConnectorType}`).attr("fill", formatOptions.total.connectorColor || "#ccc").style("stroke", formatOptions.total.connectorColor || "#ccc");
|
|
15054
|
+
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();
|
|
15055
|
+
annotations.selectAll(".connector-end").filter((d) => d.connector.end == "dot" && d._dx == 0 && d._dy == 0).remove();
|
|
15056
|
+
formatOptions.total.annotationType == "1" && annotations.selectAll(".annotation-note-content").attr("transform", function() {
|
|
15057
|
+
const transform = select$2(this).attr("transform");
|
|
15058
|
+
const translateValues = transform.match(/translate\(([^,]+),([^,]+)\)/);
|
|
15059
|
+
if (translateValues) {
|
|
15060
|
+
const currentX = parseFloat(translateValues[1]);
|
|
15061
|
+
return `translate(${currentX}, 0)`;
|
|
15062
|
+
}
|
|
15063
|
+
});
|
|
15064
|
+
annotations.selectAll("text").append("text").style("fill", formatOptions.total.totalColor !== commonColors.white ? formatOptions.total.totalColor : "none");
|
|
15065
|
+
return annotations;
|
|
15066
|
+
};
|
|
15067
|
+
function createTotalMeasureValueMap(data, totalValueMap, filteredDimension) {
|
|
15068
|
+
totalValueMap.clear();
|
|
15069
|
+
if (filteredDimension && filteredDimension.length > 0) {
|
|
15070
|
+
filteredDimension.forEach((dimension) => {
|
|
15071
|
+
let totalMeasureValue = 0;
|
|
15072
|
+
totalValueMap.set(dimension, totalMeasureValue);
|
|
15073
|
+
});
|
|
15074
|
+
}
|
|
15075
|
+
if (data.ChartData && data.ChartData.length > 0) {
|
|
15076
|
+
data.ChartData.forEach((series) => {
|
|
15077
|
+
series.data.forEach((dataPoint, index2) => {
|
|
15078
|
+
if (totalValueMap.has(dataPoint.dimension)) {
|
|
15079
|
+
let existingTotal = totalValueMap.get(dataPoint.dimension) || 0;
|
|
15080
|
+
existingTotal += dataPoint.value || 0;
|
|
15081
|
+
totalValueMap.set(dataPoint.dimension, existingTotal);
|
|
15082
|
+
}
|
|
15083
|
+
});
|
|
15084
|
+
});
|
|
15085
|
+
}
|
|
15086
|
+
}
|
|
14919
15087
|
const chartProperties = {
|
|
14920
15088
|
color: "defaultColor",
|
|
14921
15089
|
name: "",
|
|
14922
15090
|
type: "Line",
|
|
14923
|
-
axis:
|
|
15091
|
+
axis: axisTypes.primary,
|
|
14924
15092
|
alias: "",
|
|
14925
15093
|
fontSize: 11,
|
|
14926
15094
|
fontStyle: [],
|
|
14927
15095
|
fontFamily: "Helvetica",
|
|
14928
|
-
labelColor:
|
|
15096
|
+
labelColor: commonColors.black,
|
|
14929
15097
|
hideZeroValues: false,
|
|
14930
15098
|
markerShape: "Circle",
|
|
14931
15099
|
lineStyle: "Solid",
|
|
@@ -14959,7 +15127,7 @@
|
|
|
14959
15127
|
valueFontStyle: [],
|
|
14960
15128
|
valueFont: "Helvetica",
|
|
14961
15129
|
valueFontColor: "black",
|
|
14962
|
-
backgroundColor:
|
|
15130
|
+
backgroundColor: commonColors.white,
|
|
14963
15131
|
nodeHeight: 5,
|
|
14964
15132
|
nodeWidth: 12,
|
|
14965
15133
|
setColorScale: false,
|
|
@@ -14970,7 +15138,7 @@
|
|
|
14970
15138
|
actualChartType: "chartType",
|
|
14971
15139
|
secondaryAxisBgColor: "#e5e5e5",
|
|
14972
15140
|
stackBorderWidth: 1,
|
|
14973
|
-
stackBorderColor:
|
|
15141
|
+
stackBorderColor: commonColors.black,
|
|
14974
15142
|
stackBorderStyle: 0,
|
|
14975
15143
|
seriesLabelVisibility: true,
|
|
14976
15144
|
individualAnnotationVisibility: "1",
|
|
@@ -15006,9 +15174,8 @@
|
|
|
15006
15174
|
chartTypes.Speedometer,
|
|
15007
15175
|
chartTypes.RadialBarChart
|
|
15008
15176
|
];
|
|
15009
|
-
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions,
|
|
15177
|
+
function drawLegends(height, svg, maxLegendDimensions, chartTitleHeight, width, legendMargin, formatOptions, seriesData, chartId, legendShape, chartType) {
|
|
15010
15178
|
try {
|
|
15011
|
-
let seriesData = chartType !== chartTypes.TornadoChart ? [...inputSeries].reverse() : [...inputSeries];
|
|
15012
15179
|
let position = formatOptions.legends.legendPosition;
|
|
15013
15180
|
let horizontalLegendAlignment = formatOptions.legends.legendAlignmentTopBottom;
|
|
15014
15181
|
let verticalLegendAlignment = formatOptions.legends.legendAlignment;
|
|
@@ -15111,21 +15278,13 @@
|
|
|
15111
15278
|
chartData.forEach(
|
|
15112
15279
|
(d) => d.data.forEach(
|
|
15113
15280
|
(j) => {
|
|
15114
|
-
j["markerShape"] = type
|
|
15281
|
+
j["markerShape"] = [chartTypes.CombinationLine, chartTypes.CombinationArea].includes(type) && !formatOptions.plotArea.plotAreaHideLineAndMarkers ? "None" : d.properties.markerShape ? d.properties.markerShape : "Circle";
|
|
15115
15282
|
j["currentMeasure"] = d.properties.currentMeasure;
|
|
15283
|
+
j["markerColor"] = d.properties.markerColor ? d.properties.markerColor : "Blue";
|
|
15284
|
+
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;
|
|
15116
15285
|
}
|
|
15117
15286
|
)
|
|
15118
15287
|
);
|
|
15119
|
-
chartData.forEach(
|
|
15120
|
-
(d) => d.data.forEach(
|
|
15121
|
-
(j) => j["markerColor"] = d.properties.markerColor ? d.properties.markerColor : "Blue"
|
|
15122
|
-
)
|
|
15123
|
-
);
|
|
15124
|
-
chartData.forEach(
|
|
15125
|
-
(d) => d.data.forEach(
|
|
15126
|
-
(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
|
|
15127
|
-
)
|
|
15128
|
-
);
|
|
15129
15288
|
let markerGroups = lines.selectAll(".lineGroup").data(chartData, (d) => d.legend);
|
|
15130
15289
|
let markerGroupsEnter = markerGroups.enter().append("g").attr("class", "parentGroup").attr("hoverId", (d) => (d.properties.alias || d.properties.name || "Legend").replace(/\s+/g, "-"));
|
|
15131
15290
|
let mergedMarkerGroups = markerGroupsEnter.merge(markerGroups);
|
|
@@ -15137,12 +15296,12 @@
|
|
|
15137
15296
|
return Symbol$1().type(Markershapes(d.markerShape)).size(d.markerSize * 50)();
|
|
15138
15297
|
}).attr("visibility", (d) => {
|
|
15139
15298
|
const hideByX = !xScale(d.dimension) && xScale(d.dimension) !== 0;
|
|
15140
|
-
const visible = formatOptions.marker.markerVisibility ? checkVisibleConditions(chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) ?
|
|
15141
|
-
return hideByX ?
|
|
15299
|
+
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;
|
|
15300
|
+
return hideByX ? visibilityCondition.hidden : visible;
|
|
15142
15301
|
}).attr("transform", (d) => {
|
|
15143
|
-
let requiredYScale = d.axis ==
|
|
15302
|
+
let requiredYScale = d.axis == axisTypes.primary ? yScale : yScaleRight;
|
|
15144
15303
|
const x2 = xScale(d.dimension);
|
|
15145
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15304
|
+
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);
|
|
15146
15305
|
return `translate(${x2},${y2})`;
|
|
15147
15306
|
}).on("mousemove", function(event2, d) {
|
|
15148
15307
|
const dataPoint = d;
|
|
@@ -15180,13 +15339,13 @@
|
|
|
15180
15339
|
);
|
|
15181
15340
|
parentG.selectAll(".halo").remove();
|
|
15182
15341
|
parentG.insert("circle", ":first-child").attr("class", "halo").attr("cx", xScale(dataPoint.dimension)).attr("cy", () => {
|
|
15183
|
-
const requiredYScale = dataPoint.axis ===
|
|
15184
|
-
return [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15342
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15343
|
+
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);
|
|
15185
15344
|
}).attr("fill", legendEntry.markerColor).attr("opacity", 0.5).attr("r", legendEntry.markerSize * 10);
|
|
15186
15345
|
select$2(this).transition().duration(100).attr("transform", () => {
|
|
15187
|
-
const requiredYScale = dataPoint.axis ===
|
|
15346
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15188
15347
|
const x2 = xScale(dataPoint.dimension);
|
|
15189
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15348
|
+
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);
|
|
15190
15349
|
return `translate(${x2},${y2}) scale(1.3)`;
|
|
15191
15350
|
});
|
|
15192
15351
|
}).on("mouseout", function(event2, d) {
|
|
@@ -15195,9 +15354,9 @@
|
|
|
15195
15354
|
hideTooltipOnMouseOut();
|
|
15196
15355
|
parentG.selectAll(".halo").remove();
|
|
15197
15356
|
select$2(this).transition().duration(100).attr("transform", () => {
|
|
15198
|
-
const requiredYScale = dataPoint.axis ===
|
|
15357
|
+
const requiredYScale = dataPoint.axis === axisTypes.primary ? yScale : yScaleRight;
|
|
15199
15358
|
const x2 = xScale(dataPoint.dimension);
|
|
15200
|
-
const y2 = [chartTypes.NormalizedStackAreaChart, chartTypes.StackAreaChart, chartTypes.StackLineChart, chartTypes.NormalizedStackLineChart,
|
|
15359
|
+
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);
|
|
15201
15360
|
return `translate(${x2},${y2}) scale(1)`;
|
|
15202
15361
|
});
|
|
15203
15362
|
});
|
|
@@ -15209,10 +15368,10 @@
|
|
|
15209
15368
|
const checkVisibleConditions = (chartData, d, type, hideZeroValues, secondaryCustomYaxisMaxValue, secondaryCustomYaxisMinValue, customYaxisMinValue, customYaxisMaxValue) => {
|
|
15210
15369
|
try {
|
|
15211
15370
|
if (chartData[0].properties.axis && chartData[0].properties.axis === "Secondary") {
|
|
15212
|
-
return hideZeroValues && d.
|
|
15371
|
+
return hideZeroValues && d.value == 0 || d.value > secondaryCustomYaxisMaxValue || d.value < secondaryCustomYaxisMinValue;
|
|
15213
15372
|
} else if (type.includes("Stack")) {
|
|
15214
|
-
return d.
|
|
15215
|
-
} else return hideZeroValues && d.
|
|
15373
|
+
return d.value > 0 ? hideZeroValues && d[1] == 0 || d[1] < customYaxisMinValue || d[1] > customYaxisMaxValue : hideZeroValues && d[0] == 0 || d[0] < customYaxisMinValue || d[0] > customYaxisMaxValue;
|
|
15374
|
+
} else return hideZeroValues && d.value == 0 || d.value < customYaxisMinValue || d.value > customYaxisMaxValue;
|
|
15216
15375
|
} catch (error) {
|
|
15217
15376
|
logError$2(fileName$b, "checkVisibleConditions", error);
|
|
15218
15377
|
}
|
|
@@ -15422,13 +15581,13 @@
|
|
|
15422
15581
|
}
|
|
15423
15582
|
function showTooltipOnMouseMove(elements, chartFormatOptions, event2, prop) {
|
|
15424
15583
|
try {
|
|
15425
|
-
const markerColor = prop?.markerColor ?? "blue";
|
|
15584
|
+
const markerColor = prop.color ?? prop?.markerColor ?? "blue";
|
|
15426
15585
|
const markerShape = prop?.markerShape.toLowerCase() ?? "circle";
|
|
15427
15586
|
const isLightTheme = chartFormatOptions.toolTip.toolTipTheme === "Light";
|
|
15428
15587
|
const bgColor = isLightTheme ? "rgba(255, 255, 255)" : "#272729ff";
|
|
15429
|
-
const textColor = isLightTheme ? "black" :
|
|
15588
|
+
const textColor = isLightTheme ? "black" : commonColors.white;
|
|
15430
15589
|
const subTextColor = isLightTheme ? "gray" : "#d1d5db";
|
|
15431
|
-
selectAll(".chartTooltip").style("visibility",
|
|
15590
|
+
selectAll(".chartTooltip").style("visibility", visibilityCondition.hidden);
|
|
15432
15591
|
const tooltip = select$2("#chartTooltipDiv").html("").append("div").attr(
|
|
15433
15592
|
"class",
|
|
15434
15593
|
isLightTheme ? "tooltipParentLight chartTooltip" : "tooltipParentDark chartTooltip"
|
|
@@ -15520,7 +15679,7 @@
|
|
|
15520
15679
|
}
|
|
15521
15680
|
tooltip.style("left", `${left2}px`).style("top", `${top2}px`).style(
|
|
15522
15681
|
"visibility",
|
|
15523
|
-
chartFormatOptions.toolTip.toolTipVisibility ?
|
|
15682
|
+
chartFormatOptions.toolTip.toolTipVisibility ? visibilityCondition.visible : visibilityCondition.hidden
|
|
15524
15683
|
).style("transform", "scale(1)").style("opacity", "1");
|
|
15525
15684
|
tooltip.select(".arrow-placeholder").attr("class", `arrow-${arrow}`);
|
|
15526
15685
|
} catch (error) {
|
|
@@ -15529,7 +15688,7 @@
|
|
|
15529
15688
|
}
|
|
15530
15689
|
function hideTooltipOnMouseOut() {
|
|
15531
15690
|
try {
|
|
15532
|
-
select$2("#chartTooltipDiv").html("").style("visibility",
|
|
15691
|
+
select$2("#chartTooltipDiv").html("").style("visibility", visibilityCondition.hidden);
|
|
15533
15692
|
} catch (error) {
|
|
15534
15693
|
logError$2(fileName$b, "hideTooltipOnMouseOut", error);
|
|
15535
15694
|
}
|
|
@@ -15539,14 +15698,14 @@
|
|
|
15539
15698
|
let svg = select$2(chartSvg.current);
|
|
15540
15699
|
let object2 = svg.append("foreignObject").attr(
|
|
15541
15700
|
"visibility",
|
|
15542
|
-
chartFormatOptions.chartTitle.chartTitleVisibility ?
|
|
15701
|
+
chartFormatOptions.chartTitle.chartTitleVisibility ? visibilityCondition.visible : visibilityCondition.hidden
|
|
15543
15702
|
).attr("transform", `translate(2,2)`).attr("class", "chartTitle").attr("width", chartTitleWidth).attr("height", chartTitleHeight + "px");
|
|
15544
15703
|
if (chartFormatOptions.chartTitle.dynamicTitleText.length !== 0) {
|
|
15545
|
-
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",
|
|
15704
|
+
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(
|
|
15546
15705
|
chartFormatOptions.chartTitle.chartTitleHTML ? chartFormatOptions.chartTitle.chartTitleHTML : chartFormatOptions.chartTitle.chartTitleText
|
|
15547
15706
|
);
|
|
15548
15707
|
} else {
|
|
15549
|
-
object2.append("xhtml:div").style("white-space", "pre").style("user-select", "none").style("text-overflow", "ellipsis").style("overflow",
|
|
15708
|
+
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(
|
|
15550
15709
|
"font-family",
|
|
15551
15710
|
chartFormatOptions.chartTitle.chartTitleFontFamily
|
|
15552
15711
|
).attr("title", chartFormatOptions.chartTitle.chartTitleText).html(chartFormatOptions.chartTitle.chartTitleText);
|
|
@@ -15629,7 +15788,7 @@
|
|
|
15629
15788
|
}
|
|
15630
15789
|
}
|
|
15631
15790
|
let vennSaparator = isVennChart && (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top) ? i != seriesData.length - 1 ? " |" : "" : "";
|
|
15632
|
-
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color :
|
|
15791
|
+
let legendColor = isVennChart ? chartFormatOptions.legends.legendSelectedUnicolor : chartFormatOptions.legends.legendColorMode == legendColorMode.multiColor ? d.properties.color ? d.properties.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
15633
15792
|
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(
|
|
15634
15793
|
"font-style",
|
|
15635
15794
|
() => {
|
|
@@ -15671,7 +15830,7 @@
|
|
|
15671
15830
|
}
|
|
15672
15831
|
function getLineShape(d, innerDiv, formatOptions) {
|
|
15673
15832
|
try {
|
|
15674
|
-
let shape = innerDiv.append("div").style("height", "2px").style("width", "20px").style("background", d.properties.lineStyle == "solid" ? d.properties.color :
|
|
15833
|
+
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);
|
|
15675
15834
|
if (formatOptions.marker.markerVisibility) {
|
|
15676
15835
|
switch (d.properties.markerShape.toLowerCase()) {
|
|
15677
15836
|
case "circle":
|
|
@@ -15980,7 +16139,7 @@
|
|
|
15980
16139
|
logError$2(fileName$b, "convertStringToNumber", error);
|
|
15981
16140
|
}
|
|
15982
16141
|
};
|
|
15983
|
-
function generalizedChartData(chartData, dimensionList) {
|
|
16142
|
+
function generalizedChartData(chartData, dimensionList, isTornadoChart = false) {
|
|
15984
16143
|
try {
|
|
15985
16144
|
return chartData.map((item) => {
|
|
15986
16145
|
let properties;
|
|
@@ -16010,7 +16169,7 @@
|
|
|
16010
16169
|
return {
|
|
16011
16170
|
...item,
|
|
16012
16171
|
properties,
|
|
16013
|
-
data: item.data
|
|
16172
|
+
data: isTornadoChart ? item.data : normalizedData
|
|
16014
16173
|
};
|
|
16015
16174
|
});
|
|
16016
16175
|
} catch (error) {
|
|
@@ -16474,7 +16633,9 @@
|
|
|
16474
16633
|
)
|
|
16475
16634
|
).tickSize(
|
|
16476
16635
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
16477
|
-
).tickValues(
|
|
16636
|
+
).tickValues(
|
|
16637
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
16638
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
16478
16639
|
}
|
|
16479
16640
|
if (isSecondaryAxisDrawn) {
|
|
16480
16641
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
@@ -16523,7 +16684,13 @@
|
|
|
16523
16684
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
16524
16685
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
16525
16686
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
16526
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
16687
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
16688
|
+
"hoverId",
|
|
16689
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
16690
|
+
/\s+/g,
|
|
16691
|
+
"-"
|
|
16692
|
+
)
|
|
16693
|
+
).attr(
|
|
16527
16694
|
"transform",
|
|
16528
16695
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
16529
16696
|
);
|
|
@@ -16536,9 +16703,12 @@
|
|
|
16536
16703
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
16537
16704
|
);
|
|
16538
16705
|
const bars = columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legend)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
16539
|
-
const yScale = data2.properties.axis ===
|
|
16706
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16540
16707
|
return yScale(0);
|
|
16541
|
-
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
16708
|
+
}).attr("height", 0).attr("fill", data2.properties.color).attr(
|
|
16709
|
+
"stroke-dasharray",
|
|
16710
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
16711
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
16542
16712
|
"stroke",
|
|
16543
16713
|
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
16544
16714
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
@@ -16547,10 +16717,10 @@
|
|
|
16547
16717
|
);
|
|
16548
16718
|
const finalBars = bars;
|
|
16549
16719
|
finalBars.attr("y", (d) => {
|
|
16550
|
-
const yScale = data2.properties.axis ===
|
|
16720
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16551
16721
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
16552
16722
|
}).attr("height", (d) => {
|
|
16553
|
-
const yScale = data2.properties.axis ===
|
|
16723
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
16554
16724
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
16555
16725
|
});
|
|
16556
16726
|
columnGroupsEnter.merge(columnGroups).on("mousemove", (event2, d) => {
|
|
@@ -16746,10 +16916,6 @@
|
|
|
16746
16916
|
let xScale;
|
|
16747
16917
|
let xScaleForLegends;
|
|
16748
16918
|
let calculatedRange;
|
|
16749
|
-
let stackAreaChartDataForPrimaryAxis = [];
|
|
16750
|
-
let stackAreaChartDataForSecondaryAxis = [];
|
|
16751
|
-
let stackColumnChartDataForPrimaryAxis = [];
|
|
16752
|
-
let stackColumnChartDataForSecondaryAxis = [];
|
|
16753
16919
|
let primaryStackAxisData = [];
|
|
16754
16920
|
let secondaryStackAxisData = [];
|
|
16755
16921
|
let primaryStackAreaAxisData = [];
|
|
@@ -16857,6 +17023,7 @@
|
|
|
16857
17023
|
innerHeight2,
|
|
16858
17024
|
chartType
|
|
16859
17025
|
);
|
|
17026
|
+
updateStackAxisExtremes();
|
|
16860
17027
|
initScale();
|
|
16861
17028
|
initAxis();
|
|
16862
17029
|
initYaxis$1(
|
|
@@ -16965,7 +17132,7 @@
|
|
|
16965
17132
|
secondaryStackAreaAxisData.push(series);
|
|
16966
17133
|
}
|
|
16967
17134
|
}
|
|
16968
|
-
if (series.properties.axis ===
|
|
17135
|
+
if (series.properties.axis === axisTypes.primary) {
|
|
16969
17136
|
primaryStackAxisData.push(series);
|
|
16970
17137
|
if (series.properties.type == chartTypes.StackColumnChart) {
|
|
16971
17138
|
primaryStackColumnAxisData.push(series);
|
|
@@ -17021,132 +17188,91 @@
|
|
|
17021
17188
|
primaryStackAreaAxisData,
|
|
17022
17189
|
primaryStackColumnAxisData,
|
|
17023
17190
|
secondaryStackAreaAxisData,
|
|
17024
|
-
secondaryStackColumnAxisData
|
|
17191
|
+
secondaryStackColumnAxisData,
|
|
17192
|
+
seriesData
|
|
17025
17193
|
);
|
|
17026
|
-
if (primaryStackAxisData.length > 0) {
|
|
17027
|
-
let valueArray = [];
|
|
17028
|
-
let stackDataForPrimaryAxis = getStackedData(
|
|
17029
|
-
filteredDimension,
|
|
17030
|
-
primaryStackAxisData,
|
|
17031
|
-
false
|
|
17032
|
-
);
|
|
17033
|
-
stackDataForPrimaryAxis.forEach((d) => {
|
|
17034
|
-
valueArray.push(d.total);
|
|
17035
|
-
});
|
|
17036
|
-
chartJSON.yMaxLeft = Math.max(
|
|
17037
|
-
chartJSON.yMaxLeft,
|
|
17038
|
-
Math.max(...valueArray)
|
|
17039
|
-
);
|
|
17040
|
-
chartJSON.yMinLeft = Math.min(
|
|
17041
|
-
chartJSON.yMinLeft,
|
|
17042
|
-
Math.min(...valueArray)
|
|
17043
|
-
);
|
|
17044
|
-
}
|
|
17045
|
-
if (secondaryStackAxisData.length > 0) {
|
|
17046
|
-
let valueArray = [];
|
|
17047
|
-
let stackDataForSecondaryAxis = getStackedData(
|
|
17048
|
-
filteredDimension,
|
|
17049
|
-
secondaryStackAxisData,
|
|
17050
|
-
false
|
|
17051
|
-
);
|
|
17052
|
-
stackDataForSecondaryAxis.forEach((d) => {
|
|
17053
|
-
valueArray.push(d.total);
|
|
17054
|
-
});
|
|
17055
|
-
chartJSON.yMaxRight = Math.max(
|
|
17056
|
-
chartJSON.yMaxRight,
|
|
17057
|
-
Math.max(...valueArray)
|
|
17058
|
-
);
|
|
17059
|
-
chartJSON.yMinRight = Math.min(
|
|
17060
|
-
chartJSON.yMinRight,
|
|
17061
|
-
Math.min(...valueArray)
|
|
17062
|
-
);
|
|
17063
|
-
}
|
|
17064
17194
|
};
|
|
17065
|
-
const checkAndupdateInputData = (primaryStackAreaAxisData2, primaryStackColumnAxisData2, secondaryStackAreaAxisData2, secondaryStackColumnAxisData2) => {
|
|
17066
|
-
|
|
17195
|
+
const checkAndupdateInputData = (primaryStackAreaAxisData2, primaryStackColumnAxisData2, secondaryStackAreaAxisData2, secondaryStackColumnAxisData2, ChartData) => {
|
|
17196
|
+
const tempStackAreaChartDataForPrimaryAxis = getStackedData(
|
|
17067
17197
|
filteredDimension,
|
|
17068
17198
|
primaryStackAreaAxisData2,
|
|
17069
17199
|
false
|
|
17070
17200
|
);
|
|
17071
|
-
|
|
17201
|
+
const tempStackAreaChartDataForSecondaryAxis = getStackedData(
|
|
17072
17202
|
filteredDimension,
|
|
17073
17203
|
secondaryStackAreaAxisData2,
|
|
17074
17204
|
false
|
|
17075
17205
|
);
|
|
17076
|
-
|
|
17206
|
+
const tempStackColumnChartDataForPrimaryAxis = getStackedData(
|
|
17077
17207
|
filteredDimension,
|
|
17078
17208
|
primaryStackColumnAxisData2,
|
|
17079
17209
|
false
|
|
17080
17210
|
);
|
|
17081
|
-
|
|
17211
|
+
const tempStackColumnChartDataForSecondaryAxis = getStackedData(
|
|
17082
17212
|
filteredDimension,
|
|
17083
17213
|
secondaryStackColumnAxisData2,
|
|
17084
17214
|
false
|
|
17085
17215
|
);
|
|
17086
17216
|
requiredData = [];
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
legend: d.properties.legend
|
|
17098
|
-
},
|
|
17099
|
-
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17100
|
-
data: primaryStackAreaAxisData2
|
|
17101
|
-
});
|
|
17217
|
+
const allGeneratedData = [];
|
|
17218
|
+
primaryStackAreaAxisData2.forEach((d) => {
|
|
17219
|
+
allGeneratedData.push({
|
|
17220
|
+
properties: {
|
|
17221
|
+
axis: d.properties.axis,
|
|
17222
|
+
type: d.properties.type,
|
|
17223
|
+
legend: d.properties.legend
|
|
17224
|
+
},
|
|
17225
|
+
stackData: tempStackAreaChartDataForPrimaryAxis,
|
|
17226
|
+
data: primaryStackAreaAxisData2
|
|
17102
17227
|
});
|
|
17103
|
-
}
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
|
|
17111
|
-
|
|
17112
|
-
|
|
17113
|
-
data: secondaryStackAreaAxisData2
|
|
17114
|
-
});
|
|
17228
|
+
});
|
|
17229
|
+
secondaryStackAreaAxisData2.forEach((d) => {
|
|
17230
|
+
allGeneratedData.push({
|
|
17231
|
+
properties: {
|
|
17232
|
+
axis: d.properties.axis,
|
|
17233
|
+
type: d.properties.type,
|
|
17234
|
+
legend: d.properties.legend
|
|
17235
|
+
},
|
|
17236
|
+
stackData: tempStackAreaChartDataForSecondaryAxis,
|
|
17237
|
+
data: secondaryStackAreaAxisData2
|
|
17115
17238
|
});
|
|
17116
|
-
}
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
|
|
17120
|
-
|
|
17121
|
-
|
|
17122
|
-
|
|
17123
|
-
|
|
17124
|
-
|
|
17125
|
-
|
|
17126
|
-
data: primaryStackColumnAxisData2
|
|
17127
|
-
});
|
|
17239
|
+
});
|
|
17240
|
+
primaryStackColumnAxisData2.forEach((d) => {
|
|
17241
|
+
allGeneratedData.push({
|
|
17242
|
+
properties: {
|
|
17243
|
+
axis: d.properties.axis,
|
|
17244
|
+
type: d.properties.type,
|
|
17245
|
+
legend: d.properties.legend
|
|
17246
|
+
},
|
|
17247
|
+
stackData: tempStackColumnChartDataForPrimaryAxis,
|
|
17248
|
+
data: primaryStackColumnAxisData2
|
|
17128
17249
|
});
|
|
17129
|
-
}
|
|
17130
|
-
|
|
17131
|
-
|
|
17132
|
-
|
|
17133
|
-
|
|
17134
|
-
|
|
17135
|
-
|
|
17136
|
-
|
|
17137
|
-
|
|
17138
|
-
|
|
17139
|
-
|
|
17140
|
-
|
|
17250
|
+
});
|
|
17251
|
+
secondaryStackColumnAxisData2.forEach((d) => {
|
|
17252
|
+
allGeneratedData.push({
|
|
17253
|
+
properties: {
|
|
17254
|
+
axis: d.properties.axis,
|
|
17255
|
+
type: d.properties.type,
|
|
17256
|
+
legend: d.properties.legend
|
|
17257
|
+
},
|
|
17258
|
+
stackData: tempStackColumnChartDataForSecondaryAxis,
|
|
17259
|
+
data: secondaryStackColumnAxisData2
|
|
17260
|
+
});
|
|
17261
|
+
});
|
|
17262
|
+
allGeneratedData.push(...chartJSON.chartData);
|
|
17263
|
+
if (ChartData.length) {
|
|
17264
|
+
const ordered = [];
|
|
17265
|
+
ChartData.forEach((data2) => {
|
|
17266
|
+
ordered.push(
|
|
17267
|
+
...allGeneratedData.filter(
|
|
17268
|
+
(d) => d.properties?.type === data2.properties.type && d.properties.legend === data2.legend
|
|
17269
|
+
)
|
|
17270
|
+
);
|
|
17141
17271
|
});
|
|
17272
|
+
requiredData.push(...ordered);
|
|
17273
|
+
} else {
|
|
17274
|
+
requiredData.push(...allGeneratedData);
|
|
17142
17275
|
}
|
|
17143
|
-
requiredData.push(
|
|
17144
|
-
...chartJSON.chartData,
|
|
17145
|
-
...stackAreaChartDataForPrimaryAxis,
|
|
17146
|
-
...stackAreaChartDataForSecondaryAxis,
|
|
17147
|
-
...stackColumnChartDataForPrimaryAxis,
|
|
17148
|
-
...stackColumnChartDataForSecondaryAxis
|
|
17149
|
-
);
|
|
17150
17276
|
};
|
|
17151
17277
|
const initScale = () => {
|
|
17152
17278
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -17189,7 +17315,7 @@
|
|
|
17189
17315
|
calculatedRange = [0, innerWidth2];
|
|
17190
17316
|
};
|
|
17191
17317
|
const getXScale = () => {
|
|
17192
|
-
xScaleForLegends = band().domain(chartJSON.legendList).range([0, columnWidth]).paddingInner(
|
|
17318
|
+
xScaleForLegends = band().domain(chartJSON.legendList.reverse()).range([0, columnWidth]).paddingInner(
|
|
17193
17319
|
chartJSON.legendList.length > 1 ? 0.3 * parseFloat(formatOptions.plotArea.plotAreaSeriesWidth) / 100 : 0
|
|
17194
17320
|
);
|
|
17195
17321
|
xScale = point$7().domain(filteredDimension).range(calculatedRange).padding(0.5);
|
|
@@ -17219,6 +17345,15 @@
|
|
|
17219
17345
|
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
17220
17346
|
}
|
|
17221
17347
|
if (isSecondaryAxisDrawn) {
|
|
17348
|
+
let responsiveLablesObj = responsiveYaxisLabel$1(
|
|
17349
|
+
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxRight,
|
|
17350
|
+
chartJSON.yMinRight,
|
|
17351
|
+
innerHeight2,
|
|
17352
|
+
formatOptions,
|
|
17353
|
+
chartJSON,
|
|
17354
|
+
customYaxisMinValue,
|
|
17355
|
+
customYaxisMaxValue
|
|
17356
|
+
);
|
|
17222
17357
|
yAxisRight = axisRight(yScaleRight).tickFormat(
|
|
17223
17358
|
(d) => getNumberWithFormat(
|
|
17224
17359
|
d,
|
|
@@ -17227,20 +17362,8 @@
|
|
|
17227
17362
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
17228
17363
|
)
|
|
17229
17364
|
).tickValues(
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
chartJSON.yMinRight,
|
|
17233
|
-
formatOptions,
|
|
17234
|
-
chartJSON
|
|
17235
|
-
).secondaryYAxisLabelArray
|
|
17236
|
-
).ticks(
|
|
17237
|
-
responsiveSecondaryYaxisLabel(
|
|
17238
|
-
secondaryCustomYaxisMaxValue ? secondaryCustomYaxisMaxValue : chartJSON.yMaxRight,
|
|
17239
|
-
chartJSON.yMinRight,
|
|
17240
|
-
formatOptions,
|
|
17241
|
-
chartJSON
|
|
17242
|
-
).secondaryCustomTickValue ?? innerHeight2 / 30
|
|
17243
|
-
).tickSize(
|
|
17365
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
17366
|
+
).ticks(responsiveLablesObj.customTickValue).tickSize(
|
|
17244
17367
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
17245
17368
|
).tickPadding(8).tickSizeOuter(0);
|
|
17246
17369
|
}
|
|
@@ -17257,10 +17380,8 @@
|
|
|
17257
17380
|
drawColumnChart(data2);
|
|
17258
17381
|
break;
|
|
17259
17382
|
case chartTypes.LineChart:
|
|
17260
|
-
drawLineChart([data2]);
|
|
17261
17383
|
break;
|
|
17262
17384
|
case chartTypes.AreaChart:
|
|
17263
|
-
drawAreaChart([data2]);
|
|
17264
17385
|
break;
|
|
17265
17386
|
case chartTypes.StackColumnChart:
|
|
17266
17387
|
stackColumnData = createStackData(data2);
|
|
@@ -17272,6 +17393,18 @@
|
|
|
17272
17393
|
break;
|
|
17273
17394
|
}
|
|
17274
17395
|
});
|
|
17396
|
+
const lineSeries = filteredData.filter(
|
|
17397
|
+
(d) => d.properties.type === chartTypes.LineChart
|
|
17398
|
+
);
|
|
17399
|
+
if (lineSeries.length) {
|
|
17400
|
+
drawLineChart(lineSeries);
|
|
17401
|
+
}
|
|
17402
|
+
const AreaSeries = filteredData.filter(
|
|
17403
|
+
(d) => d.properties.type === chartTypes.AreaChart
|
|
17404
|
+
);
|
|
17405
|
+
if (AreaSeries.length) {
|
|
17406
|
+
drawAreaChart(AreaSeries);
|
|
17407
|
+
}
|
|
17275
17408
|
gTag.selectAll(".parentGroup").raise();
|
|
17276
17409
|
};
|
|
17277
17410
|
const drawColumnChart = (data2) => {
|
|
@@ -17282,19 +17415,15 @@
|
|
|
17282
17415
|
"hoverId",
|
|
17283
17416
|
(d) => d.legend.includes("-") ? d.legend.replace("-", "`").split("`")[1].replace(/ /g, "-") : d.legend.replace(/ /g, "-")
|
|
17284
17417
|
).attr("transform", (d) => `translate(${xScale(d.dimension)}, 0)`);
|
|
17285
|
-
columnGroups.attr(
|
|
17286
|
-
"transform",
|
|
17287
|
-
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
17288
|
-
);
|
|
17289
17418
|
columnGroupsEnter.merge(columnGroups).attr(
|
|
17290
17419
|
"transform",
|
|
17291
17420
|
(d) => `translate(${xScale(d.dimension) - columnWidth / 2}, 0)`
|
|
17292
17421
|
);
|
|
17293
17422
|
columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.legend)).attr("width", xScaleForLegends.bandwidth()).attr("y", (d) => {
|
|
17294
|
-
const yScale = data2.properties.axis ===
|
|
17423
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17295
17424
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
17296
17425
|
}).attr("height", (d) => {
|
|
17297
|
-
const yScale = data2.properties.axis ===
|
|
17426
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
17298
17427
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
17299
17428
|
}).attr("fill", data2.properties.color).attr("stroke-dasharray", (d) => d.stackBorderStyle === 2 ? "5,3" : "0").attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
17300
17429
|
"stroke",
|
|
@@ -17330,7 +17459,8 @@
|
|
|
17330
17459
|
}
|
|
17331
17460
|
],
|
|
17332
17461
|
formatOptions,
|
|
17333
|
-
event2
|
|
17462
|
+
event2,
|
|
17463
|
+
seriesData.filter((e) => e.legend === d.legend)[0].properties
|
|
17334
17464
|
);
|
|
17335
17465
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
17336
17466
|
columnGroups.exit().remove();
|
|
@@ -17345,28 +17475,34 @@
|
|
|
17345
17475
|
const lineGenerator = line$1().x(
|
|
17346
17476
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
17347
17477
|
).y(
|
|
17348
|
-
(d) => d.axis ==
|
|
17478
|
+
(d) => d.axis == axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)
|
|
17349
17479
|
).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
17350
|
-
let lines = gTag.selectAll(".parentGroup").data([
|
|
17480
|
+
let lines = gTag.selectAll(".lines.parentGroup").data([1]);
|
|
17351
17481
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
17352
|
-
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
17482
|
+
let lineGroups = lines.selectAll(".line-group").data(lineData, (d) => d.legend);
|
|
17353
17483
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", "line-group");
|
|
17354
|
-
lineGroupsEnter.attr(
|
|
17484
|
+
lineGroupsEnter.attr(
|
|
17485
|
+
"hoverId",
|
|
17486
|
+
(d) => (d.properties.alias || d.properties.name || "Legend").replace(
|
|
17487
|
+
/\s+/g,
|
|
17488
|
+
"-"
|
|
17489
|
+
)
|
|
17490
|
+
).append("path").attr("class", "line").attr("fill", "none");
|
|
17355
17491
|
lineGroupsEnter.merge(lineGroups).select("path").attr("d", (d) => lineGenerator(d.data)).attr(
|
|
17356
17492
|
"stroke",
|
|
17357
|
-
(d) => d.properties.color !==
|
|
17493
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
17358
17494
|
).attr("stroke-dasharray", (d) => {
|
|
17359
17495
|
switch (d.properties.lineStyle) {
|
|
17360
17496
|
case staticLineStyle.dotted:
|
|
17361
17497
|
return "0,3";
|
|
17362
17498
|
case staticLineStyle.dashed:
|
|
17363
|
-
return
|
|
17499
|
+
return strokeDashValues;
|
|
17364
17500
|
default:
|
|
17365
17501
|
return "";
|
|
17366
17502
|
}
|
|
17367
17503
|
}).attr(
|
|
17368
17504
|
"stroke-linecap",
|
|
17369
|
-
(d) => d.properties.lineStyle === staticLineStyle.dotted ?
|
|
17505
|
+
(d) => d.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
17370
17506
|
).attr(
|
|
17371
17507
|
"stroke-width",
|
|
17372
17508
|
(d) => d.properties.lineStyle !== "None" ? d.properties.lineWidth : "0"
|
|
@@ -17375,7 +17511,7 @@
|
|
|
17375
17511
|
lineMarkers(
|
|
17376
17512
|
lines,
|
|
17377
17513
|
lineData,
|
|
17378
|
-
|
|
17514
|
+
chartTypes.CombinationLine,
|
|
17379
17515
|
xScale,
|
|
17380
17516
|
yScaleLeft,
|
|
17381
17517
|
yScaleRight,
|
|
@@ -17389,45 +17525,57 @@
|
|
|
17389
17525
|
);
|
|
17390
17526
|
};
|
|
17391
17527
|
const drawAreaChart = (lineData) => {
|
|
17528
|
+
lineData.forEach((lData) => {
|
|
17529
|
+
lData.data.forEach((cData) => {
|
|
17530
|
+
cData.hideZero = lData.properties.hideZeroValues;
|
|
17531
|
+
cData.axis = lData.properties.axis;
|
|
17532
|
+
});
|
|
17533
|
+
});
|
|
17392
17534
|
const areaGenerator = area().x(
|
|
17393
17535
|
(d) => xScale(d.dimension) ? xScale(d.dimension) : null
|
|
17394
17536
|
).y0(
|
|
17395
17537
|
(d) => (
|
|
17396
|
-
// d.axis ==
|
|
17538
|
+
// d.axis == axisTypes.primary ?
|
|
17397
17539
|
yScaleLeft(0)
|
|
17398
17540
|
)
|
|
17399
17541
|
// : yScaleRight(0)
|
|
17400
17542
|
).y1(
|
|
17401
17543
|
(d) => (
|
|
17402
|
-
// d.axis ==
|
|
17544
|
+
// d.axis == axisTypes.primary ?
|
|
17403
17545
|
yScaleLeft(d.value)
|
|
17404
17546
|
)
|
|
17405
17547
|
// : yScaleRight((d as TDataPoint).value)
|
|
17406
17548
|
).defined((d) => d.hideZero ? Boolean(d.value) : true).curve(getCurveType(formatOptions));
|
|
17407
|
-
let areas = gTag.selectAll(".parentGroup").data([
|
|
17549
|
+
let areas = gTag.selectAll(".areas.parentGroup").data([1]);
|
|
17408
17550
|
let focus = gTag.append("g").attr("class", "focusClass");
|
|
17409
17551
|
areas = areas.enter().append("g").attr("class", "areas parentGroup").merge(areas);
|
|
17410
|
-
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
17552
|
+
let areaGroups = areas.selectAll(".area-group").data(lineData, (d) => d.legend);
|
|
17411
17553
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
|
|
17412
|
-
areaGroupsEnter.attr(
|
|
17554
|
+
areaGroupsEnter.attr(
|
|
17555
|
+
"hoverId",
|
|
17556
|
+
(d) => (d.properties.alias || d.properties.name || "Legend").replace(
|
|
17557
|
+
/\s+/g,
|
|
17558
|
+
"-"
|
|
17559
|
+
)
|
|
17560
|
+
).append("path").attr("class", "area").attr(
|
|
17413
17561
|
"fill",
|
|
17414
|
-
(d) => d.properties.color !==
|
|
17562
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
17415
17563
|
).style("fill-opacity", formatOptions.plotArea.fillOpacity);
|
|
17416
17564
|
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d) => areaGenerator(d.data)).attr(
|
|
17417
17565
|
"stroke",
|
|
17418
|
-
(d) => d.properties.areaBorderColor !==
|
|
17566
|
+
(d) => d.properties.areaBorderColor !== commonColors.white ? d.properties.areaBorderColor : "none"
|
|
17419
17567
|
).attr("stroke-dasharray", (d) => {
|
|
17420
17568
|
switch (d.properties.lineStyle) {
|
|
17421
17569
|
case "dotted":
|
|
17422
17570
|
return "0,3";
|
|
17423
17571
|
case "dashed":
|
|
17424
|
-
return
|
|
17572
|
+
return strokeDashValues;
|
|
17425
17573
|
default:
|
|
17426
17574
|
return "";
|
|
17427
17575
|
}
|
|
17428
17576
|
}).attr(
|
|
17429
17577
|
"stroke-linecap",
|
|
17430
|
-
(d) => d.properties.lineStyle === "dotted" ?
|
|
17578
|
+
(d) => d.properties.lineStyle === "dotted" ? strokeLineCap.round : ""
|
|
17431
17579
|
).attr(
|
|
17432
17580
|
"stroke-width",
|
|
17433
17581
|
(d) => d.properties.lineStyle !== "None" && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d.properties.lineWidth : "0"
|
|
@@ -17443,14 +17591,35 @@
|
|
|
17443
17591
|
chartType
|
|
17444
17592
|
);
|
|
17445
17593
|
areaGroups.exit().remove();
|
|
17594
|
+
lineMarkers(
|
|
17595
|
+
areas,
|
|
17596
|
+
lineData,
|
|
17597
|
+
chartTypes.CombinationArea,
|
|
17598
|
+
xScale,
|
|
17599
|
+
yScaleLeft,
|
|
17600
|
+
yScaleRight,
|
|
17601
|
+
null,
|
|
17602
|
+
formatOptions,
|
|
17603
|
+
chartJSON,
|
|
17604
|
+
secondaryCustomYaxisMaxValue,
|
|
17605
|
+
secondaryCustomYaxisMinValue,
|
|
17606
|
+
customYaxisMinValue,
|
|
17607
|
+
customYaxisMaxValue
|
|
17608
|
+
);
|
|
17446
17609
|
};
|
|
17447
17610
|
const drawStackAreaChart = (data2) => {
|
|
17611
|
+
data2.data.forEach((lData) => {
|
|
17612
|
+
lData.data.forEach((cData) => {
|
|
17613
|
+
cData.hideZero = lData.properties.hideZeroValues;
|
|
17614
|
+
cData.axis = lData.properties.axis;
|
|
17615
|
+
});
|
|
17616
|
+
});
|
|
17448
17617
|
const areaGenerator = area().x(
|
|
17449
17618
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
17450
17619
|
).y0(
|
|
17451
|
-
(d) => d.data.axis
|
|
17620
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[0]) : yScaleRight(d[0])
|
|
17452
17621
|
).y1(
|
|
17453
|
-
(d) => d.data.axis
|
|
17622
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17454
17623
|
).defined((d) => d.hideZero ? Boolean(d.key) : true).curve(getCurveType(formatOptions));
|
|
17455
17624
|
let areas = gTag.selectAll(".parentGroup").data([stackAreaData]);
|
|
17456
17625
|
gTag.append("g").attr("class", "focusClass");
|
|
@@ -17459,14 +17628,17 @@
|
|
|
17459
17628
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
17460
17629
|
areaGroupsEnter.attr(
|
|
17461
17630
|
"hoverId",
|
|
17462
|
-
(d) =>
|
|
17463
|
-
).append("path").attr("class", "area").attr("fill", (d) => d.color !==
|
|
17464
|
-
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d, i) => areaGenerator(d)).style("opacity", formatOptions.plotArea.fillOpacity).attr(
|
|
17631
|
+
(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, "-")
|
|
17632
|
+
).append("path").attr("class", "area").attr("fill", (d) => d.color !== commonColors.white ? d.color : "none");
|
|
17633
|
+
areaGroupsEnter.merge(areaGroups).select("path").attr("d", (d, i) => areaGenerator(d)).style("opacity", formatOptions.plotArea.fillOpacity).attr(
|
|
17634
|
+
"stroke",
|
|
17635
|
+
(d) => d.color !== commonColors.white ? d.color : "none"
|
|
17636
|
+
).attr(
|
|
17465
17637
|
"stroke-dasharray",
|
|
17466
|
-
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ?
|
|
17638
|
+
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? "0,3" : seriesData[i].properties.lineStyle === "dashed" ? strokeDashValues : ""
|
|
17467
17639
|
).attr(
|
|
17468
17640
|
"stroke-linecap",
|
|
17469
|
-
(d, i) => seriesData[i].properties.lineStyle === "dotted" ?
|
|
17641
|
+
(d, i) => seriesData[i].properties.lineStyle === "dotted" ? strokeLineCap.round : ""
|
|
17470
17642
|
).attr(
|
|
17471
17643
|
"stroke-width",
|
|
17472
17644
|
(d, i) => seriesData[i].properties.lineStyle !== "None" ? seriesData[i].properties.lineWidth : "0"
|
|
@@ -17475,7 +17647,7 @@
|
|
|
17475
17647
|
lineMarkers(
|
|
17476
17648
|
areas,
|
|
17477
17649
|
data2.data,
|
|
17478
|
-
|
|
17650
|
+
chartTypes.CombinationStackArea,
|
|
17479
17651
|
xScale,
|
|
17480
17652
|
yScaleLeft,
|
|
17481
17653
|
yScaleRight,
|
|
@@ -17503,10 +17675,10 @@
|
|
|
17503
17675
|
(d) => d.key.includes("~$~") ? d.key.split("~$~")[1].replace(/ /g, "-") : d.key.replace(/ /g, "-")
|
|
17504
17676
|
).attr("x", (d) => xScaleForLegends("stackLegend")).attr(
|
|
17505
17677
|
"y",
|
|
17506
|
-
(d) => d.data.axis ===
|
|
17678
|
+
(d) => d.data.axis === axisTypes.primary ? yScaleLeft(d[1]) : yScaleRight(d[1])
|
|
17507
17679
|
).attr(
|
|
17508
17680
|
"height",
|
|
17509
|
-
(d) => d.data.axis ===
|
|
17681
|
+
(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])
|
|
17510
17682
|
).attr("width", xScaleForLegends.bandwidth()).attr("fill", (d, i, nodes) => {
|
|
17511
17683
|
const seriesIndex = Array.from(seriesData).findIndex(
|
|
17512
17684
|
(sdata) => sdata.legend === d.key
|
|
@@ -17550,7 +17722,8 @@
|
|
|
17550
17722
|
}
|
|
17551
17723
|
],
|
|
17552
17724
|
formatOptions,
|
|
17553
|
-
event2
|
|
17725
|
+
event2,
|
|
17726
|
+
seriesData.filter((e) => e.legend === d.key)[0].properties
|
|
17554
17727
|
);
|
|
17555
17728
|
}).on("mouseout", hideTooltipOnMouseOut);
|
|
17556
17729
|
stackColumnGroups.exit().remove();
|
|
@@ -17567,7 +17740,8 @@
|
|
|
17567
17740
|
primaryStackAreaAxisData,
|
|
17568
17741
|
primaryStackColumnAxisData,
|
|
17569
17742
|
secondaryStackAreaAxisData,
|
|
17570
|
-
secondaryStackColumnAxisData
|
|
17743
|
+
secondaryStackColumnAxisData,
|
|
17744
|
+
fData
|
|
17571
17745
|
);
|
|
17572
17746
|
filteredData = JSON.parse(JSON.stringify(requiredData));
|
|
17573
17747
|
filteredData.forEach((data2, i) => {
|
|
@@ -17677,6 +17851,20 @@
|
|
|
17677
17851
|
});
|
|
17678
17852
|
return stackChartData;
|
|
17679
17853
|
};
|
|
17854
|
+
const updateStackAxisExtremes = () => {
|
|
17855
|
+
if (primaryStackAxisData.length > 0) {
|
|
17856
|
+
const stackData = primaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, primaryStackColumnAxisData, false) : getStackedData(filteredDimension, primaryStackAreaAxisData, false);
|
|
17857
|
+
const totals = stackData.map((d) => d.total);
|
|
17858
|
+
chartJSON.yMaxLeft = Math.max(chartJSON.yMaxLeft, ...totals);
|
|
17859
|
+
chartJSON.yMinLeft = Math.min(chartJSON.yMinLeft, ...totals);
|
|
17860
|
+
}
|
|
17861
|
+
if (secondaryStackAxisData.length > 0) {
|
|
17862
|
+
const stackData = secondaryStackColumnAxisData.length > 0 ? getStackedData(filteredDimension, secondaryStackColumnAxisData, false) : getStackedData(filteredDimension, secondaryStackAreaAxisData, false);
|
|
17863
|
+
const totals = stackData.map((d) => d.total);
|
|
17864
|
+
chartJSON.yMaxRight = Math.max(chartJSON.yMaxRight, ...totals);
|
|
17865
|
+
chartJSON.yMinRight = Math.min(chartJSON.yMinRight, ...totals);
|
|
17866
|
+
}
|
|
17867
|
+
};
|
|
17680
17868
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17681
17869
|
"svg",
|
|
17682
17870
|
{
|
|
@@ -18014,7 +18202,9 @@
|
|
|
18014
18202
|
)
|
|
18015
18203
|
).tickSize(
|
|
18016
18204
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
18017
|
-
).tickValues(
|
|
18205
|
+
).tickValues(
|
|
18206
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
18207
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
18018
18208
|
}
|
|
18019
18209
|
};
|
|
18020
18210
|
const getXAxis = () => {
|
|
@@ -18034,7 +18224,13 @@
|
|
|
18034
18224
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
18035
18225
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
18036
18226
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
18037
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
18227
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
18228
|
+
"hoverId",
|
|
18229
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
18230
|
+
/\s+/g,
|
|
18231
|
+
"-"
|
|
18232
|
+
)
|
|
18233
|
+
).attr(
|
|
18038
18234
|
"transform",
|
|
18039
18235
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
18040
18236
|
);
|
|
@@ -18047,10 +18243,10 @@
|
|
|
18047
18243
|
(d) => index2 === 0 ? `translate(${xScale(d.dimension) - columnWidth / 2}, 0)` : `translate(${xScale(d.dimension) - columnWidth / (2 + index2 * 2)}, 0)`
|
|
18048
18244
|
);
|
|
18049
18245
|
columnGroupsEnter.append("rect").attr("x", (d) => xScaleForLegends(d.dimension)).attr("width", index2 === 0 ? columnWidth : columnWidth / 2 + index2 * 2).attr("y", (d) => {
|
|
18050
|
-
const yScale = data2.properties.axis ===
|
|
18246
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18051
18247
|
return d.value > 0 ? yScale(d.value) : yScale(0);
|
|
18052
18248
|
}).attr("height", (d) => {
|
|
18053
|
-
const yScale = data2.properties.axis ===
|
|
18249
|
+
const yScale = data2.properties.axis === axisTypes.primary ? yScaleLeft : yScaleRight;
|
|
18054
18250
|
return Math.abs(yScale(d.value) - yScale(0));
|
|
18055
18251
|
}).attr("fill", data2.properties.color).attr(
|
|
18056
18252
|
"stroke-dasharray",
|
|
@@ -18211,11 +18407,8 @@
|
|
|
18211
18407
|
let scrollbarVisible = false;
|
|
18212
18408
|
const chartType = chartTypes.StackColumnChart;
|
|
18213
18409
|
const svgRef = require$$0$1.useRef();
|
|
18214
|
-
const seriesData = generalizedChartData(
|
|
18215
|
-
data.ChartData,
|
|
18216
|
-
data.DimensionList
|
|
18217
|
-
)?.reverse();
|
|
18218
18410
|
const dimensionList = data.DimensionList;
|
|
18411
|
+
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
18219
18412
|
const barChart = false;
|
|
18220
18413
|
const isSecondaryAxisDrawn = false;
|
|
18221
18414
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
@@ -18257,6 +18450,7 @@
|
|
|
18257
18450
|
let scrollPosition = 0;
|
|
18258
18451
|
let visibleBars;
|
|
18259
18452
|
let stackChartData = [];
|
|
18453
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
18260
18454
|
const isNormalizedChart = false;
|
|
18261
18455
|
let chartJSON = {
|
|
18262
18456
|
dimensionList,
|
|
@@ -18279,15 +18473,6 @@
|
|
|
18279
18473
|
logError$2("StackStackColumnchart", "createStackColumnChart", error);
|
|
18280
18474
|
}
|
|
18281
18475
|
}, [formatOptions]);
|
|
18282
|
-
const getResponsiveYParams = () => responsiveYaxisLabel$1(
|
|
18283
|
-
customYaxisMaxValue ? customYaxisMaxValue : chartJSON.yMaxLeft,
|
|
18284
|
-
chartJSON.yMinLeft,
|
|
18285
|
-
innerHeight2,
|
|
18286
|
-
formatOptions,
|
|
18287
|
-
chartJSON,
|
|
18288
|
-
customYaxisMinValue,
|
|
18289
|
-
customYaxisMaxValue
|
|
18290
|
-
);
|
|
18291
18476
|
const createStackColumnChart = () => {
|
|
18292
18477
|
({ formatOptions, svg, width, height } = firstFunctionBeforeRender$1(
|
|
18293
18478
|
svgRef,
|
|
@@ -18411,7 +18596,7 @@
|
|
|
18411
18596
|
width,
|
|
18412
18597
|
legendMargin,
|
|
18413
18598
|
formatOptions,
|
|
18414
|
-
seriesData,
|
|
18599
|
+
[...seriesData].reverse(),
|
|
18415
18600
|
chartId,
|
|
18416
18601
|
staticLegendShape.rectangle
|
|
18417
18602
|
);
|
|
@@ -18474,10 +18659,6 @@
|
|
|
18474
18659
|
}
|
|
18475
18660
|
};
|
|
18476
18661
|
const initScale = () => {
|
|
18477
|
-
let responsiveParams = getResponsiveYParams();
|
|
18478
|
-
let yAxisLabelArray = responsiveParams.yAxisLabelArray;
|
|
18479
|
-
chartJSON.yMaxLeft = yAxisLabelArray[yAxisLabelArray.length - 1];
|
|
18480
|
-
chartJSON.yMinLeft = yAxisLabelArray[0];
|
|
18481
18662
|
{
|
|
18482
18663
|
yScaleLeft = linear$1().domain([
|
|
18483
18664
|
chartJSON.yMinLeft >= 0 ? customYaxisMinValue !== void 0 && !Number.isNaN(customYaxisMinValue) ? customYaxisMinValue : 0 : chartJSON.yMinLeft < 0 ? chartJSON.yMinLeft * 1.1 : chartJSON.yMinLeft * 0.9,
|
|
@@ -18512,7 +18693,9 @@
|
|
|
18512
18693
|
)
|
|
18513
18694
|
).tickSize(
|
|
18514
18695
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
18515
|
-
).tickValues(
|
|
18696
|
+
).tickValues(
|
|
18697
|
+
respParams.autoLabelFlag ? void 0 : respParams.yAxisLabelArray
|
|
18698
|
+
).ticks(respParams.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
18516
18699
|
}
|
|
18517
18700
|
};
|
|
18518
18701
|
const getXAxis = () => {
|
|
@@ -18611,6 +18794,7 @@
|
|
|
18611
18794
|
filteredData = fData;
|
|
18612
18795
|
filteredDimension = fDimension;
|
|
18613
18796
|
visibleBars = fVisibleBars;
|
|
18797
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
18614
18798
|
drawLineChart();
|
|
18615
18799
|
};
|
|
18616
18800
|
const drawLineChart = () => {
|
|
@@ -18660,6 +18844,20 @@
|
|
|
18660
18844
|
dataTableHeight,
|
|
18661
18845
|
isReportEditable
|
|
18662
18846
|
);
|
|
18847
|
+
addTotalValue(
|
|
18848
|
+
totalValueMap,
|
|
18849
|
+
xScale,
|
|
18850
|
+
yScaleLeft,
|
|
18851
|
+
margin,
|
|
18852
|
+
d3Annotation,
|
|
18853
|
+
[],
|
|
18854
|
+
formatOptions,
|
|
18855
|
+
chartType,
|
|
18856
|
+
height,
|
|
18857
|
+
width,
|
|
18858
|
+
svg,
|
|
18859
|
+
isReportEditable
|
|
18860
|
+
);
|
|
18663
18861
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
18664
18862
|
if (formatOptions.xAxisLabel.xAxisPosition != "1") {
|
|
18665
18863
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -18795,7 +18993,7 @@
|
|
|
18795
18993
|
gTag.selectAll("defs > #arrow").remove();
|
|
18796
18994
|
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(
|
|
18797
18995
|
"fill",
|
|
18798
|
-
connectorCfg.connectorMarkerColor !==
|
|
18996
|
+
connectorCfg.connectorMarkerColor !== commonColors.white ? connectorCfg.connectorMarkerColor : "none"
|
|
18799
18997
|
);
|
|
18800
18998
|
getConnectorPath(
|
|
18801
18999
|
pathLineData,
|
|
@@ -18836,7 +19034,7 @@
|
|
|
18836
19034
|
)} H ${xScale(nextBarHeight[i].Dimension) + xScale.bandwidth() / 2 - 10} V ${-10 + yScaleLeft(nextBarHeight[i].Total)}`
|
|
18837
19035
|
).style(
|
|
18838
19036
|
"stroke",
|
|
18839
|
-
formatOptions.connector.connectorLineColor !==
|
|
19037
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
18840
19038
|
).attr("stroke-width", formatOptions.connector.connectorLineThickness).style(
|
|
18841
19039
|
"visibility",
|
|
18842
19040
|
(d) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.xAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -18903,7 +19101,7 @@
|
|
|
18903
19101
|
);
|
|
18904
19102
|
}).style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
18905
19103
|
"fill",
|
|
18906
|
-
formatOptions.connector.connectorFontColor !==
|
|
19104
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
18907
19105
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
18908
19106
|
"text-decoration",
|
|
18909
19107
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -19131,7 +19329,7 @@
|
|
|
19131
19329
|
width,
|
|
19132
19330
|
legendMargin,
|
|
19133
19331
|
formatOptions,
|
|
19134
|
-
seriesData,
|
|
19332
|
+
[...seriesData].reverse(),
|
|
19135
19333
|
chartId,
|
|
19136
19334
|
staticLegendShape.rectangle
|
|
19137
19335
|
);
|
|
@@ -19264,7 +19462,10 @@
|
|
|
19264
19462
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
19265
19463
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
19266
19464
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
19267
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
19465
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
19466
|
+
"hoverId",
|
|
19467
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
19468
|
+
);
|
|
19268
19469
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
19269
19470
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
19270
19471
|
const getPropsForRect = (nodes, i) => {
|
|
@@ -19874,13 +20075,13 @@
|
|
|
19874
20075
|
dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2
|
|
19875
20076
|
).attr("width", yLabel).attr(
|
|
19876
20077
|
"fill",
|
|
19877
|
-
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !==
|
|
20078
|
+
formatOptions.yAxisLabel.yAxisLabelVisibility ? formatOptions.yAxisLabel.yAxisBackgroundColor ? formatOptions.yAxisLabel.yAxisBackgroundColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
19878
20079
|
);
|
|
19879
20080
|
const yAxisG = gTag.append("g").call(yAxisLeft);
|
|
19880
20081
|
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");
|
|
19881
20082
|
yAxisG.selectAll("text").style(
|
|
19882
20083
|
"fill",
|
|
19883
|
-
formatOptions.yAxisLabel.yAxisLabelColor !==
|
|
20084
|
+
formatOptions.yAxisLabel.yAxisLabelColor !== commonColors.white ? formatOptions.yAxisLabel.yAxisLabelColor : "none"
|
|
19884
20085
|
).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(
|
|
19885
20086
|
"text-decoration",
|
|
19886
20087
|
fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
@@ -19907,7 +20108,7 @@
|
|
|
19907
20108
|
`translate(1,${xaxisLabelPosition === "0" ? dataTableHeight > 0 ? innerHeight2 - dataTableHeight : innerHeight2 : xaxisLabelPosition === "1" ? -xLabel : yScale(0)})`
|
|
19908
20109
|
).attr("height", xLabel).attr("width", innerWidth2).attr(
|
|
19909
20110
|
"fill",
|
|
19910
|
-
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !==
|
|
20111
|
+
formatOptions.xAxisLabel.xAxisLabelVisibility ? formatOptions.xAxisLabel.xAxisBackgroundColor ? formatOptions.xAxisLabel.xAxisBackgroundColor !== commonColors.white ? formatOptions.xAxisLabel.xAxisBackgroundColor : "none" : formatOptions.chartArea.chartAreaColor : formatOptions.chartArea.chartAreaColor
|
|
19911
20112
|
);
|
|
19912
20113
|
const XaxisG = gTag.append("g").attr(
|
|
19913
20114
|
"transform",
|
|
@@ -19952,7 +20153,7 @@
|
|
|
19952
20153
|
if (chartFormatOptions.plotArea.numberOfBubbles) {
|
|
19953
20154
|
let currentInnerHeight = legendPosition == "Bottom" ? height - 55 : height - 25;
|
|
19954
20155
|
let object2 = svg.append("foreignObject").attr("transform", `translate(${margins.left},${currentInnerHeight})`).attr("width", width).attr("height", "20px");
|
|
19955
|
-
object2.append("xhtml:div").style("white-space", "pre").style("color",
|
|
20156
|
+
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);
|
|
19956
20157
|
}
|
|
19957
20158
|
} catch (error) {
|
|
19958
20159
|
logError$1(fileName$a, "setnumberOfBubbles", error);
|
|
@@ -20216,7 +20417,9 @@
|
|
|
20216
20417
|
);
|
|
20217
20418
|
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
20218
20419
|
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
20219
|
-
chartJSON.yMaxLeft = parseFloat(
|
|
20420
|
+
chartJSON.yMaxLeft = parseFloat(
|
|
20421
|
+
(yMin + "").length > (yMax + "").length ? yMin + "" : yMax + ""
|
|
20422
|
+
);
|
|
20220
20423
|
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
20221
20424
|
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
20222
20425
|
};
|
|
@@ -20281,7 +20484,10 @@
|
|
|
20281
20484
|
bins.forEach((d) => d.forEach((j) => cumulativeLength.push(j.length)));
|
|
20282
20485
|
chartJSON.yMaxLeft = max$2(cumulativeLength);
|
|
20283
20486
|
chartJSON.yMinLeft = min$2(cumulativeLength);
|
|
20284
|
-
yScaleLeft = linear$1().range([innerHeight2, 0]).domain([
|
|
20487
|
+
yScaleLeft = linear$1().range([innerHeight2, 0]).domain([
|
|
20488
|
+
customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0,
|
|
20489
|
+
customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : chartJSON.yMaxLeft + 0.2 * chartJSON.yMaxLeft
|
|
20490
|
+
]);
|
|
20285
20491
|
};
|
|
20286
20492
|
const initAxis = () => {
|
|
20287
20493
|
getXAxis();
|
|
@@ -20306,12 +20512,23 @@
|
|
|
20306
20512
|
)
|
|
20307
20513
|
).tickSize(
|
|
20308
20514
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + 0 : 0 : 0
|
|
20309
|
-
).tickValues(
|
|
20515
|
+
).tickValues(
|
|
20516
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
20517
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
20310
20518
|
}
|
|
20311
20519
|
};
|
|
20312
20520
|
const getXAxis = () => {
|
|
20313
20521
|
let xaxisLabelPosition = parseInt(formatOptions.xAxisLabel.xAxisPosition);
|
|
20314
|
-
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
20522
|
+
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
20523
|
+
chartJSON.xMax,
|
|
20524
|
+
chartJSON.xMin,
|
|
20525
|
+
innerWidth2,
|
|
20526
|
+
formatOptions,
|
|
20527
|
+
customXaxisMinValue,
|
|
20528
|
+
customXaxisMaxValue,
|
|
20529
|
+
innerHeight2,
|
|
20530
|
+
false
|
|
20531
|
+
).xAxisLabelArray;
|
|
20315
20532
|
labelArray.shift();
|
|
20316
20533
|
xAxis = (xaxisLabelPosition == 1 ? axisTop(xScale) : axisBottom(xScale)).tickFormat(
|
|
20317
20534
|
(d) => getNumberWithFormat(
|
|
@@ -20327,7 +20544,10 @@
|
|
|
20327
20544
|
formatOptions.bins.binsCalculation === "Automatic" ? xAxis.ticks(thresholds) : xAxis.tickValues(periods).ticks(innerWidth2 / 50);
|
|
20328
20545
|
};
|
|
20329
20546
|
const getChartType = (lineData) => {
|
|
20330
|
-
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(
|
|
20547
|
+
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(
|
|
20548
|
+
"stroke",
|
|
20549
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
20550
|
+
).attr(
|
|
20331
20551
|
"stroke-width",
|
|
20332
20552
|
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness
|
|
20333
20553
|
).attr(
|
|
@@ -20339,7 +20559,7 @@
|
|
|
20339
20559
|
return xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth) < 0 ? 0 : xScale(d.x1) - xScale(d.x0) - parseFloat(formatOptions.bins.binsGapWidth);
|
|
20340
20560
|
}).attr("height", function(d) {
|
|
20341
20561
|
return innerHeight2 - yScaleLeft(d.length);
|
|
20342
|
-
}).style("fill", (d) => d.color !==
|
|
20562
|
+
}).style("fill", (d) => d.color !== commonColors.white ? d.color : "none").style("opacity", formatOptions.bins.binsFillOpacity).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
20343
20563
|
showTooltipOnMouseMove(
|
|
20344
20564
|
[
|
|
20345
20565
|
{
|
|
@@ -20348,7 +20568,13 @@
|
|
|
20348
20568
|
},
|
|
20349
20569
|
{
|
|
20350
20570
|
key: formatOptions.yAxisTitle.yAxisTitleText,
|
|
20351
|
-
value: getNumberWithFormat(
|
|
20571
|
+
value: getNumberWithFormat(
|
|
20572
|
+
formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length,
|
|
20573
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
20574
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
20575
|
+
formatOptions.toolTip.toolTipDecimalPrecision,
|
|
20576
|
+
false
|
|
20577
|
+
)
|
|
20352
20578
|
}
|
|
20353
20579
|
],
|
|
20354
20580
|
formatOptions,
|
|
@@ -20691,6 +20917,9 @@
|
|
|
20691
20917
|
let yMinLeft = Infinity;
|
|
20692
20918
|
let yMaxRight = -Infinity;
|
|
20693
20919
|
let yMinRight = Infinity;
|
|
20920
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
20921
|
+
chartJSON.hideZeroValues = true;
|
|
20922
|
+
}
|
|
20694
20923
|
seriesData.forEach((series) => {
|
|
20695
20924
|
legendList.push(
|
|
20696
20925
|
series.properties.alias ? series.properties.alias : series.legend
|
|
@@ -20729,9 +20958,6 @@
|
|
|
20729
20958
|
} else {
|
|
20730
20959
|
filteredDimension = chartJSON.dimensionList;
|
|
20731
20960
|
}
|
|
20732
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
20733
|
-
chartJSON.hideZeroValues = true;
|
|
20734
|
-
}
|
|
20735
20961
|
};
|
|
20736
20962
|
const initScale = () => {
|
|
20737
20963
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -20807,7 +21033,9 @@
|
|
|
20807
21033
|
)
|
|
20808
21034
|
).tickSize(
|
|
20809
21035
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
20810
|
-
).tickValues(
|
|
21036
|
+
).tickValues(
|
|
21037
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
21038
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
20811
21039
|
}
|
|
20812
21040
|
if (isSecondaryAxisDrawn) {
|
|
20813
21041
|
let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
|
|
@@ -20823,7 +21051,9 @@
|
|
|
20823
21051
|
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
20824
21052
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
20825
21053
|
)
|
|
20826
|
-
).tickValues(
|
|
21054
|
+
).tickValues(
|
|
21055
|
+
responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
|
|
21056
|
+
).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
|
|
20827
21057
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
20828
21058
|
).tickPadding(8).tickSizeOuter(0);
|
|
20829
21059
|
}
|
|
@@ -20844,8 +21074,10 @@
|
|
|
20844
21074
|
const val = xScale(d.dimension);
|
|
20845
21075
|
return val != null ? val : 0;
|
|
20846
21076
|
}).y(
|
|
20847
|
-
(d) => d.axis ===
|
|
20848
|
-
).defined(
|
|
21077
|
+
(d) => d.axis === axisTypes.primary ? yScaleLeft(d.value) : yScaleRight(d.value)
|
|
21078
|
+
).defined(
|
|
21079
|
+
(d) => d.hideZero || chartJSON.hideZeroValues ? Boolean(d.value) : true
|
|
21080
|
+
).curve(getCurveType(formatOptions));
|
|
20849
21081
|
let lines = gTag.selectAll(".parentGroup").data([lineData]);
|
|
20850
21082
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
20851
21083
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
@@ -20855,34 +21087,27 @@
|
|
|
20855
21087
|
const g = select$2(this);
|
|
20856
21088
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", (d2) => lineGenerator(d2.data)).attr(
|
|
20857
21089
|
"stroke",
|
|
20858
|
-
(d2) => d2.properties.color !==
|
|
21090
|
+
(d2) => d2.properties.color !== commonColors.white ? d2.properties.color : "none"
|
|
20859
21091
|
).attr("stroke-dasharray", (d2) => {
|
|
21092
|
+
const lineWidth = parseInt(d2.properties.lineWidth);
|
|
20860
21093
|
switch (d2.properties.lineStyle) {
|
|
20861
21094
|
case staticLineStyle.dotted:
|
|
20862
|
-
return
|
|
21095
|
+
return `0,${lineWidth + 2}`;
|
|
20863
21096
|
case staticLineStyle.dashed:
|
|
20864
|
-
return
|
|
21097
|
+
return strokeDashValues;
|
|
20865
21098
|
default:
|
|
20866
21099
|
return "";
|
|
20867
21100
|
}
|
|
20868
21101
|
}).attr(
|
|
20869
21102
|
"stroke-linecap",
|
|
20870
|
-
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ?
|
|
21103
|
+
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
20871
21104
|
).attr(
|
|
20872
21105
|
"stroke-width",
|
|
20873
|
-
(d2) => d2.properties.lineStyle !== "None" ?
|
|
20874
|
-
).attr(
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
'[hoverId="' + getJQuerySelector(d2.properties.alias || d2.properties.name || "Legend").replace(/\s+/g, "-") + '"]'
|
|
20879
|
-
).classed("highlight", true).classed("unhighlight", false);
|
|
20880
|
-
}).on("mouseleave", function(event2, d2) {
|
|
20881
|
-
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
20882
|
-
svg.selectAll(
|
|
20883
|
-
'[hoverId="' + getJQuerySelector(d2.properties?.alias || d2.properties?.name || "Legend").replace(/\s+/g, "-") + '"]'
|
|
20884
|
-
).classed("highlight", false).classed("unhighlight", false);
|
|
20885
|
-
});
|
|
21106
|
+
(d2) => d2.properties.lineStyle !== "None" ? d2.properties.lineWidth : 0
|
|
21107
|
+
).attr(
|
|
21108
|
+
"hoverId",
|
|
21109
|
+
(d.properties.alias || lineGroups.properties.name || "Legend").replace(/\s+/g, "-")
|
|
21110
|
+
).attr("d", (d2) => lineGenerator(d2.data));
|
|
20886
21111
|
});
|
|
20887
21112
|
lineGroups.exit().remove();
|
|
20888
21113
|
lineMarkers(
|
|
@@ -21009,12 +21234,10 @@
|
|
|
21009
21234
|
const barWidth = 0;
|
|
21010
21235
|
const chartType = chartTypes.StackLineChart;
|
|
21011
21236
|
const svgRef = require$$0$1.useRef();
|
|
21012
|
-
const seriesData = generalizedChartData(
|
|
21013
|
-
data.ChartData,
|
|
21014
|
-
data.DimensionList
|
|
21015
|
-
)?.reverse() || [];
|
|
21016
21237
|
const dimensionList = data.DimensionList;
|
|
21238
|
+
const seriesData = (generalizedChartData(data.ChartData, data.DimensionList) || []).reverse();
|
|
21017
21239
|
const barChart = false;
|
|
21240
|
+
const totalValueMap = /* @__PURE__ */ new Map();
|
|
21018
21241
|
const isSecondaryAxisDrawn = false;
|
|
21019
21242
|
let customYaxisMinValue = parseFloat(formatOptions.yAxisLabel.yAxisMinText);
|
|
21020
21243
|
let customYaxisMaxValue = parseFloat(formatOptions.yAxisLabel.yAxisMaxText);
|
|
@@ -21203,7 +21426,7 @@
|
|
|
21203
21426
|
width,
|
|
21204
21427
|
legendMargin,
|
|
21205
21428
|
formatOptions,
|
|
21206
|
-
seriesData,
|
|
21429
|
+
[...seriesData].reverse(),
|
|
21207
21430
|
chartId,
|
|
21208
21431
|
staticLegendShape.line
|
|
21209
21432
|
);
|
|
@@ -21221,10 +21444,27 @@
|
|
|
21221
21444
|
false,
|
|
21222
21445
|
setAndUpdateChartData
|
|
21223
21446
|
);
|
|
21447
|
+
addTotalValue(
|
|
21448
|
+
totalValueMap,
|
|
21449
|
+
xScale,
|
|
21450
|
+
yScaleLeft,
|
|
21451
|
+
margin,
|
|
21452
|
+
d3Annotation,
|
|
21453
|
+
[],
|
|
21454
|
+
formatOptions,
|
|
21455
|
+
chartType,
|
|
21456
|
+
height,
|
|
21457
|
+
width,
|
|
21458
|
+
svg,
|
|
21459
|
+
isReportEditable
|
|
21460
|
+
);
|
|
21224
21461
|
};
|
|
21225
21462
|
const preProcessChartData = () => {
|
|
21226
21463
|
const allChartData = [];
|
|
21227
21464
|
const legendList = [];
|
|
21465
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
21466
|
+
chartJSON.hideZeroValues = true;
|
|
21467
|
+
}
|
|
21228
21468
|
seriesData.forEach((series, index2) => {
|
|
21229
21469
|
const prefixedLegend = `${index2}~$~${series.properties.alias ? series.properties.alias : series.legend}`;
|
|
21230
21470
|
series.properties.legend = prefixedLegend;
|
|
@@ -21273,9 +21513,6 @@
|
|
|
21273
21513
|
chartJSON.dimensionList.forEach((d, i) => {
|
|
21274
21514
|
chartJSON.formattedDimensionListMap.set(d, formatedDimensionList[i]);
|
|
21275
21515
|
});
|
|
21276
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
21277
|
-
chartJSON.hideZeroValues = true;
|
|
21278
|
-
}
|
|
21279
21516
|
};
|
|
21280
21517
|
const initScale = () => {
|
|
21281
21518
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -21339,7 +21576,9 @@
|
|
|
21339
21576
|
)
|
|
21340
21577
|
).tickSize(
|
|
21341
21578
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
21342
|
-
).tickValues(
|
|
21579
|
+
).tickValues(
|
|
21580
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
21581
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
21343
21582
|
}
|
|
21344
21583
|
};
|
|
21345
21584
|
const getXAxis = () => {
|
|
@@ -21356,7 +21595,10 @@
|
|
|
21356
21595
|
});
|
|
21357
21596
|
const lineGenerator = line$1().x(
|
|
21358
21597
|
(d) => xScale(d.data.dimension) ? xScale(d.data.dimension) : null
|
|
21359
|
-
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).
|
|
21598
|
+
).y((d) => d[1] > 0 ? yScaleLeft(d[1]) : yScaleLeft(d[0])).defined((d) => {
|
|
21599
|
+
const a2 = d;
|
|
21600
|
+
return a2.hideZero || chartJSON.hideZeroValues ? a2.data[a2.key] : true;
|
|
21601
|
+
}).curve(getCurveType(formatOptions));
|
|
21360
21602
|
let lines = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
21361
21603
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21362
21604
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
@@ -21364,24 +21606,38 @@
|
|
|
21364
21606
|
lineGroupsEnter.append("path").attr("class", "line").attr("fill", "none");
|
|
21365
21607
|
lineGroupsEnter.merge(lineGroups).each(function(d, i) {
|
|
21366
21608
|
const g = select$2(this);
|
|
21367
|
-
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr(
|
|
21368
|
-
"
|
|
21369
|
-
seriesData[i]
|
|
21370
|
-
).attr(
|
|
21609
|
+
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr(
|
|
21610
|
+
"hoverId",
|
|
21611
|
+
(d2) => (seriesData[i]?.properties?.alias || seriesData[i]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
21612
|
+
).attr("d", lineGenerator(d)).attr("stroke", d.color !== commonColors.white ? d.color : "none").attr("stroke-dasharray", (d2) => {
|
|
21613
|
+
const lineWidth = parseInt(
|
|
21614
|
+
seriesData[i].properties.lineWidth.toString()
|
|
21615
|
+
);
|
|
21616
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
21617
|
+
case staticLineStyle.dotted:
|
|
21618
|
+
return `0,${lineWidth + 2}`;
|
|
21619
|
+
case staticLineStyle.dashed:
|
|
21620
|
+
return strokeDashValues;
|
|
21621
|
+
default:
|
|
21622
|
+
return "";
|
|
21623
|
+
}
|
|
21624
|
+
}).attr(
|
|
21371
21625
|
"stroke-linecap",
|
|
21372
|
-
seriesData[i].properties.lineStyle ===
|
|
21626
|
+
seriesData[i].properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
21373
21627
|
).attr(
|
|
21374
21628
|
"stroke-width",
|
|
21375
|
-
seriesData[i].properties.lineStyle !==
|
|
21629
|
+
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
21376
21630
|
).attr("fill", "none");
|
|
21377
21631
|
const totalLength = pathSel.node().getTotalLength();
|
|
21378
21632
|
{
|
|
21379
21633
|
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
21380
21634
|
}
|
|
21381
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke",
|
|
21635
|
+
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() {
|
|
21382
21636
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
21383
21637
|
svg.selectAll(
|
|
21384
|
-
'[hoverId="' + getJQuerySelector(
|
|
21638
|
+
'[hoverId="' + getJQuerySelector(
|
|
21639
|
+
seriesData[i].properties.alias || seriesData[i].properties.name || "Legend"
|
|
21640
|
+
).replace(/\s+/g, "-") + '"]'
|
|
21385
21641
|
).classed("highlight", true).classed("unhighlight", false);
|
|
21386
21642
|
}).on("mouseleave", function() {
|
|
21387
21643
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
@@ -21512,7 +21768,11 @@
|
|
|
21512
21768
|
(K2, j) => K2.forEach((d) => {
|
|
21513
21769
|
d["key"] = K2.key;
|
|
21514
21770
|
K2["color"] = JSON.parse(JSON.stringify(seriesData[j].properties.color));
|
|
21515
|
-
K2["individualAnnotationVisibility"] = JSON.parse(
|
|
21771
|
+
K2["individualAnnotationVisibility"] = JSON.parse(
|
|
21772
|
+
JSON.stringify(
|
|
21773
|
+
seriesData[j].properties.individualAnnotationVisibility
|
|
21774
|
+
)
|
|
21775
|
+
);
|
|
21516
21776
|
d.data.labelPosition = seriesData[j].properties.dataLabelPosition;
|
|
21517
21777
|
d.data["labelColor"] = seriesColor == "2" ? JSON.parse(JSON.stringify(seriesData[j].properties.color)) : seriesData[j].properties.labelColor;
|
|
21518
21778
|
d["hideZero"] = JSON.parse(
|
|
@@ -21525,6 +21785,7 @@
|
|
|
21525
21785
|
filteredData = fData;
|
|
21526
21786
|
filteredDimension = fDimension;
|
|
21527
21787
|
visibleBars = fVisibleBars;
|
|
21788
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
21528
21789
|
drawLineChart();
|
|
21529
21790
|
};
|
|
21530
21791
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -21547,10 +21808,7 @@
|
|
|
21547
21808
|
const barWidth = 0;
|
|
21548
21809
|
const chartType = chartTypes.NormalizedStackLineChart;
|
|
21549
21810
|
const svgRef = require$$0$1.useRef();
|
|
21550
|
-
const seriesData = generalizedChartData(
|
|
21551
|
-
data.ChartData,
|
|
21552
|
-
data.DimensionList
|
|
21553
|
-
)?.reverse() || [];
|
|
21811
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
21554
21812
|
const dimensionList = data.DimensionList;
|
|
21555
21813
|
const barChart = false;
|
|
21556
21814
|
const isSecondaryAxisDrawn = false;
|
|
@@ -21733,7 +21991,7 @@
|
|
|
21733
21991
|
width,
|
|
21734
21992
|
legendMargin,
|
|
21735
21993
|
formatOptions,
|
|
21736
|
-
seriesData,
|
|
21994
|
+
[...seriesData].reverse(),
|
|
21737
21995
|
chartId,
|
|
21738
21996
|
staticLegendShape.line
|
|
21739
21997
|
);
|
|
@@ -21755,6 +22013,12 @@
|
|
|
21755
22013
|
const preProcessChartData = () => {
|
|
21756
22014
|
const allChartData = [];
|
|
21757
22015
|
const legendList = [];
|
|
22016
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
22017
|
+
chartJSON.hideZeroValues = true;
|
|
22018
|
+
seriesData.forEach((series) => {
|
|
22019
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
22020
|
+
});
|
|
22021
|
+
}
|
|
21758
22022
|
seriesData.forEach((series, index2) => {
|
|
21759
22023
|
const prefixedLegend = `${index2}~$~${series.properties.legend}`;
|
|
21760
22024
|
series.properties.legend = prefixedLegend;
|
|
@@ -21767,9 +22031,6 @@
|
|
|
21767
22031
|
chartJSON.legendList = legendList;
|
|
21768
22032
|
filteredData = JSON.parse(JSON.stringify(seriesData));
|
|
21769
22033
|
filteredDimension = chartJSON.dimensionList;
|
|
21770
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
21771
|
-
chartJSON.hideZeroValues = true;
|
|
21772
|
-
}
|
|
21773
22034
|
const tempStackLineData = getStackedData(
|
|
21774
22035
|
chartJSON.dimensionList,
|
|
21775
22036
|
seriesData,
|
|
@@ -21856,29 +22117,49 @@
|
|
|
21856
22117
|
lines = lines.enter().append("g").attr("class", "lines parentGroup").merge(lines);
|
|
21857
22118
|
let lineGroups = lines.selectAll(".line-group").data((d) => d);
|
|
21858
22119
|
let lineGroupsEnter = lineGroups.enter().append("g").attr("class", (d) => "line-group " + d.key.replace(/ /g, "-"));
|
|
21859
|
-
lineGroupsEnter.attr(
|
|
22120
|
+
lineGroupsEnter.attr(
|
|
22121
|
+
"hoverId",
|
|
22122
|
+
(d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
22123
|
+
).append("path").attr("class", "line").attr("fill", "none");
|
|
21860
22124
|
lineGroupsEnter.merge(lineGroups).each(function(d, i) {
|
|
21861
22125
|
const g = select$2(this);
|
|
21862
|
-
const pathSel = g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine").attr("d", lineGenerator(d)).attr("stroke", d.color !==
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
22126
|
+
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) => {
|
|
22127
|
+
const lineWidth = parseInt(
|
|
22128
|
+
seriesData[i].properties.lineWidth.toString()
|
|
22129
|
+
);
|
|
22130
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
22131
|
+
case staticLineStyle.dotted:
|
|
22132
|
+
return `0,${lineWidth + 2}`;
|
|
22133
|
+
case staticLineStyle.dashed:
|
|
22134
|
+
return strokeDashValues;
|
|
22135
|
+
default:
|
|
22136
|
+
return "";
|
|
22137
|
+
}
|
|
22138
|
+
}).attr(
|
|
21866
22139
|
"stroke-linecap",
|
|
21867
|
-
seriesData[i].properties.lineStyle ===
|
|
22140
|
+
seriesData[i].properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
21868
22141
|
).attr(
|
|
21869
22142
|
"stroke-width",
|
|
21870
|
-
seriesData[i].properties.lineStyle !==
|
|
22143
|
+
seriesData[i].properties.lineStyle !== staticLineStyle.none ? seriesData[i].properties.lineWidth : 0
|
|
21871
22144
|
).attr("fill", "none");
|
|
21872
22145
|
const totalLength = pathSel.node().getTotalLength();
|
|
21873
22146
|
{
|
|
21874
22147
|
pathSel.attr("stroke-dasharray", totalLength + " " + totalLength).attr("stroke-dashoffset", 0);
|
|
21875
22148
|
}
|
|
21876
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", lineGenerator(d)).attr("stroke",
|
|
22149
|
+
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) {
|
|
21877
22150
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
21878
|
-
svg.selectAll(
|
|
22151
|
+
svg.selectAll(
|
|
22152
|
+
'[hoverId="' + getJQuerySelector(
|
|
22153
|
+
lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend"
|
|
22154
|
+
).replace(/\s+/g, "-") + '"]'
|
|
22155
|
+
).classed("highlight", true).classed("unhighlight", false);
|
|
21879
22156
|
}).on("mouseleave", function(event2, d2) {
|
|
21880
22157
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
21881
|
-
svg.selectAll(
|
|
22158
|
+
svg.selectAll(
|
|
22159
|
+
'[hoverId="' + getJQuerySelector(
|
|
22160
|
+
lineData[d2.index]?.properties?.alias || d2[d2.index]?.properties?.name || "Legend"
|
|
22161
|
+
).replace(/\s+/g, "-") + '"]'
|
|
22162
|
+
).classed("highlight", false).classed("unhighlight", false);
|
|
21882
22163
|
});
|
|
21883
22164
|
});
|
|
21884
22165
|
lineGroups.exit().remove();
|
|
@@ -22068,6 +22349,7 @@
|
|
|
22068
22349
|
let secondaryYLabel;
|
|
22069
22350
|
let maxNumberForPrimaryAxis;
|
|
22070
22351
|
let maxNumberForSecondaryAxis;
|
|
22352
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
22071
22353
|
let innerWidth2;
|
|
22072
22354
|
let innerHeight2;
|
|
22073
22355
|
let width;
|
|
@@ -22336,7 +22618,8 @@
|
|
|
22336
22618
|
formatOptions,
|
|
22337
22619
|
chartJSON,
|
|
22338
22620
|
customYaxisMinValue,
|
|
22339
|
-
customYaxisMaxValue
|
|
22621
|
+
customYaxisMaxValue,
|
|
22622
|
+
barChart
|
|
22340
22623
|
);
|
|
22341
22624
|
xAxisBottom = axisBottom(xScaleBottom).tickFormat(
|
|
22342
22625
|
(d) => getNumberWithFormat(
|
|
@@ -22347,7 +22630,9 @@
|
|
|
22347
22630
|
)
|
|
22348
22631
|
).tickSize(
|
|
22349
22632
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
|
|
22350
|
-
).tickValues(
|
|
22633
|
+
).tickValues(
|
|
22634
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
22635
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
22351
22636
|
}
|
|
22352
22637
|
if (isSecondaryAxisDrawn) {
|
|
22353
22638
|
let responsiveSecondaryLablesObj = responsiveSecondaryYaxisLabel(
|
|
@@ -22363,7 +22648,9 @@
|
|
|
22363
22648
|
formatOptions.secondaryYAxisLabel.secondaryYAxisNumberFormat,
|
|
22364
22649
|
formatOptions.secondaryYAxisLabel.secondaryYAxisLabelDecimalPrecision
|
|
22365
22650
|
)
|
|
22366
|
-
).tickValues(
|
|
22651
|
+
).tickValues(
|
|
22652
|
+
responsiveSecondaryLablesObj.autoLabelFlag ? void 0 : responsiveSecondaryLablesObj.secondaryYAxisLabelArray
|
|
22653
|
+
).ticks(responsiveSecondaryLablesObj.secondaryCustomTickValue).tickSize(
|
|
22367
22654
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 : 0 : 0
|
|
22368
22655
|
).tickPadding(8).tickSizeOuter(0);
|
|
22369
22656
|
}
|
|
@@ -22387,13 +22674,31 @@
|
|
|
22387
22674
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
22388
22675
|
column = column.enter().append("g").attr("class", "column parentGroup").merge(column);
|
|
22389
22676
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
22390
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
22391
|
-
|
|
22392
|
-
|
|
22677
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
22678
|
+
"hoverId",
|
|
22679
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
22680
|
+
/\s+/g,
|
|
22681
|
+
"-"
|
|
22682
|
+
)
|
|
22683
|
+
).attr(
|
|
22684
|
+
"transform",
|
|
22685
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22686
|
+
);
|
|
22687
|
+
columnGroups.attr(
|
|
22688
|
+
"transform",
|
|
22689
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22690
|
+
);
|
|
22691
|
+
columnGroupsEnter.merge(columnGroups).attr(
|
|
22692
|
+
"transform",
|
|
22693
|
+
(d) => `translate(0, ${yScale(d.dimension) - columnWidth / 2})`
|
|
22694
|
+
);
|
|
22393
22695
|
const bars = columnGroupsEnter.append("rect").attr("y", (d) => yScaleLegends(d.legend)).attr("height", yScaleLegends.bandwidth()).attr("x", (d) => {
|
|
22394
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22696
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22395
22697
|
return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(0);
|
|
22396
|
-
}).attr("width", 0).attr("fill", data2.properties.color).attr(
|
|
22698
|
+
}).attr("width", 0).attr("fill", data2.properties.color).attr(
|
|
22699
|
+
"stroke-dasharray",
|
|
22700
|
+
(d) => d.stackBorderStyle === 2 ? "5,3" : "0"
|
|
22701
|
+
).attr("stroke-width", (d) => `${d.stackBorderWidth}px`).attr(
|
|
22397
22702
|
"stroke",
|
|
22398
22703
|
(d) => data2.properties.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? data2.properties.stackBorderStyle : "none"
|
|
22399
22704
|
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr(
|
|
@@ -22402,11 +22707,11 @@
|
|
|
22402
22707
|
);
|
|
22403
22708
|
const finalBars = bars;
|
|
22404
22709
|
finalBars.attr("x", (d) => {
|
|
22405
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22710
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22406
22711
|
return d.value >= 0 ? xScaleUsed(0) : xScaleUsed(d.value);
|
|
22407
22712
|
}).attr("width", (d) => {
|
|
22408
|
-
const xScaleUsed = data2.properties.axis ===
|
|
22409
|
-
const maxValue = data2.properties.axis ===
|
|
22713
|
+
const xScaleUsed = data2.properties.axis === axisTypes.primary ? xScaleBottom : xScaleTop;
|
|
22714
|
+
const maxValue = data2.properties.axis === axisTypes.primary ? customYaxisMaxValue : secondaryCustomYaxisMaxValue;
|
|
22410
22715
|
if (d.value >= 0) {
|
|
22411
22716
|
return maxValue && d.value > maxValue ? xScaleUsed(maxValue) - xScaleUsed(0) : xScaleUsed(d.value) - xScaleUsed(0);
|
|
22412
22717
|
} else {
|
|
@@ -22429,7 +22734,11 @@
|
|
|
22429
22734
|
{
|
|
22430
22735
|
key: formatOptions.yAxisTitle.yAxisTitleText || d.value,
|
|
22431
22736
|
value: getNumberWithFormat(
|
|
22432
|
-
[
|
|
22737
|
+
[
|
|
22738
|
+
chartTypes.NormalizedStackLineChart,
|
|
22739
|
+
chartTypes.NormalizedStackAreaChart,
|
|
22740
|
+
""
|
|
22741
|
+
].includes(chartType) ? d[1] - d[0] : d.value,
|
|
22433
22742
|
formatOptions.toolTip.toolTipDisplayUnits,
|
|
22434
22743
|
formatOptions.toolTip.toolTipNumberFormat,
|
|
22435
22744
|
formatOptions.toolTip.toolTipDecimalPrecision
|
|
@@ -22463,6 +22772,7 @@
|
|
|
22463
22772
|
filteredData = fData;
|
|
22464
22773
|
filteredDimension = fDimension;
|
|
22465
22774
|
visibleBars = fVisibleBars;
|
|
22775
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
22466
22776
|
drawColumnChart();
|
|
22467
22777
|
};
|
|
22468
22778
|
const drawColumnChart = () => {
|
|
@@ -22581,6 +22891,7 @@
|
|
|
22581
22891
|
let scrollbarVisible = false;
|
|
22582
22892
|
let stackChartData = [];
|
|
22583
22893
|
const isNormalizedChart = false;
|
|
22894
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
22584
22895
|
let chartJSON = {
|
|
22585
22896
|
dimensionList,
|
|
22586
22897
|
chartType,
|
|
@@ -22704,7 +23015,7 @@
|
|
|
22704
23015
|
width,
|
|
22705
23016
|
legendMargin,
|
|
22706
23017
|
formatOptions,
|
|
22707
|
-
seriesData,
|
|
23018
|
+
[...seriesData].reverse(),
|
|
22708
23019
|
chartId,
|
|
22709
23020
|
staticLegendShape.rectangle
|
|
22710
23021
|
);
|
|
@@ -22826,7 +23137,9 @@
|
|
|
22826
23137
|
)
|
|
22827
23138
|
).tickSize(
|
|
22828
23139
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesVertical ? -innerHeight2 : 0 : 0
|
|
22829
|
-
).tickValues(
|
|
23140
|
+
).tickValues(
|
|
23141
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
23142
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
22830
23143
|
}
|
|
22831
23144
|
};
|
|
22832
23145
|
const getYAxis = () => {
|
|
@@ -22847,14 +23160,22 @@
|
|
|
22847
23160
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
22848
23161
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
22849
23162
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
22850
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23163
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23164
|
+
"hoverId",
|
|
23165
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
23166
|
+
);
|
|
22851
23167
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
22852
23168
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
22853
23169
|
const getPropsForRect = (nodes, i) => {
|
|
22854
|
-
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23170
|
+
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23171
|
+
nodes[i].parentNode
|
|
23172
|
+
);
|
|
22855
23173
|
return { props: seriesData[groupIndex]?.properties, groupIndex };
|
|
22856
23174
|
};
|
|
22857
|
-
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - columnWidth / 2).attr("height", columnWidth).attr(
|
|
23175
|
+
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - columnWidth / 2).attr("height", columnWidth).attr(
|
|
23176
|
+
"fill",
|
|
23177
|
+
(d, i, nodes) => getPropsForRect(nodes, i).props?.color || "gray"
|
|
23178
|
+
).attr("stroke", (d, i, nodes) => {
|
|
22858
23179
|
const props = getPropsForRect(nodes, i).props;
|
|
22859
23180
|
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
22860
23181
|
}).attr(
|
|
@@ -22918,6 +23239,7 @@
|
|
|
22918
23239
|
filteredData = fData;
|
|
22919
23240
|
filteredDimension = fDimension;
|
|
22920
23241
|
visibleBars = fVisibleBars;
|
|
23242
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
22921
23243
|
createStackLineData();
|
|
22922
23244
|
drawLineChart();
|
|
22923
23245
|
};
|
|
@@ -22969,6 +23291,21 @@
|
|
|
22969
23291
|
isReportEditable,
|
|
22970
23292
|
barChart
|
|
22971
23293
|
);
|
|
23294
|
+
addTotalValue(
|
|
23295
|
+
totalValueMap,
|
|
23296
|
+
yScale,
|
|
23297
|
+
xScaleBottom,
|
|
23298
|
+
margin,
|
|
23299
|
+
d3Annotation,
|
|
23300
|
+
[],
|
|
23301
|
+
formatOptions,
|
|
23302
|
+
chartType,
|
|
23303
|
+
height,
|
|
23304
|
+
width,
|
|
23305
|
+
svg,
|
|
23306
|
+
isReportEditable,
|
|
23307
|
+
barChart
|
|
23308
|
+
);
|
|
22972
23309
|
getConnectors();
|
|
22973
23310
|
gTag.selectAll(".connectors").raise();
|
|
22974
23311
|
};
|
|
@@ -23083,7 +23420,7 @@
|
|
|
23083
23420
|
}
|
|
23084
23421
|
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(
|
|
23085
23422
|
"fill",
|
|
23086
|
-
formatOptions.connector.connectorMarkerColor !==
|
|
23423
|
+
formatOptions.connector.connectorMarkerColor !== commonColors.white ? formatOptions.connector.connectorMarkerColor : "none"
|
|
23087
23424
|
);
|
|
23088
23425
|
getConnectorPath(
|
|
23089
23426
|
pathLineData,
|
|
@@ -23135,7 +23472,7 @@
|
|
|
23135
23472
|
}
|
|
23136
23473
|
}).style(
|
|
23137
23474
|
"stroke",
|
|
23138
|
-
formatOptions.connector.connectorLineColor !==
|
|
23475
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
23139
23476
|
).attr("stroke-width", formatOptions.connector.connectorLineThickness).style(
|
|
23140
23477
|
"visibility",
|
|
23141
23478
|
(d, i) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.yAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -23194,7 +23531,7 @@
|
|
|
23194
23531
|
);
|
|
23195
23532
|
}).style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
23196
23533
|
"fill",
|
|
23197
|
-
formatOptions.connector.connectorFontColor !==
|
|
23534
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
23198
23535
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
23199
23536
|
"text-decoration",
|
|
23200
23537
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -23226,7 +23563,10 @@
|
|
|
23226
23563
|
let columnWidth = 0;
|
|
23227
23564
|
const chartType = chartTypes.NormalizedStackHorizontalBarChart;
|
|
23228
23565
|
const svgRef = require$$0$1.useRef();
|
|
23229
|
-
const seriesData = generalizedChartData(
|
|
23566
|
+
const seriesData = generalizedChartData(
|
|
23567
|
+
data.ChartData,
|
|
23568
|
+
data.DimensionList
|
|
23569
|
+
)?.reverse();
|
|
23230
23570
|
const dimensionList = data.DimensionList;
|
|
23231
23571
|
const barChart = true;
|
|
23232
23572
|
const isSecondaryAxisDrawn = false;
|
|
@@ -23391,7 +23731,7 @@
|
|
|
23391
23731
|
width,
|
|
23392
23732
|
legendMargin,
|
|
23393
23733
|
formatOptions,
|
|
23394
|
-
seriesData,
|
|
23734
|
+
[...seriesData].reverse(),
|
|
23395
23735
|
chartId,
|
|
23396
23736
|
staticLegendShape.rectangle
|
|
23397
23737
|
);
|
|
@@ -23521,20 +23861,31 @@
|
|
|
23521
23861
|
let columns = gTag.selectAll(".parentGroup").data([stackChartData]);
|
|
23522
23862
|
columns = columns.enter().append("g").attr("class", "columns parentGroup").merge(columns);
|
|
23523
23863
|
let columnGroups = columns.selectAll(".column-group").data((d) => d);
|
|
23524
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23864
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", (d) => "column-group " + d.key.replace(/ /g, "-")).attr(
|
|
23865
|
+
"hoverId",
|
|
23866
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
23867
|
+
);
|
|
23525
23868
|
columnGroups = columnGroupsEnter.merge(columnGroups);
|
|
23526
23869
|
let rects = columnGroups.selectAll("rect").data((d) => d);
|
|
23527
23870
|
const getPropsForRect = (nodes, i) => {
|
|
23528
|
-
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23871
|
+
const groupIndex = Array.from(columnGroups.nodes()).indexOf(
|
|
23872
|
+
nodes[i].parentNode
|
|
23873
|
+
);
|
|
23529
23874
|
return { props: seriesData[groupIndex]?.properties, groupIndex };
|
|
23530
23875
|
};
|
|
23531
|
-
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr(
|
|
23876
|
+
const baseRects = rects.enter().append("rect").merge(rects).attr("y", (d) => yScale(d.data.dimension) - yScale.bandwidth() / 2).attr("height", yScale.bandwidth()).attr(
|
|
23877
|
+
"fill",
|
|
23878
|
+
(d, i, nodes) => getPropsForRect(nodes, i).props?.color || "gray"
|
|
23879
|
+
).attr("stroke", (d, i, nodes) => {
|
|
23532
23880
|
const props = getPropsForRect(nodes, i).props;
|
|
23533
23881
|
return props?.stackBorderStyle === 0 ? "none" : formatOptions.column.stackBorderVisibility ? props.stackBorderColor : "none";
|
|
23534
23882
|
}).attr(
|
|
23535
23883
|
"stroke-dasharray",
|
|
23536
23884
|
(d, i, nodes) => getPropsForRect(nodes, i).props?.stackBorderStyle === 2 ? "5,3" : "0"
|
|
23537
|
-
).attr(
|
|
23885
|
+
).attr(
|
|
23886
|
+
"stroke-width",
|
|
23887
|
+
(d, i, nodes) => (getPropsForRect(nodes, i).props?.stackBorderWidth || 0) + "px"
|
|
23888
|
+
).style("clip-path", "inset(0px) fill-box").style("shape-rendering", "crispEdges").attr("x", (d) => xScaleBottom(0)).attr("width", 0).attr("visibility", (d, i, nodes) => {
|
|
23538
23889
|
const props = getPropsForRect(nodes, i).props;
|
|
23539
23890
|
return d.data[d.key] === 0 && props?.hideZeroValues ? "hidden" : "visible";
|
|
23540
23891
|
}).on("mousemove", (event2, d) => {
|
|
@@ -23973,7 +24324,9 @@
|
|
|
23973
24324
|
)
|
|
23974
24325
|
).tickSize(
|
|
23975
24326
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 : 0 : 0
|
|
23976
|
-
).tickValues(
|
|
24327
|
+
).tickValues(
|
|
24328
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
24329
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
23977
24330
|
}
|
|
23978
24331
|
};
|
|
23979
24332
|
const getYAxis = () => {
|
|
@@ -23992,7 +24345,13 @@
|
|
|
23992
24345
|
let column = gTag.selectAll(".parentGroup").data([data2], (d) => d.legend);
|
|
23993
24346
|
column = column.enter().append("g").attr("class", `column parentGroup`).merge(column);
|
|
23994
24347
|
let columnGroups = column.selectAll(".column-group").data(data2.data, (d) => d.legend + d.dimension);
|
|
23995
|
-
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
24348
|
+
let columnGroupsEnter = columnGroups.enter().append("g").attr("class", "column-group").attr(
|
|
24349
|
+
"hoverId",
|
|
24350
|
+
(data2.properties.alias || data2.properties.name || "Legend").replace(
|
|
24351
|
+
/\s+/g,
|
|
24352
|
+
"-"
|
|
24353
|
+
)
|
|
24354
|
+
).attr(
|
|
23996
24355
|
"transform",
|
|
23997
24356
|
(d) => index2 === 0 ? `translate(0,${yScale(d.dimension) - columnWidth / 2})` : `translate(0,${yScale(d.dimension) - columnWidth / (2 + index2 * 2)})`
|
|
23998
24357
|
);
|
|
@@ -24235,7 +24594,7 @@
|
|
|
24235
24594
|
}
|
|
24236
24595
|
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(
|
|
24237
24596
|
"fill",
|
|
24238
|
-
formatOptions.connector.connectorMarkerColor !==
|
|
24597
|
+
formatOptions.connector.connectorMarkerColor !== commonColors.white ? formatOptions.connector.connectorMarkerColor : "none"
|
|
24239
24598
|
);
|
|
24240
24599
|
getConnectorPath(
|
|
24241
24600
|
pathLineData,
|
|
@@ -24281,7 +24640,7 @@
|
|
|
24281
24640
|
`
|
|
24282
24641
|
).style(
|
|
24283
24642
|
"stroke",
|
|
24284
|
-
formatOptions.connector.connectorLineColor !==
|
|
24643
|
+
formatOptions.connector.connectorLineColor !== commonColors.white ? formatOptions.connector.connectorLineColor : "none"
|
|
24285
24644
|
).attr("fill", "none").attr("stroke-width", formatOptions.connector.connectorLineThickness).attr("marker-end", "url(#arrow)").style(
|
|
24286
24645
|
"visibility",
|
|
24287
24646
|
(d) => connectorLabelExcludeList.includes(d.Dimension) || d.Total == 0 && formatOptions.yAxisLabel.hideZeroValues ? "hidden" : "visible"
|
|
@@ -24333,7 +24692,7 @@
|
|
|
24333
24692
|
);
|
|
24334
24693
|
}).attr("text-anchor", "start").style("font-size", formatOptions.connector.connectorFontSize).style("font-family", formatOptions.connector.connectorFontFamily).style("font-style", formatOptions.connector.connectorFontStyle).style(
|
|
24335
24694
|
"fill",
|
|
24336
|
-
formatOptions.connector.connectorFontColor !==
|
|
24695
|
+
formatOptions.connector.connectorFontColor !== commonColors.white ? formatOptions.connector.connectorFontColor : "none"
|
|
24337
24696
|
).style("font-weight", "lighter").style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
|
|
24338
24697
|
"text-decoration",
|
|
24339
24698
|
fontStyle.includes("Underline") ? "Underline" : ""
|
|
@@ -24484,7 +24843,14 @@
|
|
|
24484
24843
|
));
|
|
24485
24844
|
initSvg$1(svg, width, height, formatOptions);
|
|
24486
24845
|
gTag = initChartArea$1(svg, margin);
|
|
24487
|
-
initPlotArea(
|
|
24846
|
+
initPlotArea(
|
|
24847
|
+
gTag,
|
|
24848
|
+
formatOptions,
|
|
24849
|
+
dataTableHeight,
|
|
24850
|
+
innerWidth2,
|
|
24851
|
+
innerHeight2,
|
|
24852
|
+
chartType
|
|
24853
|
+
);
|
|
24488
24854
|
binsCalculation();
|
|
24489
24855
|
initScale();
|
|
24490
24856
|
initAxis();
|
|
@@ -24613,7 +24979,9 @@
|
|
|
24613
24979
|
);
|
|
24614
24980
|
let yMin = customYaxisMinValue || customYaxisMinValue == 0 ? customYaxisMinValue : 0;
|
|
24615
24981
|
let yMax = customYaxisMaxValue || customYaxisMaxValue == 0 ? customYaxisMaxValue : filteredData[0]?.data?.length;
|
|
24616
|
-
chartJSON.yMaxLeft = parseFloat(
|
|
24982
|
+
chartJSON.yMaxLeft = parseFloat(
|
|
24983
|
+
(yMin + "").length > (yMax + "").length ? yMin + "" : yMax + ""
|
|
24984
|
+
);
|
|
24617
24985
|
chartJSON.xMax = max$2(cumulativeDataPoints);
|
|
24618
24986
|
chartJSON.xMin = min$2(cumulativeDataPoints);
|
|
24619
24987
|
};
|
|
@@ -24630,7 +24998,9 @@
|
|
|
24630
24998
|
}
|
|
24631
24999
|
};
|
|
24632
25000
|
const calculatingPeriodsWithBins = (isWithWidth) => {
|
|
24633
|
-
filteredData.forEach(
|
|
25001
|
+
filteredData.forEach(
|
|
25002
|
+
(d) => d.data.sort((a2, b) => a2.value - b.value)
|
|
25003
|
+
);
|
|
24634
25004
|
let range2 = chartJSON.xMax - chartJSON.xMin;
|
|
24635
25005
|
let tempPeriod;
|
|
24636
25006
|
if (isWithWidth) {
|
|
@@ -24702,11 +25072,22 @@
|
|
|
24702
25072
|
)
|
|
24703
25073
|
).tickSize(
|
|
24704
25074
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerHeight2 + 0 : 0 : 0
|
|
24705
|
-
).tickValues(
|
|
25075
|
+
).tickValues(
|
|
25076
|
+
responsiveLabelsObj.autoLabelFlag ? void 0 : responsiveLabelsObj.yAxisLabelArray
|
|
25077
|
+
).ticks(responsiveLabelsObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
24706
25078
|
}
|
|
24707
25079
|
};
|
|
24708
25080
|
const getYAxis = () => {
|
|
24709
|
-
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
25081
|
+
let labelArray = responsiveXaxisLabelForNumericValue(
|
|
25082
|
+
chartJSON.xMax,
|
|
25083
|
+
chartJSON.xMin,
|
|
25084
|
+
innerHeight2,
|
|
25085
|
+
formatOptions,
|
|
25086
|
+
customXaxisMinValue,
|
|
25087
|
+
customXaxisMaxValue,
|
|
25088
|
+
innerWidth2,
|
|
25089
|
+
false
|
|
25090
|
+
).xAxisLabelArray;
|
|
24710
25091
|
labelArray.shift();
|
|
24711
25092
|
yAxisLeft = axisLeft(yScaleLeft).tickFormat(
|
|
24712
25093
|
(d) => getNumberWithFormat(
|
|
@@ -24722,7 +25103,16 @@
|
|
|
24722
25103
|
formatOptions.bins.binsCalculation === "Automatic" ? yAxisLeft.ticks(thresholds) : yAxisLeft.tickValues(periods).ticks(innerHeight2 / 50);
|
|
24723
25104
|
};
|
|
24724
25105
|
const getChartType = (lineData) => {
|
|
24725
|
-
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(
|
|
25106
|
+
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(
|
|
25107
|
+
"stroke",
|
|
25108
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderColor
|
|
25109
|
+
).attr(
|
|
25110
|
+
"stroke-width",
|
|
25111
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderThickness
|
|
25112
|
+
).attr(
|
|
25113
|
+
"stroke-opacity",
|
|
25114
|
+
formatOptions.bins.binsBorderVisibility && formatOptions.bins.binsBorderOpacity
|
|
25115
|
+
).attr("x", 0).attr("y", (d) => {
|
|
24726
25116
|
const y02 = yScaleLeft(d.x0);
|
|
24727
25117
|
const y12 = yScaleLeft(d.x1);
|
|
24728
25118
|
return Math.min(y02, y12);
|
|
@@ -24731,7 +25121,7 @@
|
|
|
24731
25121
|
const y12 = yScaleLeft(d.x1);
|
|
24732
25122
|
const gap = parseFloat(formatOptions.bins.binsGapWidth) || 0;
|
|
24733
25123
|
return Math.max(1, Math.abs(y12 - y02) - gap);
|
|
24734
|
-
}).attr("width", (d) => xScale(d.length)).style("fill", (d) => d.color !==
|
|
25124
|
+
}).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) => {
|
|
24735
25125
|
showTooltipOnMouseMove(
|
|
24736
25126
|
[
|
|
24737
25127
|
{
|
|
@@ -24740,7 +25130,13 @@
|
|
|
24740
25130
|
},
|
|
24741
25131
|
{
|
|
24742
25132
|
key: formatOptions.xAxisTitle.xAxisTitleText,
|
|
24743
|
-
value: getNumberWithFormat(
|
|
25133
|
+
value: getNumberWithFormat(
|
|
25134
|
+
formatOptions.toolTip.toolTipNumberFormat == ",.0%" ? Math.abs(d.length / filteredData[0].data.length) : d.length,
|
|
25135
|
+
formatOptions.toolTip.toolTipDisplayUnits,
|
|
25136
|
+
formatOptions.toolTip.toolTipNumberFormat,
|
|
25137
|
+
formatOptions.toolTip.toolTipDecimalPrecision,
|
|
25138
|
+
false
|
|
25139
|
+
)
|
|
24744
25140
|
}
|
|
24745
25141
|
],
|
|
24746
25142
|
formatOptions,
|
|
@@ -24813,7 +25209,14 @@
|
|
|
24813
25209
|
drawColumnChart();
|
|
24814
25210
|
};
|
|
24815
25211
|
const drawColumnChart = () => {
|
|
24816
|
-
initYaxis$1(
|
|
25212
|
+
initYaxis$1(
|
|
25213
|
+
gTag,
|
|
25214
|
+
formatOptions,
|
|
25215
|
+
dataTableHeight,
|
|
25216
|
+
yLabel,
|
|
25217
|
+
yAxisLeft,
|
|
25218
|
+
innerHeight2
|
|
25219
|
+
);
|
|
24817
25220
|
getChartType();
|
|
24818
25221
|
};
|
|
24819
25222
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -25055,6 +25458,12 @@
|
|
|
25055
25458
|
let yMinLeft = Infinity;
|
|
25056
25459
|
let yMaxRight = -Infinity;
|
|
25057
25460
|
let yMinRight = Infinity;
|
|
25461
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
25462
|
+
chartJSON.hideZeroValues = true;
|
|
25463
|
+
seriesData.forEach((series) => {
|
|
25464
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
25465
|
+
});
|
|
25466
|
+
}
|
|
25058
25467
|
seriesData.forEach((series) => {
|
|
25059
25468
|
legendList.push(
|
|
25060
25469
|
series.properties.alias ? series.properties.alias : series.legend
|
|
@@ -25089,9 +25498,6 @@
|
|
|
25089
25498
|
} else {
|
|
25090
25499
|
filteredDimension = chartJSON.dimensionList;
|
|
25091
25500
|
}
|
|
25092
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
25093
|
-
chartJSON.hideZeroValues = true;
|
|
25094
|
-
}
|
|
25095
25501
|
};
|
|
25096
25502
|
const initScale = () => {
|
|
25097
25503
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -25155,7 +25561,9 @@
|
|
|
25155
25561
|
)
|
|
25156
25562
|
).tickSize(
|
|
25157
25563
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
25158
|
-
).tickValues(
|
|
25564
|
+
).tickValues(
|
|
25565
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
25566
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
25159
25567
|
}
|
|
25160
25568
|
};
|
|
25161
25569
|
const getXAxis = () => {
|
|
@@ -25183,8 +25591,14 @@
|
|
|
25183
25591
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", "area-group");
|
|
25184
25592
|
areaGroupsEnter.append("path").attr("class", "area parentGroup").attr(
|
|
25185
25593
|
"fill",
|
|
25186
|
-
(d) => d.properties.color !==
|
|
25187
|
-
).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr(
|
|
25594
|
+
(d) => d.properties.color !== commonColors.white ? d.properties.color : "none"
|
|
25595
|
+
).style("fill-opacity", formatOptions.plotArea.fillOpacity).style("pointer-events", "none").attr(
|
|
25596
|
+
"hoverId",
|
|
25597
|
+
(d) => (d.properties?.alias || d.properties?.name || "Legend").replace(
|
|
25598
|
+
/\s+/g,
|
|
25599
|
+
"-"
|
|
25600
|
+
)
|
|
25601
|
+
).attr("d", (d) => areaGeneratorStart(d.data)).each(function(d) {
|
|
25188
25602
|
{
|
|
25189
25603
|
select$2(this).attr("d", areaGenerator(d.data));
|
|
25190
25604
|
}
|
|
@@ -25193,27 +25607,30 @@
|
|
|
25193
25607
|
const g = select$2(this);
|
|
25194
25608
|
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2.data)).attr(
|
|
25195
25609
|
"stroke",
|
|
25196
|
-
(d2) => d2.properties.areaBorderColor !==
|
|
25610
|
+
(d2) => d2.properties.areaBorderColor !== commonColors.white ? d2.properties.areaBorderColor : "none"
|
|
25197
25611
|
).attr("stroke-dasharray", (d2) => {
|
|
25612
|
+
const lineWidth = parseInt(d2.properties.lineWidth);
|
|
25198
25613
|
switch (d2.properties.lineStyle) {
|
|
25199
|
-
case
|
|
25200
|
-
return
|
|
25201
|
-
case
|
|
25202
|
-
return
|
|
25614
|
+
case staticLineStyle.dotted:
|
|
25615
|
+
return `0,${lineWidth + 2}`;
|
|
25616
|
+
case staticLineStyle.dashed:
|
|
25617
|
+
return strokeDashValues;
|
|
25203
25618
|
default:
|
|
25204
25619
|
return "";
|
|
25205
25620
|
}
|
|
25206
25621
|
}).attr(
|
|
25207
25622
|
"stroke-linecap",
|
|
25208
|
-
(d2) => d2.properties.lineStyle ===
|
|
25623
|
+
(d2) => d2.properties.lineStyle === staticLineStyle.dotted ? strokeLineCap.round : strokeLineCap.butt
|
|
25209
25624
|
).attr(
|
|
25210
25625
|
"stroke-width",
|
|
25211
|
-
(d2) => d2.properties.lineStyle !==
|
|
25626
|
+
(d2) => d2.properties.lineStyle !== staticLineStyle.none && formatOptions.plotArea.plotAreaHideLineAndMarkers ? d2.properties.lineWidth : "0"
|
|
25212
25627
|
).attr("fill", "none");
|
|
25213
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2.data)).attr("fill",
|
|
25628
|
+
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) {
|
|
25214
25629
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true).attr("stroke-width", "2.5");
|
|
25215
25630
|
svg.selectAll(
|
|
25216
|
-
'[hoverId="' + getJQuerySelector(
|
|
25631
|
+
'[hoverId="' + getJQuerySelector(
|
|
25632
|
+
d2.properties?.alias || d2.properties?.name || "Legend"
|
|
25633
|
+
).replace(/\s+/g, "-") + '"]'
|
|
25217
25634
|
).classed("highlight", true).classed("unhighlight", false).attr("stroke-width", "3.5");
|
|
25218
25635
|
}).on("mouseleave", function(event2, d2) {
|
|
25219
25636
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false).attr("stroke-width", "2.5");
|
|
@@ -25361,10 +25778,7 @@
|
|
|
25361
25778
|
const barWidth = 0;
|
|
25362
25779
|
const chartType = chartTypes.StackAreaChart;
|
|
25363
25780
|
const svgRef = require$$0$1.useRef();
|
|
25364
|
-
const seriesData = generalizedChartData(
|
|
25365
|
-
data.ChartData,
|
|
25366
|
-
data.DimensionList
|
|
25367
|
-
)?.reverse() || [];
|
|
25781
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
25368
25782
|
const dimensionList = data.DimensionList;
|
|
25369
25783
|
const barChart = false;
|
|
25370
25784
|
const isSecondaryAxisDrawn = false;
|
|
@@ -25388,6 +25802,7 @@
|
|
|
25388
25802
|
let secondaryYLabel;
|
|
25389
25803
|
let maxNumberForPrimaryAxis;
|
|
25390
25804
|
let maxNumberForSecondaryAxis;
|
|
25805
|
+
let totalValueMap = /* @__PURE__ */ new Map();
|
|
25391
25806
|
let innerWidth2;
|
|
25392
25807
|
let innerHeight2;
|
|
25393
25808
|
let width;
|
|
@@ -25555,7 +25970,7 @@
|
|
|
25555
25970
|
width,
|
|
25556
25971
|
legendMargin,
|
|
25557
25972
|
formatOptions,
|
|
25558
|
-
seriesData,
|
|
25973
|
+
[...seriesData].reverse(),
|
|
25559
25974
|
chartId,
|
|
25560
25975
|
staticLegendShape.areaWithLine
|
|
25561
25976
|
);
|
|
@@ -25578,6 +25993,12 @@
|
|
|
25578
25993
|
const preProcessChartData = () => {
|
|
25579
25994
|
const allChartData = [];
|
|
25580
25995
|
const legendList = [];
|
|
25996
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
25997
|
+
chartJSON.hideZeroValues = true;
|
|
25998
|
+
seriesData.forEach((series) => {
|
|
25999
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
26000
|
+
});
|
|
26001
|
+
}
|
|
25581
26002
|
seriesData.forEach((series, index2) => {
|
|
25582
26003
|
const prefixedLegend = `${index2}~$~${series.properties.alias}`;
|
|
25583
26004
|
series.properties.legend = prefixedLegend;
|
|
@@ -25626,9 +26047,6 @@
|
|
|
25626
26047
|
chartJSON.dimensionList.forEach((d, i) => {
|
|
25627
26048
|
chartJSON.formattedDimensionListMap.set(d, formatedDimensionList[i]);
|
|
25628
26049
|
});
|
|
25629
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
25630
|
-
chartJSON.hideZeroValues = true;
|
|
25631
|
-
}
|
|
25632
26050
|
};
|
|
25633
26051
|
const initScale = () => {
|
|
25634
26052
|
let yAxisLabelArray = responsiveYaxisLabel$1(
|
|
@@ -25692,7 +26110,9 @@
|
|
|
25692
26110
|
)
|
|
25693
26111
|
).tickSize(
|
|
25694
26112
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
25695
|
-
).tickValues(
|
|
26113
|
+
).tickValues(
|
|
26114
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
26115
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
25696
26116
|
}
|
|
25697
26117
|
};
|
|
25698
26118
|
const getXAxis = () => {
|
|
@@ -25722,31 +26142,39 @@
|
|
|
25722
26142
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
25723
26143
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
25724
26144
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
25725
|
-
areaGroupsEnter.append("path").attr(
|
|
26145
|
+
areaGroupsEnter.append("path").attr(
|
|
26146
|
+
"hoverId",
|
|
26147
|
+
(d) => (lineData[d.index].properties.alias || lineData[d.index].properties.name || "Legend").replace(/\s+/g, "-")
|
|
26148
|
+
).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) {
|
|
25726
26149
|
{
|
|
25727
26150
|
select$2(this).attr("d", areaGenerator(d));
|
|
25728
26151
|
}
|
|
25729
26152
|
});
|
|
25730
26153
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
25731
26154
|
const g = select$2(this);
|
|
25732
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
25733
|
-
|
|
25734
|
-
|
|
25735
|
-
|
|
25736
|
-
|
|
25737
|
-
|
|
25738
|
-
|
|
26155
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => areaGenerator(d2)).attr(
|
|
26156
|
+
"stroke",
|
|
26157
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26158
|
+
).attr("stroke-dasharray", (d2) => {
|
|
26159
|
+
const lineWidth = parseInt(
|
|
26160
|
+
seriesData[i].properties.lineWidth.toString()
|
|
26161
|
+
);
|
|
26162
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
26163
|
+
case staticLineStyle.dotted:
|
|
26164
|
+
return `0,${lineWidth + 2}`;
|
|
26165
|
+
case staticLineStyle.dashed:
|
|
26166
|
+
return strokeDashValues;
|
|
25739
26167
|
default:
|
|
25740
26168
|
return "";
|
|
25741
26169
|
}
|
|
25742
26170
|
}).attr(
|
|
25743
26171
|
"stroke-linecap",
|
|
25744
|
-
() => seriesData[i]?.properties?.lineStyle ===
|
|
26172
|
+
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
25745
26173
|
).attr(
|
|
25746
26174
|
"stroke-width",
|
|
25747
|
-
(d2, i2) => seriesData[i2].properties.lineStyle !==
|
|
26175
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
25748
26176
|
).attr("fill", "none").style("pointer-events", "none");
|
|
25749
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => areaGenerator(d2)).attr("fill",
|
|
26177
|
+
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) {
|
|
25750
26178
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
25751
26179
|
svg.selectAll(
|
|
25752
26180
|
'[hoverId="' + (seriesData[d2.index]?.properties?.alias || seriesData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-") + '"]'
|
|
@@ -25795,6 +26223,7 @@
|
|
|
25795
26223
|
filteredData = fData;
|
|
25796
26224
|
filteredDimension = fDimension;
|
|
25797
26225
|
visibleBars = fVisibleBars;
|
|
26226
|
+
createTotalMeasureValueMap(data, totalValueMap, filteredDimension);
|
|
25798
26227
|
createStackLineData();
|
|
25799
26228
|
drawLineChart();
|
|
25800
26229
|
};
|
|
@@ -25854,6 +26283,20 @@
|
|
|
25854
26283
|
true
|
|
25855
26284
|
).labelArray;
|
|
25856
26285
|
drawSeriesLabels(formatOptions, gTag, newSeriesLabelArray);
|
|
26286
|
+
addTotalValue(
|
|
26287
|
+
totalValueMap,
|
|
26288
|
+
xScale,
|
|
26289
|
+
yScaleLeft,
|
|
26290
|
+
margin,
|
|
26291
|
+
d3Annotation,
|
|
26292
|
+
[],
|
|
26293
|
+
formatOptions,
|
|
26294
|
+
chartType,
|
|
26295
|
+
height,
|
|
26296
|
+
width,
|
|
26297
|
+
svg,
|
|
26298
|
+
isReportEditable
|
|
26299
|
+
);
|
|
25857
26300
|
if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
|
|
25858
26301
|
if (formatOptions.xAxisLabel.xAxisPosition != "1")
|
|
25859
26302
|
formatOptions.xAxisLabel.xAxisLabelVisibility = false;
|
|
@@ -25906,6 +26349,7 @@
|
|
|
25906
26349
|
d["hideZero"] = JSON.parse(
|
|
25907
26350
|
JSON.stringify(seriesData[j].properties.hideZeroValues)
|
|
25908
26351
|
);
|
|
26352
|
+
d["properties"] = seriesData[j].properties;
|
|
25909
26353
|
})
|
|
25910
26354
|
);
|
|
25911
26355
|
};
|
|
@@ -25929,10 +26373,7 @@
|
|
|
25929
26373
|
const barWidth = 0;
|
|
25930
26374
|
const chartType = chartTypes.NormalizedStackAreaChart;
|
|
25931
26375
|
const svgRef = require$$0$1.useRef();
|
|
25932
|
-
const seriesData = generalizedChartData(
|
|
25933
|
-
data.ChartData,
|
|
25934
|
-
data.DimensionList
|
|
25935
|
-
)?.reverse() || [];
|
|
26376
|
+
const seriesData = generalizedChartData(data.ChartData, data.DimensionList)?.reverse() || [];
|
|
25936
26377
|
const dimensionList = data.DimensionList;
|
|
25937
26378
|
const barChart = false;
|
|
25938
26379
|
const isSecondaryAxisDrawn = false;
|
|
@@ -26115,7 +26556,7 @@
|
|
|
26115
26556
|
width,
|
|
26116
26557
|
legendMargin,
|
|
26117
26558
|
formatOptions,
|
|
26118
|
-
seriesData,
|
|
26559
|
+
[...seriesData].reverse(),
|
|
26119
26560
|
chartId,
|
|
26120
26561
|
staticLegendShape.areaWithLine
|
|
26121
26562
|
);
|
|
@@ -26137,6 +26578,12 @@
|
|
|
26137
26578
|
const preProcessChartData = () => {
|
|
26138
26579
|
const allChartData = [];
|
|
26139
26580
|
const legendList = [];
|
|
26581
|
+
if (formatOptions.plotArea.hideZeroValues) {
|
|
26582
|
+
chartJSON.hideZeroValues = true;
|
|
26583
|
+
seriesData.forEach((series) => {
|
|
26584
|
+
series.data = series.data.filter((d) => d.value !== 0);
|
|
26585
|
+
});
|
|
26586
|
+
}
|
|
26140
26587
|
seriesData.forEach((series, index2) => {
|
|
26141
26588
|
const prefixedLegend = `${index2}~$~${series.properties.alias}`;
|
|
26142
26589
|
series.properties.legend = prefixedLegend;
|
|
@@ -26161,9 +26608,6 @@
|
|
|
26161
26608
|
} else {
|
|
26162
26609
|
filteredDimension = chartJSON.dimensionList;
|
|
26163
26610
|
}
|
|
26164
|
-
if (formatOptions.plotArea.hideZeroValues) {
|
|
26165
|
-
chartJSON.hideZeroValues = true;
|
|
26166
|
-
}
|
|
26167
26611
|
const tempStackLineData = getStackedData(
|
|
26168
26612
|
chartJSON.dimensionList,
|
|
26169
26613
|
seriesData,
|
|
@@ -26234,8 +26678,10 @@
|
|
|
26234
26678
|
stackChartData.forEach(
|
|
26235
26679
|
(data2, i) => data2.forEach((item, position) => {
|
|
26236
26680
|
const total = item.data.total;
|
|
26237
|
-
lineData[i].data[position]
|
|
26238
|
-
|
|
26681
|
+
if (lineData[i].data[position]) {
|
|
26682
|
+
lineData[i].data[position][0] = item[0] = total === 0 ? 0 : item[0] / total;
|
|
26683
|
+
lineData[i].data[position][1] = item[1] = total === 0 ? 0 : item[1] / total;
|
|
26684
|
+
}
|
|
26239
26685
|
})
|
|
26240
26686
|
);
|
|
26241
26687
|
lineData.forEach((lData) => {
|
|
@@ -26257,7 +26703,10 @@
|
|
|
26257
26703
|
areas = areas.enter().append("g").attr("class", "areas lineGroup").merge(areas);
|
|
26258
26704
|
let areaGroups = areas.selectAll(".area-group").data((d) => d);
|
|
26259
26705
|
let areaGroupsEnter = areaGroups.enter().append("g").attr("class", (d) => "area-group " + d.key.replace(/ /g, "-"));
|
|
26260
|
-
areaGroupsEnter.append("path").attr(
|
|
26706
|
+
areaGroupsEnter.append("path").attr(
|
|
26707
|
+
"hoverId",
|
|
26708
|
+
(d) => (lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
26709
|
+
).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) {
|
|
26261
26710
|
const path2 = select$2(this);
|
|
26262
26711
|
{
|
|
26263
26712
|
path2.attr("d", columnGenerator(d));
|
|
@@ -26265,33 +26714,42 @@
|
|
|
26265
26714
|
});
|
|
26266
26715
|
areaGroupsEnter.merge(areaGroups).each(function(d, i) {
|
|
26267
26716
|
const g = select$2(this);
|
|
26268
|
-
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26269
|
-
|
|
26270
|
-
|
|
26271
|
-
|
|
26272
|
-
|
|
26273
|
-
|
|
26274
|
-
|
|
26717
|
+
g.selectAll("path.visibleLine").data([d]).join("path").attr("class", "visibleLine parentGroup").attr("d", (d2) => columnGenerator(d2)).attr(
|
|
26718
|
+
"stroke",
|
|
26719
|
+
(d2) => d2.color !== commonColors.white ? d2.color : "none"
|
|
26720
|
+
).attr("stroke-dasharray", (d2) => {
|
|
26721
|
+
const lineWidth = parseInt(
|
|
26722
|
+
seriesData[i].properties.lineWidth.toString()
|
|
26723
|
+
);
|
|
26724
|
+
switch (seriesData[i].properties.lineStyle) {
|
|
26725
|
+
case staticLineStyle.dotted:
|
|
26726
|
+
return `0,${lineWidth + 2}`;
|
|
26727
|
+
case staticLineStyle.dashed:
|
|
26728
|
+
return strokeDashValues;
|
|
26275
26729
|
default:
|
|
26276
26730
|
return "";
|
|
26277
26731
|
}
|
|
26278
26732
|
}).attr(
|
|
26279
26733
|
"stroke-linecap",
|
|
26280
|
-
() => seriesData[i]?.properties?.lineStyle ===
|
|
26734
|
+
() => seriesData[i]?.properties?.lineStyle.toLowerCase() === staticLineStyle.dotted ? strokeLineCap.round : ""
|
|
26281
26735
|
).attr(
|
|
26282
26736
|
"stroke-width",
|
|
26283
|
-
(d2, i2) => seriesData[i2].properties.lineStyle !==
|
|
26737
|
+
(d2, i2) => seriesData[i2].properties.lineStyle !== staticLineStyle.none ? seriesData[i2].properties.lineWidth : "0"
|
|
26284
26738
|
).attr("fill", "none").style("pointer-events", "none");
|
|
26285
|
-
g.selectAll("path.hoverLine").data([d]).join("path").attr("class", "hoverLine").attr("d", (d2) => columnGenerator(d2)).attr("fill",
|
|
26739
|
+
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) {
|
|
26286
26740
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", true);
|
|
26287
26741
|
svg.selectAll(
|
|
26288
|
-
'[hoverId="' + getJQuerySelector(
|
|
26742
|
+
'[hoverId="' + getJQuerySelector(
|
|
26743
|
+
(lineData[d2.index]?.properties?.alias || lineData[d2.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
26744
|
+
) + '"]'
|
|
26289
26745
|
).classed("highlight", true).classed("unhighlight", false);
|
|
26290
26746
|
}).on("mouseleave", function() {
|
|
26291
26747
|
svg.selectAll(".parentGroup").classed("highlight", false).classed("unhighlight", false);
|
|
26292
26748
|
});
|
|
26293
26749
|
svg.selectAll(
|
|
26294
|
-
'[hoverId="' + getJQuerySelector(
|
|
26750
|
+
'[hoverId="' + getJQuerySelector(
|
|
26751
|
+
(lineData[d.index]?.properties?.alias || lineData[d.index]?.properties?.name || "Legend").replace(/ /g, "-")
|
|
26752
|
+
) + '"]'
|
|
26295
26753
|
).classed("highlight", false).classed("unhighlight", false);
|
|
26296
26754
|
});
|
|
26297
26755
|
areaGroups.exit().remove();
|
|
@@ -26428,8 +26886,10 @@
|
|
|
26428
26886
|
stackChartData = stack().keys(chartJSON.legendList).offset(none$3)(stackLineData2);
|
|
26429
26887
|
filteredData.forEach(
|
|
26430
26888
|
(data2, index2) => data2.data.forEach((axisData, position) => {
|
|
26431
|
-
|
|
26432
|
-
|
|
26889
|
+
if (stackChartData[index2][position]) {
|
|
26890
|
+
axisData["0"] = stackChartData[index2][position][0];
|
|
26891
|
+
axisData["1"] = stackChartData[index2][position][1];
|
|
26892
|
+
}
|
|
26433
26893
|
})
|
|
26434
26894
|
);
|
|
26435
26895
|
let seriesColor = formatOptions.annotation.annotationSetLabelColor;
|
|
@@ -26547,7 +27007,7 @@
|
|
|
26547
27007
|
let cords = getTotalValueCords(chartFormatOptions, chartTitleHeight, innerWidth2, innerHeight2);
|
|
26548
27008
|
chartAreaTagG.append("g").attr("transform", `translate(${cords.x}, ${cords.y})`).style("user-select", "none").append("text").text(`Total : ${formatedTotalValue}`).style(
|
|
26549
27009
|
"fill",
|
|
26550
|
-
chartFormatOptions.total.totalColor !==
|
|
27010
|
+
chartFormatOptions.total.totalColor !== commonColors.white ? chartFormatOptions.total.totalColor : "none"
|
|
26551
27011
|
).style("font-family", chartFormatOptions.total.totalFontFamily).style("font-size", chartFormatOptions.total.totalFontSize).style("font-style", fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "").style(
|
|
26552
27012
|
"text-decoration",
|
|
26553
27013
|
fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
@@ -26670,9 +27130,12 @@
|
|
|
26670
27130
|
try {
|
|
26671
27131
|
const arc2 = arc$1().innerRadius(0).outerRadius(radius);
|
|
26672
27132
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
26673
|
-
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(
|
|
27133
|
+
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(
|
|
27134
|
+
"hoverId",
|
|
27135
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27136
|
+
).attr(
|
|
26674
27137
|
"fill",
|
|
26675
|
-
(d) => d.data.properties.color !==
|
|
27138
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
26676
27139
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
26677
27140
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
26678
27141
|
}).on("mousemove. ", (d) => {
|
|
@@ -26743,7 +27206,13 @@
|
|
|
26743
27206
|
pieChartData.filter(
|
|
26744
27207
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
26745
27208
|
)
|
|
26746
|
-
).enter().append("text").attr(
|
|
27209
|
+
).enter().append("text").attr(
|
|
27210
|
+
"hoverId",
|
|
27211
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27212
|
+
).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
27213
|
+
"fill",
|
|
27214
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
27215
|
+
).attr(
|
|
26747
27216
|
"font-style",
|
|
26748
27217
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
26749
27218
|
).attr(
|
|
@@ -26757,7 +27226,13 @@
|
|
|
26757
27226
|
).attr(
|
|
26758
27227
|
"font-family",
|
|
26759
27228
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
26760
|
-
).attr(
|
|
27229
|
+
).attr(
|
|
27230
|
+
"transform",
|
|
27231
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27232
|
+
).attr(
|
|
27233
|
+
"visibility",
|
|
27234
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27235
|
+
).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
26761
27236
|
const { plotArea } = chartFormatOptions;
|
|
26762
27237
|
if (plotArea.dataLabelName) {
|
|
26763
27238
|
return d.data.legend;
|
|
@@ -26768,7 +27243,13 @@
|
|
|
26768
27243
|
pieChartData.filter(
|
|
26769
27244
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
26770
27245
|
)
|
|
26771
|
-
).enter().append("text").attr(
|
|
27246
|
+
).enter().append("text").attr(
|
|
27247
|
+
"hoverId",
|
|
27248
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27249
|
+
).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
27250
|
+
"fill",
|
|
27251
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27252
|
+
).attr(
|
|
26772
27253
|
"font-style",
|
|
26773
27254
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
26774
27255
|
).attr(
|
|
@@ -26782,7 +27263,16 @@
|
|
|
26782
27263
|
).attr(
|
|
26783
27264
|
"font-family",
|
|
26784
27265
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
26785
|
-
).attr(
|
|
27266
|
+
).attr(
|
|
27267
|
+
"transform",
|
|
27268
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27269
|
+
).attr(
|
|
27270
|
+
"visibility",
|
|
27271
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27272
|
+
).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr(
|
|
27273
|
+
"dy",
|
|
27274
|
+
chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0"
|
|
27275
|
+
).text((d) => {
|
|
26786
27276
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
26787
27277
|
const dataValue = d.data.data[0].value;
|
|
26788
27278
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -26849,7 +27339,10 @@
|
|
|
26849
27339
|
const textWidth = 80;
|
|
26850
27340
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
26851
27341
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
26852
|
-
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27342
|
+
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27343
|
+
"hoverId",
|
|
27344
|
+
(d) => (d.data.properties.alias || d.data.properties.name || "Legend").replace(/\s+/g, "-")
|
|
27345
|
+
).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
|
|
26853
27346
|
let value2 = d.data.data[0].value.toString();
|
|
26854
27347
|
if (d.data.data[0].value !== void 0) {
|
|
26855
27348
|
value2 = chartFormatOptions.plotArea.dataLabelNumberFormat === ",.0%" ? (Math.abs(d.data[0].value / pieTotalValue) * 100).toFixed(
|
|
@@ -27031,9 +27524,12 @@
|
|
|
27031
27524
|
const arc2 = arc$1().innerRadius(innerRadius).outerRadius(radius);
|
|
27032
27525
|
const arcOver = arc$1().innerRadius(innerRadius).outerRadius(radius + 10);
|
|
27033
27526
|
const parentGroup = chartAreaTagG.append("g").attr("class", "parentGroup").attr("fill-opacity", chartFormatOptions.plotArea.opacity).attr("transform", `${getPiePosition()}`);
|
|
27034
|
-
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27527
|
+
const paths = parentGroup.selectAll("path").data(pieChartData).enter().append("path").attr("class", (d) => "path " + d.data.legend).attr(
|
|
27528
|
+
"hoverId",
|
|
27529
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27530
|
+
).attr(
|
|
27035
27531
|
"fill",
|
|
27036
|
-
(d) => d.data.properties.color !==
|
|
27532
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27037
27533
|
).each(function(d) {
|
|
27038
27534
|
const thisPath = d;
|
|
27039
27535
|
thisPath._current = { startAngle: 0, endAngle: 0 };
|
|
@@ -27115,7 +27611,13 @@
|
|
|
27115
27611
|
pieChartData.filter(
|
|
27116
27612
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27117
27613
|
)
|
|
27118
|
-
).enter().append("text").attr(
|
|
27614
|
+
).enter().append("text").attr(
|
|
27615
|
+
"hoverId",
|
|
27616
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27617
|
+
).attr("font-size", (d) => d.data.properties?.labelFontSize ?? 11).attr(
|
|
27618
|
+
"fill",
|
|
27619
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
27620
|
+
).attr(
|
|
27119
27621
|
"font-style",
|
|
27120
27622
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27121
27623
|
).attr(
|
|
@@ -27129,7 +27631,13 @@
|
|
|
27129
27631
|
).attr(
|
|
27130
27632
|
"font-family",
|
|
27131
27633
|
(d) => d.data.properties?.labelFont ?? "Helvetica"
|
|
27132
|
-
).attr(
|
|
27634
|
+
).attr(
|
|
27635
|
+
"transform",
|
|
27636
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27637
|
+
).attr(
|
|
27638
|
+
"visibility",
|
|
27639
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27640
|
+
).attr("dy", "-0.35em").attr("text-anchor", "middle").attr("alignment-baseline", "middle").text((d) => {
|
|
27133
27641
|
const { plotArea } = chartFormatOptions;
|
|
27134
27642
|
if (plotArea.dataLabelName) {
|
|
27135
27643
|
return d.data.legend;
|
|
@@ -27140,7 +27648,13 @@
|
|
|
27140
27648
|
pieChartData.filter(
|
|
27141
27649
|
(d) => d.data.properties.dataLabelPosition == "1"
|
|
27142
27650
|
)
|
|
27143
|
-
).enter().append("text").attr(
|
|
27651
|
+
).enter().append("text").attr(
|
|
27652
|
+
"hoverId",
|
|
27653
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27654
|
+
).attr("font-size", (d) => d.data.properties?.valueFontSize ?? 11).attr(
|
|
27655
|
+
"fill",
|
|
27656
|
+
(d) => d.data.properties?.lableFontColor ?? commonColors.black
|
|
27657
|
+
).attr(
|
|
27144
27658
|
"font-style",
|
|
27145
27659
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27146
27660
|
).attr(
|
|
@@ -27154,7 +27668,19 @@
|
|
|
27154
27668
|
).attr(
|
|
27155
27669
|
"font-family",
|
|
27156
27670
|
(d) => d.data.properties?.valueFont ?? "Helvetica"
|
|
27157
|
-
).attr(
|
|
27671
|
+
).attr(
|
|
27672
|
+
"fill",
|
|
27673
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27674
|
+
).attr(
|
|
27675
|
+
"transform",
|
|
27676
|
+
(d) => getDataLabelTransformString(d, isSingleDataLabel)
|
|
27677
|
+
).attr(
|
|
27678
|
+
"visibility",
|
|
27679
|
+
(d) => d.endAngle - d.startAngle < 0.17 ? "hidden" : "visible"
|
|
27680
|
+
).attr("text-anchor", "middle").attr("alignment-baseline", "middle").attr(
|
|
27681
|
+
"dy",
|
|
27682
|
+
chartFormatOptions.plotArea.dataLabelName ? "1.00em" : "0"
|
|
27683
|
+
).text((d) => {
|
|
27158
27684
|
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
27159
27685
|
const dataValue = d.data.data[0].value;
|
|
27160
27686
|
if (chartFormatOptions.plotArea.dataLabelValue && dataValue !== void 0) {
|
|
@@ -27180,7 +27706,10 @@
|
|
|
27180
27706
|
).attr(
|
|
27181
27707
|
"font-weight",
|
|
27182
27708
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : "300"
|
|
27183
|
-
).attr(
|
|
27709
|
+
).attr(
|
|
27710
|
+
"fill",
|
|
27711
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
27712
|
+
).attr("fill-opacity", 0.5).text((d) => {
|
|
27184
27713
|
const dataValue = Math.abs(d.data.data[0].value);
|
|
27185
27714
|
if (chartFormatOptions.plotArea.plotAreaAbsoluteValue && dataValue !== void 0) {
|
|
27186
27715
|
return format(".2s")(dataValue);
|
|
@@ -27221,7 +27750,10 @@
|
|
|
27221
27750
|
const textWidth = 80;
|
|
27222
27751
|
const xOffset = midangle < Math.PI ? 0 : -textWidth;
|
|
27223
27752
|
return radius * 1.1 * (midangle < Math.PI ? 1 : -1) + xOffset;
|
|
27224
|
-
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27753
|
+
}).attr("y", (d) => outerRadius.centroid(d)[1] - 30).append("xhtml:div").attr(
|
|
27754
|
+
"hoverId",
|
|
27755
|
+
(d) => (d.data?.properties?.alias || d.data?.properties?.name || "Legend").replace(/\s+/g, "-")
|
|
27756
|
+
).style("display", "flex").style("flex-direction", "column").style("justify-content", "center").style("align-items", "center").style("height", "60px").html((d) => {
|
|
27225
27757
|
try {
|
|
27226
27758
|
let value2 = d.data.data[0].value.toString();
|
|
27227
27759
|
if (d.data.data[0].value !== void 0) {
|
|
@@ -27296,7 +27828,7 @@
|
|
|
27296
27828
|
let fontStyle = chartFormatOptions.total.totalFontStyle;
|
|
27297
27829
|
chartAreaTagG.append("g").attr("transform", getPiePosition()).attr("pointer-events", "none").attr("text-anchor", "middle").append("text").style(
|
|
27298
27830
|
"fill",
|
|
27299
|
-
chartFormatOptions.total.totalColor !==
|
|
27831
|
+
chartFormatOptions.total.totalColor !== commonColors.white ? chartFormatOptions.total.totalColor : "none"
|
|
27300
27832
|
).style("font-family", chartFormatOptions.total.totalFontFamily).style("font-size", chartFormatOptions.total.totalFontSize).style(
|
|
27301
27833
|
"font-style",
|
|
27302
27834
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -27496,29 +28028,33 @@
|
|
|
27496
28028
|
);
|
|
27497
28029
|
}).on("mouseout", () => hideTooltipOnMouseOut());
|
|
27498
28030
|
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);
|
|
27499
|
-
|
|
27500
|
-
"font-style",
|
|
27501
|
-
|
|
27502
|
-
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
28031
|
+
if (chartFormatOptions.plotArea.dataLabels) {
|
|
28032
|
+
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(
|
|
28033
|
+
"font-style",
|
|
28034
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
28035
|
+
).style(
|
|
28036
|
+
"text-decoration",
|
|
28037
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.underline) ? fontStyleOptions.underline : ""
|
|
28038
|
+
).style(
|
|
28039
|
+
"font-weight",
|
|
28040
|
+
(d) => d.data.properties.fontStyle.includes(fontStyleOptions.bold) ? fontStyleOptions.bold : ""
|
|
28041
|
+
).attr("clip-path", (d, i) => `url(#clip-${i}-${chartId})`);
|
|
28042
|
+
if (chartFormatOptions.plotArea.dataLabelName) {
|
|
28043
|
+
leaf.selectAll("text").append("tspan").attr("x", 5).attr("y", "1.1em").text((d) => d.data.legend);
|
|
28044
|
+
}
|
|
28045
|
+
if (chartFormatOptions.plotArea.dataLabelValue) {
|
|
28046
|
+
leaf.selectAll("text").append("tspan").attr("x", 5).attr(
|
|
28047
|
+
"y",
|
|
28048
|
+
chartFormatOptions.plotArea.dataLabelName ? "2.1em" : "1.1em"
|
|
28049
|
+
).text(
|
|
28050
|
+
(d) => getNumberWithFormatFunction(
|
|
28051
|
+
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
28052
|
+
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
28053
|
+
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
28054
|
+
)(d.data.data[0].value)
|
|
28055
|
+
);
|
|
28056
|
+
}
|
|
27511
28057
|
}
|
|
27512
|
-
leaf.selectAll("text").append("tspan").attr("x", 5).attr(
|
|
27513
|
-
"y",
|
|
27514
|
-
chartFormatOptions.plotArea.dataLabelName ? "2.1em" : "1.1em"
|
|
27515
|
-
).text(
|
|
27516
|
-
(d) => getNumberWithFormatFunction(
|
|
27517
|
-
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
27518
|
-
chartFormatOptions.plotArea.dataLabelNumberFormat,
|
|
27519
|
-
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
27520
|
-
)(d.data.data[0].value)
|
|
27521
|
-
);
|
|
27522
28058
|
} catch (error) {
|
|
27523
28059
|
logError$2(fileName$6, "initChartRect", error);
|
|
27524
28060
|
}
|
|
@@ -27653,7 +28189,7 @@
|
|
|
27653
28189
|
const arcOver = arc$1().innerRadius(0).outerRadius(radius + 10);
|
|
27654
28190
|
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(
|
|
27655
28191
|
"fill",
|
|
27656
|
-
(d) => d.data.properties.color !==
|
|
28192
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27657
28193
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
27658
28194
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
27659
28195
|
}).on("mousemove.text", (d) => {
|
|
@@ -27721,7 +28257,7 @@
|
|
|
27721
28257
|
const arcOver = arc$1().innerRadius(0).outerRadius(childRadius + 10);
|
|
27722
28258
|
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(
|
|
27723
28259
|
"fill",
|
|
27724
|
-
(d) => d.data.properties.color !==
|
|
28260
|
+
(d) => d.data.properties.color !== commonColors.white ? d.data.properties.color : "none"
|
|
27725
28261
|
).attr("d", (d) => arc2(d)).on("mouseover.arc", function(d) {
|
|
27726
28262
|
select$2(this).transition().duration(100).attr("d", arcOver);
|
|
27727
28263
|
}).on("mousemove.text", (d) => {
|
|
@@ -27791,7 +28327,10 @@
|
|
|
27791
28327
|
const drawParentPieDataLabels = () => {
|
|
27792
28328
|
try {
|
|
27793
28329
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27794
|
-
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(
|
|
28330
|
+
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(
|
|
28331
|
+
"fill",
|
|
28332
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
28333
|
+
).attr(
|
|
27795
28334
|
"font-style",
|
|
27796
28335
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27797
28336
|
).attr(
|
|
@@ -27812,7 +28351,10 @@
|
|
|
27812
28351
|
}
|
|
27813
28352
|
return "";
|
|
27814
28353
|
});
|
|
27815
|
-
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(
|
|
28354
|
+
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(
|
|
28355
|
+
"fill",
|
|
28356
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
28357
|
+
).attr(
|
|
27816
28358
|
"font-style",
|
|
27817
28359
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27818
28360
|
).attr(
|
|
@@ -27855,7 +28397,10 @@
|
|
|
27855
28397
|
const drawChildPieDataLabels = (childData) => {
|
|
27856
28398
|
try {
|
|
27857
28399
|
if (chartFormatOptions.plotArea.dataLabels) {
|
|
27858
|
-
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(
|
|
28400
|
+
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(
|
|
28401
|
+
"fill",
|
|
28402
|
+
(d) => d.data.properties?.labelFontColor ?? commonColors.black
|
|
28403
|
+
).attr(
|
|
27859
28404
|
"font-style",
|
|
27860
28405
|
(d) => d.data.properties?.labelFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27861
28406
|
).attr(
|
|
@@ -27876,7 +28421,10 @@
|
|
|
27876
28421
|
}
|
|
27877
28422
|
return "";
|
|
27878
28423
|
});
|
|
27879
|
-
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(
|
|
28424
|
+
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(
|
|
28425
|
+
"fill",
|
|
28426
|
+
(d) => d.data.properties?.valueFontColor ?? commonColors.black
|
|
28427
|
+
).attr(
|
|
27880
28428
|
"font-style",
|
|
27881
28429
|
(d) => d.data.properties?.valueFontStyle?.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
27882
28430
|
).attr(
|
|
@@ -27937,18 +28485,6 @@
|
|
|
27937
28485
|
data: []
|
|
27938
28486
|
};
|
|
27939
28487
|
});
|
|
27940
|
-
initLegendListWithTotalValueAllowance(
|
|
27941
|
-
chartFormatOptions,
|
|
27942
|
-
svg,
|
|
27943
|
-
seriesData,
|
|
27944
|
-
width,
|
|
27945
|
-
height,
|
|
27946
|
-
legendListWidth,
|
|
27947
|
-
chartTitleHeight,
|
|
27948
|
-
chartId,
|
|
27949
|
-
margins,
|
|
27950
|
-
staticLegendShape.circle
|
|
27951
|
-
);
|
|
27952
28488
|
} catch (error) {
|
|
27953
28489
|
logError$2(fileName$5, "initLegendList", error);
|
|
27954
28490
|
}
|
|
@@ -28281,7 +28817,7 @@
|
|
|
28281
28817
|
width: 15
|
|
28282
28818
|
},
|
|
28283
28819
|
type: AnnotationTypeMap[annotationType],
|
|
28284
|
-
color: chartFormatOptions.plotArea.dataLabelNameColor !=
|
|
28820
|
+
color: chartFormatOptions.plotArea.dataLabelNameColor != commonColors.black ? chartFormatOptions.plotArea.dataLabelNameColor : commonColors.black,
|
|
28285
28821
|
height: width,
|
|
28286
28822
|
width,
|
|
28287
28823
|
index: i
|
|
@@ -28437,7 +28973,7 @@
|
|
|
28437
28973
|
],
|
|
28438
28974
|
chartFormatOptions,
|
|
28439
28975
|
void 0,
|
|
28440
|
-
|
|
28976
|
+
ChartData[0].properties
|
|
28441
28977
|
);
|
|
28442
28978
|
} catch (error) {
|
|
28443
28979
|
logError$2(
|
|
@@ -28481,7 +29017,9 @@
|
|
|
28481
29017
|
)(progressValue)
|
|
28482
29018
|
}
|
|
28483
29019
|
],
|
|
28484
|
-
chartFormatOptions
|
|
29020
|
+
chartFormatOptions,
|
|
29021
|
+
void 0,
|
|
29022
|
+
ChartData[1].properties
|
|
28485
29023
|
);
|
|
28486
29024
|
} catch (error) {
|
|
28487
29025
|
logError$2(
|
|
@@ -28524,7 +29062,7 @@
|
|
|
28524
29062
|
chartFormatOptions.plotArea.dataLabels ? "visible" : "hidden"
|
|
28525
29063
|
).attr(
|
|
28526
29064
|
"fill",
|
|
28527
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29065
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : chartFormatOptions.toolTip.toolTipDisplayUnits
|
|
28528
29066
|
).attr(
|
|
28529
29067
|
"font-style",
|
|
28530
29068
|
valuefontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -28539,9 +29077,9 @@
|
|
|
28539
29077
|
chartFormatOptions.plotArea.dataLabelValueFontFamily
|
|
28540
29078
|
).attr("font-size", chartFormatOptions.plotArea.dataLabelValueFontSize).text(() => {
|
|
28541
29079
|
return chartFormatOptions.plotArea.dataLabelNumberFormatProgress == ",.0%" ? Math.round(progressValue / maxValue * 100) + "%" : getNumberWithFormatFunction(
|
|
28542
|
-
chartFormatOptions.plotArea.
|
|
29080
|
+
chartFormatOptions.plotArea.plotAreaDisplayUnits,
|
|
28543
29081
|
chartFormatOptions.plotArea.dataLabelNumberFormatProgress,
|
|
28544
|
-
chartFormatOptions.plotArea.
|
|
29082
|
+
chartFormatOptions.plotArea.dataLabelDecimalPrecision
|
|
28545
29083
|
)(progressValue);
|
|
28546
29084
|
});
|
|
28547
29085
|
} catch (error) {
|
|
@@ -28625,10 +29163,9 @@
|
|
|
28625
29163
|
positionDominatorName = "height";
|
|
28626
29164
|
}
|
|
28627
29165
|
positionTransformString = centerTranslation(positionDominatorName);
|
|
28628
|
-
innerRadius =
|
|
28629
|
-
|
|
28630
|
-
|
|
28631
|
-
);
|
|
29166
|
+
innerRadius = convertStringToNumber(
|
|
29167
|
+
chartFormatOptions.plotArea.innerRadiusForSpeedometer
|
|
29168
|
+
) / 100 * radius;
|
|
28632
29169
|
} catch (error) {
|
|
28633
29170
|
logError$2(fileName2, "initChartRadius", error);
|
|
28634
29171
|
}
|
|
@@ -28681,13 +29218,16 @@
|
|
|
28681
29218
|
}
|
|
28682
29219
|
if (colorThemeArray.length < 101) {
|
|
28683
29220
|
for (let index2 = colorThemeArray.length; index2 < 100; index2++) {
|
|
28684
|
-
colorThemeArray.push(
|
|
29221
|
+
colorThemeArray.push(commonColors.black);
|
|
28685
29222
|
}
|
|
28686
29223
|
}
|
|
28687
29224
|
} else {
|
|
28688
|
-
if (
|
|
28689
|
-
|
|
28690
|
-
|
|
29225
|
+
if (chartFormatOptions.colorScale.showColor == colorThemeTypes.none) {
|
|
29226
|
+
const color2 = ChartData[0].properties?.color ?? "#bac8de";
|
|
29227
|
+
for (let index2 = 1; index2 <= customTicksCount; index2++) {
|
|
29228
|
+
colorThemeArray.push(color2);
|
|
29229
|
+
}
|
|
29230
|
+
} else if (chartFormatOptions.colorScale.showColor == colorThemeTypes.discrete) {
|
|
28691
29231
|
for (let index2 = 1; index2 <= customTicksCount; index2++) {
|
|
28692
29232
|
colorThemeArray.push(
|
|
28693
29233
|
chartFormatOptions.colorScale["division" + index2]
|
|
@@ -28837,7 +29377,7 @@
|
|
|
28837
29377
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
28838
29378
|
).attr(
|
|
28839
29379
|
"fill",
|
|
28840
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29380
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
28841
29381
|
).attr(
|
|
28842
29382
|
"font-style",
|
|
28843
29383
|
chartFormatOptions.plotArea.dataLabelValueFontStyle.includes(
|
|
@@ -29008,7 +29548,7 @@
|
|
|
29008
29548
|
let comparedValue = chartAreaTagG.append("g").attr("class", "label").attr("transform", positionTransformString2);
|
|
29009
29549
|
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(
|
|
29010
29550
|
"fill",
|
|
29011
|
-
chartFormatOptions.pointerValue.pointerValueColor !==
|
|
29551
|
+
chartFormatOptions.pointerValue.pointerValueColor !== commonColors.white ? chartFormatOptions.pointerValue.pointerValueColor : "none"
|
|
29012
29552
|
).attr(
|
|
29013
29553
|
"font-style",
|
|
29014
29554
|
valuefontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -29215,7 +29755,7 @@
|
|
|
29215
29755
|
)(d)
|
|
29216
29756
|
).attr(
|
|
29217
29757
|
"fill",
|
|
29218
|
-
chartFormatOptions.plotArea.axialAxisDataLabelColor !==
|
|
29758
|
+
chartFormatOptions.plotArea.axialAxisDataLabelColor !== commonColors.white ? chartFormatOptions.plotArea.axialAxisDataLabelColor : "none"
|
|
29219
29759
|
).style(
|
|
29220
29760
|
"font-size",
|
|
29221
29761
|
chartFormatOptions.plotArea.axialAxisDataLabelFontSize
|
|
@@ -29278,7 +29818,7 @@
|
|
|
29278
29818
|
)(d.data[0].value) : ""}`
|
|
29279
29819
|
).attr(
|
|
29280
29820
|
"fill",
|
|
29281
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
29821
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
29282
29822
|
).style(
|
|
29283
29823
|
"font-size",
|
|
29284
29824
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
@@ -29710,7 +30250,11 @@
|
|
|
29710
30250
|
var d3CloudExports = requireD3Cloud();
|
|
29711
30251
|
const cloud = /* @__PURE__ */ getDefaultExportFromCjs(d3CloudExports);
|
|
29712
30252
|
const fileName$2 = "WordCloud.tsx";
|
|
29713
|
-
const WordCloud = ({
|
|
30253
|
+
const WordCloud = ({
|
|
30254
|
+
data: { ChartData },
|
|
30255
|
+
formatOptions,
|
|
30256
|
+
chartId
|
|
30257
|
+
}) => {
|
|
29714
30258
|
const svgRef = require$$0$1.useRef();
|
|
29715
30259
|
let seriesData = generalizedChartData(ChartData);
|
|
29716
30260
|
let chartFormatOptions;
|
|
@@ -29785,7 +30329,7 @@
|
|
|
29785
30329
|
}
|
|
29786
30330
|
}).attr("text-anchor", "middle").style("font-family", chartFormatOptions.text.textFontFamily).attr("fill", function(d) {
|
|
29787
30331
|
try {
|
|
29788
|
-
return d.properties.color !==
|
|
30332
|
+
return d.properties.color !== commonColors.white ? d.properties.color : "none";
|
|
29789
30333
|
} catch (error) {
|
|
29790
30334
|
logError$2(fileName$2, "draw-fill", error);
|
|
29791
30335
|
return "none";
|
|
@@ -33201,7 +33745,7 @@
|
|
|
33201
33745
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
33202
33746
|
).attr(
|
|
33203
33747
|
"fill",
|
|
33204
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
33748
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
33205
33749
|
).style(
|
|
33206
33750
|
"font-style",
|
|
33207
33751
|
fontStyleValue.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "normal"
|
|
@@ -33254,7 +33798,7 @@
|
|
|
33254
33798
|
chartFormatOptions.plotArea.dataLabelValueFontSize
|
|
33255
33799
|
).attr(
|
|
33256
33800
|
"fill",
|
|
33257
|
-
chartFormatOptions.plotArea.dataLabelValueColor !==
|
|
33801
|
+
chartFormatOptions.plotArea.dataLabelValueColor !== commonColors.white ? chartFormatOptions.plotArea.dataLabelValueColor : "none"
|
|
33258
33802
|
).style(
|
|
33259
33803
|
"font-style",
|
|
33260
33804
|
fontStyleValue.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : "normal"
|
|
@@ -34025,11 +34569,11 @@
|
|
|
34025
34569
|
arrangeFlows();
|
|
34026
34570
|
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(
|
|
34027
34571
|
"stroke",
|
|
34028
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34572
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34029
34573
|
).attr(
|
|
34030
34574
|
"stroke-width",
|
|
34031
34575
|
chartFormatOptions.nodes.nodesBorderVisibility ? chartFormatOptions.nodes.nodesBorderThickness : 0
|
|
34032
|
-
).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 :
|
|
34576
|
+
).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) {
|
|
34033
34577
|
try {
|
|
34034
34578
|
if (chartFormatOptions.toolTip.toolTipVisibility) {
|
|
34035
34579
|
showTooltipOnMouseMove(
|
|
@@ -34053,13 +34597,13 @@
|
|
|
34053
34597
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", 0.1);
|
|
34054
34598
|
chartAreaTagG.select(`#Node${d.index}`).style(
|
|
34055
34599
|
"stroke",
|
|
34056
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34600
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34057
34601
|
).style("fill-opacity", nodesFillOpacity).style("cursor", "pointer");
|
|
34058
34602
|
chartAreaTagG.select(`#Label${d.index}`).style("opacity", 1);
|
|
34059
34603
|
d.sourceLinks.forEach((j) => {
|
|
34060
34604
|
chartAreaTagG.select(`#Node${j.target.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34061
34605
|
"stroke",
|
|
34062
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34606
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34063
34607
|
);
|
|
34064
34608
|
chartAreaTagG.select(`#Link${j.index}`).style("stroke-opacity", linksFillOpacity);
|
|
34065
34609
|
chartAreaTagG.select(`#Label${j.target.index}`).style("opacity", 1);
|
|
@@ -34067,7 +34611,7 @@
|
|
|
34067
34611
|
d.targetLinks.forEach((j) => {
|
|
34068
34612
|
chartAreaTagG.select(`#Node${j.source.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34069
34613
|
"stroke",
|
|
34070
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34614
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34071
34615
|
);
|
|
34072
34616
|
chartAreaTagG.select(`#Link${j.index}`).style("stroke-opacity", linksFillOpacity);
|
|
34073
34617
|
chartAreaTagG.select(`#Label${j.source.index}`).style("opacity", 1);
|
|
@@ -34079,7 +34623,7 @@
|
|
|
34079
34623
|
try {
|
|
34080
34624
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", nodesFillOpacity).style(
|
|
34081
34625
|
"stroke",
|
|
34082
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34626
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34083
34627
|
);
|
|
34084
34628
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", linksFillOpacity);
|
|
34085
34629
|
chartAreaTagG.selectAll(".sankey-nodes-texts").style("opacity", "1");
|
|
@@ -34102,11 +34646,11 @@
|
|
|
34102
34646
|
chartAreaTagG.select(`#Link${d.index}`).style("stroke-opacity", linksFillOpacity).style("cursor", "pointer");
|
|
34103
34647
|
chartAreaTagG.select(`#Node${d.target.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34104
34648
|
"Stroke",
|
|
34105
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34649
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34106
34650
|
);
|
|
34107
34651
|
chartAreaTagG.select(`#Node${d.source.index}`).style("fill-opacity", nodesFillOpacity).style(
|
|
34108
34652
|
"Stroke",
|
|
34109
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34653
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34110
34654
|
);
|
|
34111
34655
|
chartAreaTagG.select(`#Label${d.target.index}`).style("opacity", 1);
|
|
34112
34656
|
chartAreaTagG.select(`#Label${d.source.index}`).style("opacity", 1);
|
|
@@ -34138,7 +34682,7 @@
|
|
|
34138
34682
|
chartAreaTagG.selectAll(".sankey-nodes").style("fill-opacity", nodesFillOpacity);
|
|
34139
34683
|
chartAreaTagG.selectAll(".sankey-nodes").style(
|
|
34140
34684
|
"stroke",
|
|
34141
|
-
chartFormatOptions.nodes.nodesBorderColor !==
|
|
34685
|
+
chartFormatOptions.nodes.nodesBorderColor !== commonColors.white ? chartFormatOptions.nodes.nodesBorderColor : "none"
|
|
34142
34686
|
);
|
|
34143
34687
|
chartAreaTagG.selectAll(".sankey-links").style("stroke-opacity", linksFillOpacity);
|
|
34144
34688
|
chartAreaTagG.selectAll(".sankey-nodes-texts").style("opacity", "1");
|
|
@@ -52363,7 +52907,7 @@
|
|
|
52363
52907
|
(d) => d.legendName.replace(/ /g, "-")
|
|
52364
52908
|
).attr(
|
|
52365
52909
|
"fill",
|
|
52366
|
-
(d) => d.legendColor !==
|
|
52910
|
+
(d) => d.legendColor !== commonColors.white ? d.legendColor : "none"
|
|
52367
52911
|
).append("path").attr("class", "path").attr("id", function(d, i) {
|
|
52368
52912
|
select$2(this).attr(
|
|
52369
52913
|
"d",
|
|
@@ -52634,7 +53178,7 @@
|
|
|
52634
53178
|
measure: d.value,
|
|
52635
53179
|
measureName: series.legend ?? "Measure",
|
|
52636
53180
|
legendName: series.legend,
|
|
52637
|
-
legendColor: series.properties?.color ??
|
|
53181
|
+
legendColor: series.properties?.color ?? commonColors.black,
|
|
52638
53182
|
tooltip: ""
|
|
52639
53183
|
}));
|
|
52640
53184
|
} catch (e) {
|
|
@@ -53146,7 +53690,7 @@
|
|
|
53146
53690
|
if (legendPosition == staticLegendPosition.bottom || legendPosition == staticLegendPosition.top)
|
|
53147
53691
|
innerdiv.style("margin-right", "16px").style("white-space", "nowrap");
|
|
53148
53692
|
innerdiv.append("div").style("height", "10px").style("width", "10px").style("background", d.color).style("border-radius", "1px");
|
|
53149
|
-
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? d.color ? d.color :
|
|
53693
|
+
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? d.color ? d.color : commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
53150
53694
|
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(
|
|
53151
53695
|
"font-style",
|
|
53152
53696
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -53203,7 +53747,7 @@
|
|
|
53203
53747
|
if (legendPosition == staticLegendPosition.top || legendPosition == staticLegendPosition.bottom)
|
|
53204
53748
|
innerdiv.style("margin-right", "16px").style("white-space", "nowrap");
|
|
53205
53749
|
shapesForScatterPlot(innerdiv, d.markerShape);
|
|
53206
|
-
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ?
|
|
53750
|
+
let legendColor = chartFormatOptions.legends.legendColorMode == "1" ? commonColors.black : chartFormatOptions.legends.legendSelectedUnicolor;
|
|
53207
53751
|
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(
|
|
53208
53752
|
"font-style",
|
|
53209
53753
|
fontStyle.includes(fontStyleOptions.italic) ? fontStyleOptions.italic : ""
|
|
@@ -53549,7 +54093,9 @@
|
|
|
53549
54093
|
if (formatOptions.xAxisLabel.hideZeroValues) {
|
|
53550
54094
|
if (tempDimensionList.length > 0) {
|
|
53551
54095
|
tempDimensionList.forEach((dimension) => {
|
|
53552
|
-
chartJSON.legendList = chartJSON.legendList.filter(
|
|
54096
|
+
chartJSON.legendList = chartJSON.legendList.filter(
|
|
54097
|
+
(dim) => dim !== dimension
|
|
54098
|
+
);
|
|
53553
54099
|
});
|
|
53554
54100
|
}
|
|
53555
54101
|
chartJSON.dimensionList = chartJSON.legendList;
|
|
@@ -53568,7 +54114,11 @@
|
|
|
53568
54114
|
tempWaterfallChartData && tempWaterfallChartData.forEach((d, i) => {
|
|
53569
54115
|
if (d.dimension) {
|
|
53570
54116
|
tempDimensionList.push(d.dimension);
|
|
53571
|
-
tempDimensionListWithIndex.push({
|
|
54117
|
+
tempDimensionListWithIndex.push({
|
|
54118
|
+
dimension: d.dimension,
|
|
54119
|
+
chartDataIndex: i,
|
|
54120
|
+
selfIndex: tempDimensionListWithIndex.length
|
|
54121
|
+
});
|
|
53572
54122
|
}
|
|
53573
54123
|
});
|
|
53574
54124
|
if (isDateType) {
|
|
@@ -53579,7 +54129,9 @@
|
|
|
53579
54129
|
} else {
|
|
53580
54130
|
tempformatedDimensionList = tempDimensionList;
|
|
53581
54131
|
}
|
|
53582
|
-
let formatedDimensionList = JSON.parse(
|
|
54132
|
+
let formatedDimensionList = JSON.parse(
|
|
54133
|
+
JSON.stringify(chartJSON.legendList)
|
|
54134
|
+
);
|
|
53583
54135
|
tempDimensionListWithIndex.forEach((listItem, i) => {
|
|
53584
54136
|
formatedDimensionList[listItem.chartDataIndex] = tempformatedDimensionList[listItem.selfIndex];
|
|
53585
54137
|
});
|
|
@@ -53652,7 +54204,9 @@
|
|
|
53652
54204
|
)
|
|
53653
54205
|
).tickSize(
|
|
53654
54206
|
formatOptions.plotArea.gridLinesVisibility ? formatOptions.plotArea.gridLinesHorizontal ? -innerWidth2 + (seriesLabelWidth ? seriesLabelWidth : 0) : 0 : 0
|
|
53655
|
-
).tickValues(
|
|
54207
|
+
).tickValues(
|
|
54208
|
+
responsiveLablesObj.autoLabelFlag ? void 0 : responsiveLablesObj.yAxisLabelArray
|
|
54209
|
+
).ticks(responsiveLablesObj.customTickValue).tickPadding(8).tickSizeOuter(0);
|
|
53656
54210
|
}
|
|
53657
54211
|
colorScale = ordinal().domain(["base", "dimensionTotal", "up", "down"]).range([
|
|
53658
54212
|
formatOptions.plotArea.totalColor,
|
|
@@ -53668,9 +54222,7 @@
|
|
|
53668
54222
|
};
|
|
53669
54223
|
const getChartType = (lineData) => {
|
|
53670
54224
|
let totalStackData;
|
|
53671
|
-
waterFallData.forEach(
|
|
53672
|
-
(K2, j) => K2.forEach((d) => d["key"] = K2.key)
|
|
53673
|
-
);
|
|
54225
|
+
waterFallData.forEach((K2, j) => K2.forEach((d) => d["key"] = K2.key));
|
|
53674
54226
|
if (stackTotalData) {
|
|
53675
54227
|
let stackDataLegendList = filteredData.map((name) => name.legend);
|
|
53676
54228
|
totalStackData = stack().keys(stackDataLegendList)(stackTotalData);
|
|
@@ -53689,10 +54241,30 @@
|
|
|
53689
54241
|
let parentGroup = gTag.selectAll(`.parentGroup-${k2}`).data([null]);
|
|
53690
54242
|
parentGroup = parentGroup.enter().append("g").attr("class", `parentGroup parentGroup-${k2}`).merge(parentGroup);
|
|
53691
54243
|
let barGroups = parentGroup.selectAll(`.bar-group-${k2}`).data(waterFallData);
|
|
53692
|
-
const barGroupsEnter = barGroups.enter().append("g").attr("class", `bar-group-${k2}`).attr(
|
|
54244
|
+
const barGroupsEnter = barGroups.enter().append("g").attr("class", `bar-group-${k2}`).attr(
|
|
54245
|
+
"fill",
|
|
54246
|
+
(d) => d.color ? d.color : colorScale(d.key) !== commonColors.white ? colorScale(d.key) : "none"
|
|
54247
|
+
).attr("opacity", (d) => d.opacity);
|
|
53693
54248
|
barGroups = barGroupsEnter.merge(barGroups);
|
|
53694
|
-
let rects = barGroups.selectAll("rect").data(
|
|
53695
|
-
|
|
54249
|
+
let rects = barGroups.selectAll("rect").data(
|
|
54250
|
+
(d) => d,
|
|
54251
|
+
(d) => d.key || d.Key
|
|
54252
|
+
);
|
|
54253
|
+
const rectsEnter = rects.enter().append("rect").attr("class", "rect").attr(
|
|
54254
|
+
"class",
|
|
54255
|
+
(d) => d.key ? d.key.replace(/ /g, "-") : d.Key.replace(/ /g, "-")
|
|
54256
|
+
).attr(
|
|
54257
|
+
"x",
|
|
54258
|
+
(d) => xScale(
|
|
54259
|
+
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
54260
|
+
)
|
|
54261
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) : 0).attr(
|
|
54262
|
+
"height",
|
|
54263
|
+
(d) => d[1] ? yScaleLeft(d[0]) - yScaleLeft(d[1]) : 0
|
|
54264
|
+
).attr("width", xScale.bandwidth()).attr(
|
|
54265
|
+
"visibility",
|
|
54266
|
+
(d) => k2 === 0 && d.data.dimension && stackTotalData ? "hidden" : "visible"
|
|
54267
|
+
).style("shape-rendering", "crispEdges").on("mousemove", (event2, d) => {
|
|
53696
54268
|
const markerInfo = {
|
|
53697
54269
|
markerShape: "square",
|
|
53698
54270
|
markerColor: d.key === "dimensionTotal" ? formatOptions.plotArea.totalColor : d.key === "down" ? formatOptions.plotArea.negativeColor : formatOptions.plotArea.positiveColor
|
|
@@ -53731,7 +54303,15 @@
|
|
|
53731
54303
|
formatOptions.plotArea.dataLabelNumberFormat,
|
|
53732
54304
|
formatOptions.plotArea.dataLabelDecimalPrecision
|
|
53733
54305
|
)
|
|
53734
|
-
).attr(
|
|
54306
|
+
).attr(
|
|
54307
|
+
"x",
|
|
54308
|
+
(d) => xScale(
|
|
54309
|
+
!isAdvancedWaterfall ? d.data.dimension || d.data.legend : d.data.xKey
|
|
54310
|
+
) + xScale.bandwidth() / 2
|
|
54311
|
+
).attr("y", (d) => d[1] ? yScaleLeft(d[1]) - 15 : 0).style("font-size", "11px").attr("text-anchor", "middle").attr(
|
|
54312
|
+
"visibility",
|
|
54313
|
+
(d) => d[1] - d[0] !== 0 && yScaleLeft(d[1]) ? "visible" : "hidden"
|
|
54314
|
+
);
|
|
53735
54315
|
textGroups.exit().remove();
|
|
53736
54316
|
}
|
|
53737
54317
|
}
|
|
@@ -53894,7 +54474,11 @@
|
|
|
53894
54474
|
tempWaterFallData.push(waterFallArr2);
|
|
53895
54475
|
if (dataRequiredForStackTotal.length > 0) {
|
|
53896
54476
|
filteredData = dataRequiredForStackTotal;
|
|
53897
|
-
stackTotalData = getStackedData(
|
|
54477
|
+
stackTotalData = getStackedData(
|
|
54478
|
+
filteredDimension,
|
|
54479
|
+
dataRequiredForStackTotal,
|
|
54480
|
+
false
|
|
54481
|
+
);
|
|
53898
54482
|
}
|
|
53899
54483
|
return tempWaterFallData;
|
|
53900
54484
|
} catch (error) {
|
|
@@ -53902,14 +54486,8 @@
|
|
|
53902
54486
|
}
|
|
53903
54487
|
};
|
|
53904
54488
|
const toNumber = (v) => v === null || v === void 0 || v === "" ? 0 : Number(v);
|
|
53905
|
-
const isNonZero = (v) => !Number.isNaN(toNumber(v)) && toNumber(v) !== 0;
|
|
53906
54489
|
const mapAdvancedWaterfallData = (rawData) => {
|
|
53907
|
-
return rawData.filter((d) => d.Column1 && d.Column1 !== "*").
|
|
53908
|
-
const base = toNumber(d.Column3);
|
|
53909
|
-
const up = toNumber(d.Column4);
|
|
53910
|
-
const down = toNumber(d.Column5);
|
|
53911
|
-
return isNonZero(base) || isNonZero(up) || isNonZero(down);
|
|
53912
|
-
}).map((d) => ({
|
|
54490
|
+
return rawData.filter((d) => d.Column1 && d.Column1 !== "*").map((d) => ({
|
|
53913
54491
|
xKey: d.Column1,
|
|
53914
54492
|
base: toNumber(d.Column3),
|
|
53915
54493
|
up: toNumber(d.Column4),
|
|
@@ -53937,9 +54515,13 @@
|
|
|
53937
54515
|
const chartId = crypto.randomUUID();
|
|
53938
54516
|
let columnWidth = 0;
|
|
53939
54517
|
const chartType = chartTypes.TornadoChart;
|
|
53940
|
-
const
|
|
54518
|
+
const isAdvanceAnalyticsChart = data.IsadvanceanalyticsChart;
|
|
53941
54519
|
const svgRef = require$$0$1.useRef();
|
|
53942
|
-
const seriesData = generalizedChartData(
|
|
54520
|
+
const seriesData = generalizedChartData(
|
|
54521
|
+
data.ChartData,
|
|
54522
|
+
data.DimensionList,
|
|
54523
|
+
true
|
|
54524
|
+
);
|
|
53943
54525
|
const dimensionList = data.DimensionList;
|
|
53944
54526
|
const barChart = true;
|
|
53945
54527
|
const isSecondaryAxisDrawn = false;
|
|
@@ -54009,6 +54591,7 @@
|
|
|
54009
54591
|
svgRef,
|
|
54010
54592
|
formatOptions
|
|
54011
54593
|
));
|
|
54594
|
+
formatOptions.xAxisLabel.labelTextWrap = false;
|
|
54012
54595
|
preProcessChartData();
|
|
54013
54596
|
({ maxNumberForPrimaryAxis, maxNumberForSecondaryAxis } = customYscaleLabelFormatting$1(
|
|
54014
54597
|
// for calculating primary/secondary axis max number so that we can calculate margin accordinglt
|
|
@@ -54037,7 +54620,7 @@
|
|
|
54037
54620
|
maxNumberForSecondaryAxis,
|
|
54038
54621
|
chartJSON.yMaxLeft,
|
|
54039
54622
|
formatOptions,
|
|
54040
|
-
!
|
|
54623
|
+
!isAdvanceAnalyticsChart ? chartJSON.legendList.map((d) => d["alias"]) : chartJSON.legendList.map((d) => d["alias"].split(" - ")[0]),
|
|
54041
54624
|
chartJSON.dimensionList,
|
|
54042
54625
|
chartJSON.yMaxRight,
|
|
54043
54626
|
isSecondaryAxisDrawn,
|
|
@@ -54165,24 +54748,23 @@
|
|
|
54165
54748
|
mapSeriesDataWithLegendList(
|
|
54166
54749
|
seriesData,
|
|
54167
54750
|
chartJSON.legendList,
|
|
54168
|
-
|
|
54751
|
+
isAdvanceAnalyticsChart,
|
|
54169
54752
|
formatOptions
|
|
54170
54753
|
),
|
|
54171
54754
|
chartId,
|
|
54172
|
-
staticLegendShape.rectangle
|
|
54173
|
-
chartType
|
|
54755
|
+
staticLegendShape.rectangle
|
|
54174
54756
|
);
|
|
54175
54757
|
};
|
|
54176
|
-
const mapSeriesDataWithLegendList = (seriesData2, legendList,
|
|
54758
|
+
const mapSeriesDataWithLegendList = (seriesData2, legendList, isAdvanceAnalyticsChart2, formatOptions2) => {
|
|
54177
54759
|
return seriesData2.map((series, index2) => {
|
|
54178
54760
|
const legend = legendList[index2];
|
|
54179
54761
|
if (!legend) return { ...series, properties: {} };
|
|
54180
54762
|
let updatedAlias = legend.alias;
|
|
54181
|
-
if (
|
|
54763
|
+
if (isAdvanceAnalyticsChart2 && legend.alias) {
|
|
54182
54764
|
updatedAlias = legend.alias.split(" - ")[0].trim();
|
|
54183
54765
|
}
|
|
54184
54766
|
let updatedColor = legend.color;
|
|
54185
|
-
if (
|
|
54767
|
+
if (isAdvanceAnalyticsChart2 && updatedAlias) {
|
|
54186
54768
|
if (updatedAlias.includes("+ve")) {
|
|
54187
54769
|
updatedColor = formatOptions2.plotArea.plotAreaCalculatedHigh;
|
|
54188
54770
|
} else if (updatedAlias.includes("-ve")) {
|
|
@@ -54203,7 +54785,7 @@
|
|
|
54203
54785
|
};
|
|
54204
54786
|
const preProcessChartData = () => {
|
|
54205
54787
|
let processedSeriesData;
|
|
54206
|
-
if (!
|
|
54788
|
+
if (!isAdvanceAnalyticsChart) {
|
|
54207
54789
|
const firstMeasure = seriesData[0]?.properties.currentMeasure;
|
|
54208
54790
|
let yMaxLeft = 0;
|
|
54209
54791
|
let yMaxRight = -Infinity;
|
|
@@ -54237,12 +54819,13 @@
|
|
|
54237
54819
|
chartJSON.dimensionList
|
|
54238
54820
|
) : chartJSON.dimensionList;
|
|
54239
54821
|
chartJSON.dimensionList.forEach((dim, i) => {
|
|
54240
|
-
chartJSON.formattedDimensionListMap.set(
|
|
54241
|
-
dim,
|
|
54242
|
-
formatedDimensionList[i]
|
|
54243
|
-
);
|
|
54822
|
+
chartJSON.formattedDimensionListMap.set(dim, formatedDimensionList[i]);
|
|
54244
54823
|
});
|
|
54245
|
-
filteredData = JSON.parse(
|
|
54824
|
+
filteredData = JSON.parse(
|
|
54825
|
+
JSON.stringify(
|
|
54826
|
+
!isAdvanceAnalyticsChart ? processedSeriesData : seriesData
|
|
54827
|
+
)
|
|
54828
|
+
);
|
|
54246
54829
|
filteredDimension = !formatOptions.plotArea.fitChart ? chartJSON.dimensionList.slice(
|
|
54247
54830
|
scrollPosition,
|
|
54248
54831
|
scrollPosition + visibleBars
|
|
@@ -54266,7 +54849,10 @@
|
|
|
54266
54849
|
let adjustedPosition = formatOptions.annotation.annotationVisibility != "5" && formatOptions.annotation.annotationPosition == "1" ? 20 : 0;
|
|
54267
54850
|
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;
|
|
54268
54851
|
chartJSON.yMaxLeft = chartJSON.yMaxLeft;
|
|
54269
|
-
xScaleForLegends = linear$1().domain([
|
|
54852
|
+
xScaleForLegends = linear$1().domain([
|
|
54853
|
+
chartJSON.yMaxLeft * (1.2 + (left2 ? scaleFactor : 0)),
|
|
54854
|
+
chartJSON.yMaxRight * (1.2 + (right2 ? scaleFactor : 0))
|
|
54855
|
+
]).range([adjustedPosition, innerWidth2 - adjustedPosition]);
|
|
54270
54856
|
xScale = xScaleForLegends;
|
|
54271
54857
|
calculatedRange = [0, innerWidth2];
|
|
54272
54858
|
getXScale();
|
|
@@ -54329,16 +54915,25 @@
|
|
|
54329
54915
|
filteredData.flatMap(
|
|
54330
54916
|
(d) => d.data.map((child) => ({
|
|
54331
54917
|
...child,
|
|
54332
|
-
legendText: !
|
|
54918
|
+
legendText: !isAdvanceAnalyticsChart ? chartJSON.dimensionList[0] == chartTypes.TornadoDefaultEntry ? tornadoEntryName.default : d.legend.split("-")[1]?.trim() ?? d.legend : d.legend.split("ve) - ")[1]?.trim() ?? d.legend,
|
|
54333
54919
|
properties: d.properties
|
|
54334
54920
|
}))
|
|
54335
54921
|
)
|
|
54336
|
-
).enter().append("rect").attr("class", "rect").attr(
|
|
54922
|
+
).enter().append("rect").attr("class", "rect").attr(
|
|
54923
|
+
"y",
|
|
54924
|
+
(d) => d.legendText ? yScaleLeft(d.legendText) : yScaleLeft(chartTypes.TornadoDefaultEntry)
|
|
54925
|
+
).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(
|
|
54926
|
+
"stroke-dasharray",
|
|
54927
|
+
(d) => d.properties.stackBorderStyle == 2 ? "5,3" : "0"
|
|
54928
|
+
).attr("stroke-width", (d) => `${d.properties.stackBorderWidth}px`).attr(
|
|
54929
|
+
"hoverId",
|
|
54930
|
+
(d) => ((isAdvanceAnalyticsChart ? d.legend.split(" - ")[0] : d["dimension"]) || "Legend").replace(/\s+/g, "-")
|
|
54931
|
+
).attr(
|
|
54337
54932
|
"stroke",
|
|
54338
54933
|
(d) => d.properties.stackBorderStyle == 0 ? "none" : formatOptions.column.stackBorderVisibility ? d.properties.stackBorderColor : "none"
|
|
54339
54934
|
).style(
|
|
54340
54935
|
"fill",
|
|
54341
|
-
(d) =>
|
|
54936
|
+
(d) => isAdvanceAnalyticsChart ? d.value > 0 ? positiveBarColor !== commonColors.white ? positiveBarColor : "none" : negativeBarColor !== commonColors.white ? negativeBarColor : "none" : d.properties.color
|
|
54342
54937
|
).on("mousemove", (event2, d) => {
|
|
54343
54938
|
showTooltipOnMouseMove(
|
|
54344
54939
|
[
|
|
@@ -54430,14 +55025,7 @@
|
|
|
54430
55025
|
};
|
|
54431
55026
|
const drawColumnChart = () => {
|
|
54432
55027
|
getChartType();
|
|
54433
|
-
initXaxisBar(
|
|
54434
|
-
formatOptions,
|
|
54435
|
-
gTag,
|
|
54436
|
-
xLabel,
|
|
54437
|
-
innerHeight2,
|
|
54438
|
-
innerWidth2,
|
|
54439
|
-
xAxis
|
|
54440
|
-
);
|
|
55028
|
+
initXaxisBar(formatOptions, gTag, xLabel, innerHeight2, innerWidth2, xAxis);
|
|
54441
55029
|
commonAnnotations(
|
|
54442
55030
|
filteredData,
|
|
54443
55031
|
yScaleLeft,
|
|
@@ -54463,7 +55051,7 @@
|
|
|
54463
55051
|
svg,
|
|
54464
55052
|
yScaleLeft,
|
|
54465
55053
|
columnWidth,
|
|
54466
|
-
|
|
55054
|
+
isAdvanceAnalyticsChart,
|
|
54467
55055
|
isReportEditable,
|
|
54468
55056
|
barChart
|
|
54469
55057
|
);
|