@dhiraj0720/report1chart 2.8.7 → 2.8.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhiraj0720/report1chart",
3
- "version": "2.8.7",
3
+ "version": "2.8.9",
4
4
  "main": "src/index.jsx",
5
5
  "scripts": {
6
6
  "test": "echo 'No tests'"
@@ -128,20 +128,20 @@ const styles = StyleSheet.create({
128
128
  backgroundColor: '#fff',
129
129
  },
130
130
  frozenColumn: {
131
- width: 120,
131
+ width: 90,
132
132
  backgroundColor: '#f4f6f8',
133
133
  borderRightWidth: 1,
134
134
  borderColor: '#ddd',
135
135
  },
136
136
  headerRow: {
137
137
  flexDirection: 'row',
138
- backgroundColor: '#f4f6f8',
138
+ backgroundColor: '#4E79A7',
139
139
  },
140
140
  dataRow: {
141
141
  flexDirection: 'row',
142
142
  },
143
143
  cell: {
144
- width: 140,
144
+ width: 100,
145
145
  paddingVertical: 12,
146
146
  paddingHorizontal: 8,
147
147
  justifyContent: 'center',
@@ -69,7 +69,7 @@ const SvgBarLineChartCompact = ({ data }) => {
69
69
  fontSize="10"
70
70
  textAnchor="middle"
71
71
  fill="white"
72
- transform={`rotate(-90 ${centerX - barWidth - barGap / 2 + barWidth / 2 + 5} ${y(val2024) + h2024 / 2 + 5})`}
72
+ transform={`rotate(-90 ${centerX - barWidth - barGap / 2 + barWidth / 2 + 3} ${y(val2024) + h2024 / 2 + 5})`}
73
73
  fontWeight="700"
74
74
  >
75
75
  {formatNumber(val2024)}
@@ -85,7 +85,7 @@ const SvgBarLineChartCompact = ({ data }) => {
85
85
  fontSize="10"
86
86
  textAnchor="middle"
87
87
  fill="white"
88
- transform={`rotate(-90 ${centerX + barGap / 2 + barWidth / 2} ${y(val2025) + h2025 / 2 + 5})`}
88
+ transform={`rotate(-90 ${centerX + barGap / 2 + barWidth / 2 + 3} ${y(val2025) + h2025 / 2 + 5})`}
89
89
  fontWeight="700"
90
90
  >
91
91
  {formatNumber(val2025)}
@@ -8,7 +8,7 @@ const SvgBarLineChartCompact3A = ({ data }) => {
8
8
  if (!data?.series || !data.labels?.length) return null;
9
9
 
10
10
  const height = 280;
11
- const paddingLeft = 20;
11
+ const paddingLeft = 42;
12
12
  const paddingRight = 30;
13
13
  const paddingTop = 30;
14
14
  const paddingBottom = 70;
@@ -73,7 +73,7 @@ const SvgBarLineChartCompact3A = ({ data }) => {
73
73
  fontSize="10"
74
74
  textAnchor="middle"
75
75
  fill="white"
76
- transform={`rotate(-90 ${textX} ${textY})`}
76
+ transform={`rotate(-90 ${textX + 3} ${textY})`}
77
77
  fontWeight="700"
78
78
  >
79
79
  {formatNumber(val2024)}
@@ -89,7 +89,7 @@ const SvgBarLineChartCompact3A = ({ data }) => {
89
89
  fontSize="10"
90
90
  textAnchor="middle"
91
91
  fill="white"
92
- transform={`rotate(-90 ${centerX + barGap / 2 + barWidth / 2} ${y(val2025) + h2025 / 2 + 5})`}
92
+ transform={`rotate(-90 ${centerX + barGap / 2 + barWidth / 2 + 3} ${y(val2025) + h2025 / 2 + 5})`}
93
93
  fontWeight="700"
94
94
  >
95
95
  {formatNumber(val2025)}
@@ -8,7 +8,7 @@ const SvgLineChartCompact3A = ({ data }) => {
8
8
  if (!data?.series || !data.labels?.length) return null;
9
9
 
10
10
  const height = 260;
11
- const paddingLeft = 70;
11
+ const paddingLeft = 40;
12
12
  const paddingRight = 30;
13
13
  const paddingTop = 30;
14
14
  const paddingBottom = 60;
@@ -35,7 +35,7 @@ const SvgLineChartCompact3A = ({ data }) => {
35
35
  {[50000, 40000].map((v) => (
36
36
  <SvgText
37
37
  key={v}
38
- x={paddingLeft - 10}
38
+ x={paddingLeft - 13}
39
39
  y={y(v) + 5}
40
40
  fontSize="11"
41
41
  textAnchor="end"
@@ -70,20 +70,21 @@ const styles = StyleSheet.create({
70
70
  alignItems: 'center',
71
71
  paddingHorizontal: 16,
72
72
  paddingVertical: 18,
73
- backgroundColor: '#fff',
73
+ backgroundColor: '#4E79A7',
74
74
  borderBottomWidth: 1,
75
- borderColor: '#eee',
75
+ borderColor: '#4E79A7',
76
76
  marginBottom: 12,
77
77
  },
78
78
  backIcon: {
79
- fontSize: 28,
80
- color: '#000',
79
+ fontSize: 32,
80
+ color: '#fff',
81
81
  marginRight: 16,
82
+ fontWeight: '700',
82
83
  },
83
84
  headerTitle: {
84
85
  fontSize: 19,
85
86
  fontWeight: '700',
86
- color: '#000',
87
+ color: '#fff',
87
88
  flex: 1,
88
89
  textAlign: 'center',
89
90
  },
@@ -169,12 +169,12 @@ const styles = StyleSheet.create({
169
169
  alignItems: 'center',
170
170
  paddingHorizontal: 16,
171
171
  paddingVertical: 18,
172
- backgroundColor: '#fff',
172
+ backgroundColor: '#4E79A7',
173
173
  borderBottomWidth: 1,
174
- borderColor: '#eee',
174
+ borderColor: '#4E79A7',
175
175
  },
176
- backIcon: { fontSize: 28, color: '#000' },
177
- headerTitle: { fontSize: 19, fontWeight: '700', color: '#000', flex: 1, textAlign: 'center' },
176
+ backIcon: { fontSize: 32, color: '#fff', fontWeight: '700' },
177
+ headerTitle: { fontSize: 19, fontWeight: '700', color: '#fff', flex: 1, textAlign: 'center' },
178
178
 
179
179
  filterBar: {
180
180
  flexDirection: 'row',
@@ -115,8 +115,32 @@ const Report3AScreen = ({ api, token, onBack }) => {
115
115
  Months ({selectedMonths.length}/{months.length})
116
116
  </Text>
117
117
  </TouchableOpacity>
118
+
119
+ <TouchableOpacity
120
+ onPress={() => setFullscreen(true)} style={styles.filterItem}
121
+ >
122
+ <Text style={styles.filterText}>⤢ Full Screen</Text>
123
+ </TouchableOpacity>
118
124
  </View>
119
125
 
126
+ <View style={styles.filterBar}>
127
+ <TouchableOpacity onPress={() => setMonthsModal(true)} style={styles.filterItem}>
128
+ <Svg width={22} height={22} viewBox="0 0 24 24" fill="none">
129
+ <Path d="M20 4H4V6.5L12 14.5L20 6.5V4Z" stroke="#000" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
130
+ <Path d="M8 11V19L16 19V11" stroke="#000" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
131
+ </Svg>
132
+ <Text style={styles.filterText}>Months ({selectedMonths.length}/{months.length})</Text>
133
+ </TouchableOpacity>
134
+
135
+ <TouchableOpacity onPress={() => setDivisionModal(true)} style={styles.filterItem}>
136
+ <Svg width={22} height={22} viewBox="0 0 24 24" fill="none">
137
+ <Path d="M20 4H4V6.5L12 14.5L20 6.5V4Z" stroke="#000" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
138
+ <Path d="M8 11V19L16 19V11" stroke="#000" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
139
+ </Svg>
140
+ <Text style={styles.filterText}>{currentDivisionName}</Text>
141
+ </TouchableOpacity>
142
+ </View>
143
+
120
144
  <ScrollView style={styles.content}>
121
145
  {/* FULL SCREEN BUTTON
122
146
  <TouchableOpacity onPress={() => setFullscreen(true)} style={styles.fullScreenBtn}>
@@ -127,11 +151,7 @@ const Report3AScreen = ({ api, token, onBack }) => {
127
151
  <Text style={styles.fullScreenText}>Full Screen Table</Text>
128
152
  </TouchableOpacity> */}
129
153
 
130
- <TouchableOpacity
131
- onPress={() => setFullscreen(true)} style={styles.fullScreenBtn}
132
- >
133
- <Text style={{ fontWeight: '700' }}>⤢ Full Screen</Text>
134
- </TouchableOpacity>
154
+
135
155
 
136
156
  {/* TABLE */}
137
157
  <FrozenTableReport3A rows={filteredRows} />
@@ -198,12 +218,12 @@ const styles = StyleSheet.create({
198
218
  alignItems: 'center',
199
219
  paddingHorizontal: 16,
200
220
  paddingVertical: 18,
201
- backgroundColor: '#fff',
221
+ backgroundColor: '#4E79A7',
202
222
  borderBottomWidth: 1,
203
- borderColor: '#eee',
223
+ borderColor: '#4E79A7',
204
224
  },
205
- backIcon: { fontSize: 28, color: '#000' },
206
- headerTitle: { fontSize: 19, fontWeight: '700', color: '#000', flex: 1, textAlign: 'center' },
225
+ backIcon: { fontSize: 28, color: '#fff', fontWeight: '700' },
226
+ headerTitle: { fontSize: 19, fontWeight: '700', color: '#fff', flex: 1, textAlign: 'center' },
207
227
 
208
228
  filterBar: {
209
229
  flexDirection: 'row',