sag_components 2.0.0-beta76 → 2.0.0-beta77
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/index.esm.js +47 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24005,21 +24005,22 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24005
24005
|
position: absolute;
|
|
24006
24006
|
`;
|
|
24007
24007
|
|
|
24008
|
-
const QuickFilterDropdownSingle =
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24008
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
24009
|
+
let {
|
|
24010
|
+
label,
|
|
24011
|
+
hoverColor,
|
|
24012
|
+
options,
|
|
24013
|
+
selectedValue,
|
|
24014
|
+
placeHolder,
|
|
24015
|
+
onChange,
|
|
24016
|
+
disabled,
|
|
24017
|
+
width,
|
|
24018
|
+
error,
|
|
24019
|
+
errorMessage,
|
|
24020
|
+
xIconShow,
|
|
24021
|
+
labelColor,
|
|
24022
|
+
showLabelOnTop
|
|
24023
|
+
} = _ref;
|
|
24023
24024
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24024
24025
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24025
24026
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -30358,6 +30359,13 @@ const BubbleChart = _ref => {
|
|
|
30358
30359
|
const distance = Math.max(Math.abs(max - median), Math.abs(min - median));
|
|
30359
30360
|
return [median - distance, median + distance];
|
|
30360
30361
|
};
|
|
30362
|
+
|
|
30363
|
+
// const calculateDomainBasedOnMedian = (min, max, median) => {
|
|
30364
|
+
// // Always include all data points, and add a small padding
|
|
30365
|
+
// const padding = (max - min) * 0.1 || 1; // fallback to 1 if min==max
|
|
30366
|
+
// return [min - padding, max + padding];
|
|
30367
|
+
// };
|
|
30368
|
+
|
|
30361
30369
|
const xDom = calculateDomainBasedOnMedian(minX, maxX, medianX);
|
|
30362
30370
|
const yDom = calculateDomainBasedOnMedian(minY, maxY, medianY);
|
|
30363
30371
|
|
|
@@ -30799,10 +30807,10 @@ const BubbleChart = _ref => {
|
|
|
30799
30807
|
onMouseMove: handleChartMouseMove,
|
|
30800
30808
|
cursor: curosrMouse,
|
|
30801
30809
|
margin: {
|
|
30802
|
-
top:
|
|
30810
|
+
top: 80,
|
|
30803
30811
|
right: 190,
|
|
30804
|
-
bottom:
|
|
30805
|
-
left:
|
|
30812
|
+
bottom: 80,
|
|
30813
|
+
left: 190
|
|
30806
30814
|
},
|
|
30807
30815
|
"data-testid": "scatter-chart"
|
|
30808
30816
|
}, renderGradients(), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
|
|
@@ -30858,7 +30866,7 @@ const BubbleChart = _ref => {
|
|
|
30858
30866
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30859
30867
|
value: topHeader,
|
|
30860
30868
|
position: "top",
|
|
30861
|
-
offset:
|
|
30869
|
+
offset: 60,
|
|
30862
30870
|
fill: '#484A4C',
|
|
30863
30871
|
fontSize: 16,
|
|
30864
30872
|
fontWeight: 500
|
|
@@ -30884,7 +30892,7 @@ const BubbleChart = _ref => {
|
|
|
30884
30892
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30885
30893
|
value: bottomHeader,
|
|
30886
30894
|
position: "bottom",
|
|
30887
|
-
offset:
|
|
30895
|
+
offset: 60,
|
|
30888
30896
|
fill: '#484A4C',
|
|
30889
30897
|
fontSize: 16,
|
|
30890
30898
|
fontWeight: 500
|
|
@@ -30997,6 +31005,25 @@ const BubbleChart = _ref => {
|
|
|
30997
31005
|
// Calculate the exact position of the median point in the SVG
|
|
30998
31006
|
const xPos = viewBox.x + (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]) * viewBox.width;
|
|
30999
31007
|
const yPos = viewBox.y + (1 - (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0])) * viewBox.height;
|
|
31008
|
+
|
|
31009
|
+
// Calculate normalized position of median in domain
|
|
31010
|
+
// const xNorm = (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]);
|
|
31011
|
+
// const yNorm = (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0]);
|
|
31012
|
+
|
|
31013
|
+
// // If median is within 2% of the edge, center the label
|
|
31014
|
+
// const isXEdge = xNorm < 0.02 || xNorm > 0.98;
|
|
31015
|
+
// const isYEdge = yNorm < 0.02 || yNorm > 0.98;
|
|
31016
|
+
|
|
31017
|
+
// let xPos, yPos;
|
|
31018
|
+
// if (isXEdge || isYEdge) {
|
|
31019
|
+
// // Center of SVG
|
|
31020
|
+
// xPos = viewBox.x + viewBox.width / 2;
|
|
31021
|
+
// yPos = viewBox.y + viewBox.height / 2;
|
|
31022
|
+
// } else {
|
|
31023
|
+
// // Median's data position
|
|
31024
|
+
// xPos = viewBox.x + xNorm * viewBox.width;
|
|
31025
|
+
// yPos = viewBox.y + (1 - yNorm) * viewBox.height;
|
|
31026
|
+
// }
|
|
31000
31027
|
return /*#__PURE__*/React__default["default"].createElement("text", {
|
|
31001
31028
|
x: xPos,
|
|
31002
31029
|
y: yPos,
|