@dhiraj0720/report1chart 2.7.6 → 2.7.7
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
|
@@ -59,17 +59,21 @@ const SvgBarLineChartCompact3A = ({ data }) => {
|
|
|
59
59
|
const h2024 = chartHeight - (y(val2024) - paddingTop);
|
|
60
60
|
const h2025 = chartHeight - (y(val2025) - paddingTop);
|
|
61
61
|
|
|
62
|
+
const textX = centerX - barWidth - barGap / 2 + barWidth / 2;
|
|
63
|
+
const textY = y(val2024) + h2024 / 2 + 5;
|
|
64
|
+
|
|
62
65
|
return (
|
|
63
66
|
<React.Fragment key={i}>
|
|
64
67
|
{/* 2024 Bar */}
|
|
65
68
|
<Rect x={centerX - barWidth - barGap / 2} y={y(val2024)} width={barWidth} height={h2024} fill="#E07A3F" />
|
|
66
69
|
{val2024 > MAX * 0.1 && (
|
|
67
70
|
<SvgText
|
|
68
|
-
x={
|
|
69
|
-
y={
|
|
71
|
+
x={textX}
|
|
72
|
+
y={textY}
|
|
70
73
|
fontSize="10"
|
|
71
74
|
textAnchor="middle"
|
|
72
|
-
fill="
|
|
75
|
+
fill="black"
|
|
76
|
+
transform={`rotate(-90 ${textX} ${textY})`}
|
|
73
77
|
fontWeight="700"
|
|
74
78
|
>
|
|
75
79
|
{formatNumber(val2024)}
|
|
@@ -84,7 +88,7 @@ const SvgBarLineChartCompact3A = ({ data }) => {
|
|
|
84
88
|
y={y(val2025) + h2025 / 2 + 5}
|
|
85
89
|
fontSize="10"
|
|
86
90
|
textAnchor="middle"
|
|
87
|
-
fill="
|
|
91
|
+
fill="red"
|
|
88
92
|
transform="rotate(-90 40 160)"
|
|
89
93
|
fontWeight="700"
|
|
90
94
|
>
|