@quillsql/react 1.2.3 → 1.2.4
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 +1 -1
- package/src/TableChart.tsx +31 -0
package/package.json
CHANGED
package/src/TableChart.tsx
CHANGED
|
@@ -130,6 +130,35 @@ const TableChart = React.forwardRef<HTMLDivElement, BarListProps>(
|
|
|
130
130
|
|
|
131
131
|
const NUM_TO_SHOW = Math.floor(containerStyle?.height / 40) - 1 || 6;
|
|
132
132
|
|
|
133
|
+
if (!data.length) {
|
|
134
|
+
return (
|
|
135
|
+
<div
|
|
136
|
+
ref={ref}
|
|
137
|
+
style={{
|
|
138
|
+
// width: '100%',
|
|
139
|
+
boxSizing: 'content-box',
|
|
140
|
+
height: '100%',
|
|
141
|
+
// height: hei
|
|
142
|
+
// marginLeft: 25,
|
|
143
|
+
// background: 'red',
|
|
144
|
+
marginTop: 20,
|
|
145
|
+
// paddingRight: 25,
|
|
146
|
+
overflow: 'hidden',
|
|
147
|
+
display: 'flex',
|
|
148
|
+
marginLeft: '1.5rem',
|
|
149
|
+
justifyContent: 'space-between',
|
|
150
|
+
}}
|
|
151
|
+
// className={twMerge(
|
|
152
|
+
// makeBarListClassName('root'),
|
|
153
|
+
// 'qq-flex qq-justify-between qq-h-full qq-w-full',
|
|
154
|
+
// 'qq-space-x-6',
|
|
155
|
+
// className
|
|
156
|
+
// )}
|
|
157
|
+
{...other}
|
|
158
|
+
></div>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
133
162
|
return (
|
|
134
163
|
<div
|
|
135
164
|
ref={ref}
|
|
@@ -171,6 +200,7 @@ const TableChart = React.forwardRef<HTMLDivElement, BarListProps>(
|
|
|
171
200
|
display: 'flex',
|
|
172
201
|
flexDirection: 'row',
|
|
173
202
|
alignItems: 'center',
|
|
203
|
+
boxSizing: 'content-box',
|
|
174
204
|
}}
|
|
175
205
|
>
|
|
176
206
|
{Object.keys(data[0]).map((elem, index) => (
|
|
@@ -237,6 +267,7 @@ const TableChart = React.forwardRef<HTMLDivElement, BarListProps>(
|
|
|
237
267
|
display: 'flex',
|
|
238
268
|
flexDirection: 'row',
|
|
239
269
|
alignItems: 'center',
|
|
270
|
+
boxSizing: 'content-box',
|
|
240
271
|
}}
|
|
241
272
|
>
|
|
242
273
|
{Object.keys(item).map((elem, index) => (
|