@eturnity/eturnity_reusable_components 8.19.8-EPDM-11600.13 → 8.19.8-EPDM-11600.14
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/package.json
CHANGED
@@ -68,7 +68,10 @@ export function useAxisCalculations(props, maxValue) {
|
|
68
68
|
// Generate labels including 0 up to numSteps
|
69
69
|
const numSteps = Math.floor(max / stepSize)
|
70
70
|
for (let i = 0; i <= numSteps; i++) {
|
71
|
-
|
71
|
+
const stepValue = i * stepSize
|
72
|
+
const roundedStepValueString = stepValue.toFixed(2)
|
73
|
+
const roundedStepValueNumber = parseFloat(roundedStepValueString)
|
74
|
+
labels.push(roundedStepValueNumber)
|
72
75
|
}
|
73
76
|
|
74
77
|
// Ensure we always have at least 2 labels (0 and max)
|
@@ -26,10 +26,13 @@ export const YAxisRow = styled('div', { percentage: Number })`
|
|
26
26
|
align-items: center;
|
27
27
|
width: 100%;
|
28
28
|
position: absolute;
|
29
|
-
height:
|
29
|
+
height: 1px;
|
30
30
|
bottom: ${(props) =>
|
31
31
|
Number.isFinite(props.percentage) ? `${props.percentage}%` : '0'};
|
32
|
-
|
32
|
+
${(props) =>
|
33
|
+
Number.isFinite(props.percentage) && props.percentage === 100
|
34
|
+
? 'transform: translateY(1px)'
|
35
|
+
: ''};
|
33
36
|
`
|
34
37
|
|
35
38
|
export const YAxisLabel = styled.div`
|
@@ -47,11 +50,9 @@ export const YAxisLine = styled('div', { yAxisWidth: String })`
|
|
47
50
|
right: -10px;
|
48
51
|
left: calc(${(props) => props.yAxisWidth} - 10px);
|
49
52
|
height: 1px;
|
50
|
-
background-color:
|
53
|
+
background-color: ${(props) => props.theme.semanticColors.grey[400]};
|
51
54
|
width: 12px;
|
52
55
|
z-index: 0;
|
53
|
-
top: 50%;
|
54
|
-
transform: translateY(-50%);
|
55
56
|
`
|
56
57
|
|
57
58
|
export const YAxisTitleWrapper = styled('div')`
|
@@ -88,6 +89,8 @@ export const ChartContent = styled('div', {
|
|
88
89
|
height: ${(props) => props.height};
|
89
90
|
position: relative;
|
90
91
|
background: ${(props) => props.theme.semanticColors.grey[100]};
|
92
|
+
border-bottom: ${(props) =>
|
93
|
+
`1px solid ${props.theme.semanticColors.grey[400]}`};
|
91
94
|
${(props) =>
|
92
95
|
props.isScrollable
|
93
96
|
? ` min-width: ${props.totalBars * (props.barWidth + 8) + 24}px;`
|
@@ -176,7 +179,7 @@ export const XAxisLabelHighlight = styled.div`
|
|
176
179
|
export const XAxisLine = styled.div`
|
177
180
|
width: 1px;
|
178
181
|
height: 6px;
|
179
|
-
background-color:
|
182
|
+
background-color: ${(props) => props.theme.semanticColors.grey[400]};
|
180
183
|
position: absolute;
|
181
184
|
bottom: -6px;
|
182
185
|
left: 50%;
|