Skip to content

Commit 2578101

Browse files
committed
fix: fix colorField of hierarchical
1 parent 00f1efd commit 2578101

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/charts/hierarchical.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ const schema = z.object({
2525
dataTable: z
2626
.array(z.any())
2727
.describe(
28-
"Hierarchical data for the chart, e.g., [{ category: 'Category 01', value: 10, children: [] }]."
28+
"Hierarchical data for the chart, e.g., [{ category: 'Category 0', subCategory: 'Category 01', value: 10}]."
2929
)
3030
.nonempty({ message: "Data cannot be empty." }),
3131

32-
colorField: XFieldSchema,
32+
colorField: z.array(XFieldSchema).nonempty(),
3333
valueField: YFieldSchema,
3434

3535
chartTheme: ThemeSchema,

0 commit comments

Comments
 (0)