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.esm.js
CHANGED
|
@@ -23995,21 +23995,22 @@ const DeleteIcon = styled.div`
|
|
|
23995
23995
|
position: absolute;
|
|
23996
23996
|
`;
|
|
23997
23997
|
|
|
23998
|
-
const QuickFilterDropdownSingle =
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24003
|
-
|
|
24004
|
-
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
23998
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
23999
|
+
let {
|
|
24000
|
+
label,
|
|
24001
|
+
hoverColor,
|
|
24002
|
+
options,
|
|
24003
|
+
selectedValue,
|
|
24004
|
+
placeHolder,
|
|
24005
|
+
onChange,
|
|
24006
|
+
disabled,
|
|
24007
|
+
width,
|
|
24008
|
+
error,
|
|
24009
|
+
errorMessage,
|
|
24010
|
+
xIconShow,
|
|
24011
|
+
labelColor,
|
|
24012
|
+
showLabelOnTop
|
|
24013
|
+
} = _ref;
|
|
24013
24014
|
const [isFocused, setIsFocused] = useState(false);
|
|
24014
24015
|
const [showOptions, setShowOptions] = useState(false);
|
|
24015
24016
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -30348,6 +30349,13 @@ const BubbleChart = _ref => {
|
|
|
30348
30349
|
const distance = Math.max(Math.abs(max - median), Math.abs(min - median));
|
|
30349
30350
|
return [median - distance, median + distance];
|
|
30350
30351
|
};
|
|
30352
|
+
|
|
30353
|
+
// const calculateDomainBasedOnMedian = (min, max, median) => {
|
|
30354
|
+
// // Always include all data points, and add a small padding
|
|
30355
|
+
// const padding = (max - min) * 0.1 || 1; // fallback to 1 if min==max
|
|
30356
|
+
// return [min - padding, max + padding];
|
|
30357
|
+
// };
|
|
30358
|
+
|
|
30351
30359
|
const xDom = calculateDomainBasedOnMedian(minX, maxX, medianX);
|
|
30352
30360
|
const yDom = calculateDomainBasedOnMedian(minY, maxY, medianY);
|
|
30353
30361
|
|
|
@@ -30789,10 +30797,10 @@ const BubbleChart = _ref => {
|
|
|
30789
30797
|
onMouseMove: handleChartMouseMove,
|
|
30790
30798
|
cursor: curosrMouse,
|
|
30791
30799
|
margin: {
|
|
30792
|
-
top:
|
|
30800
|
+
top: 80,
|
|
30793
30801
|
right: 190,
|
|
30794
|
-
bottom:
|
|
30795
|
-
left:
|
|
30802
|
+
bottom: 80,
|
|
30803
|
+
left: 190
|
|
30796
30804
|
},
|
|
30797
30805
|
"data-testid": "scatter-chart"
|
|
30798
30806
|
}, renderGradients(), /*#__PURE__*/React$1.createElement(XAxis, {
|
|
@@ -30848,7 +30856,7 @@ const BubbleChart = _ref => {
|
|
|
30848
30856
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30849
30857
|
value: topHeader,
|
|
30850
30858
|
position: "top",
|
|
30851
|
-
offset:
|
|
30859
|
+
offset: 60,
|
|
30852
30860
|
fill: '#484A4C',
|
|
30853
30861
|
fontSize: 16,
|
|
30854
30862
|
fontWeight: 500
|
|
@@ -30874,7 +30882,7 @@ const BubbleChart = _ref => {
|
|
|
30874
30882
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30875
30883
|
value: bottomHeader,
|
|
30876
30884
|
position: "bottom",
|
|
30877
|
-
offset:
|
|
30885
|
+
offset: 60,
|
|
30878
30886
|
fill: '#484A4C',
|
|
30879
30887
|
fontSize: 16,
|
|
30880
30888
|
fontWeight: 500
|
|
@@ -30987,6 +30995,25 @@ const BubbleChart = _ref => {
|
|
|
30987
30995
|
// Calculate the exact position of the median point in the SVG
|
|
30988
30996
|
const xPos = viewBox.x + (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]) * viewBox.width;
|
|
30989
30997
|
const yPos = viewBox.y + (1 - (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0])) * viewBox.height;
|
|
30998
|
+
|
|
30999
|
+
// Calculate normalized position of median in domain
|
|
31000
|
+
// const xNorm = (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]);
|
|
31001
|
+
// const yNorm = (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0]);
|
|
31002
|
+
|
|
31003
|
+
// // If median is within 2% of the edge, center the label
|
|
31004
|
+
// const isXEdge = xNorm < 0.02 || xNorm > 0.98;
|
|
31005
|
+
// const isYEdge = yNorm < 0.02 || yNorm > 0.98;
|
|
31006
|
+
|
|
31007
|
+
// let xPos, yPos;
|
|
31008
|
+
// if (isXEdge || isYEdge) {
|
|
31009
|
+
// // Center of SVG
|
|
31010
|
+
// xPos = viewBox.x + viewBox.width / 2;
|
|
31011
|
+
// yPos = viewBox.y + viewBox.height / 2;
|
|
31012
|
+
// } else {
|
|
31013
|
+
// // Median's data position
|
|
31014
|
+
// xPos = viewBox.x + xNorm * viewBox.width;
|
|
31015
|
+
// yPos = viewBox.y + (1 - yNorm) * viewBox.height;
|
|
31016
|
+
// }
|
|
30990
31017
|
return /*#__PURE__*/React$1.createElement("text", {
|
|
30991
31018
|
x: xPos,
|
|
30992
31019
|
y: yPos,
|