Skip to content

Commit cc41bc3

Browse files
author
duxinyue.dxy
committed
feat: add lineWidth to Radar area and add group to scatter
1 parent 859661c commit cc41bc3

6 files changed

Lines changed: 22 additions & 0 deletions

File tree

__tests__/charts/area.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
"description": "Background color of the chart, such as, '#fff'.",
3838
"type": "string"
3939
},
40+
"lineWidth": {
41+
"description": "Line width for the lines of chart, such as 4.",
42+
"type": "number"
43+
},
4044
"palette": {
4145
"description": "Color palette for the chart, it is a collection of colors.",
4246
"items": {

__tests__/charts/radar.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
"description": "Background color of the chart, such as, '#fff'.",
3333
"type": "string"
3434
},
35+
"lineWidth": {
36+
"description": "Line width for the lines of chart, such as 4.",
37+
"type": "number"
38+
},
3539
"palette": {
3640
"description": "Color palette for the chart, it is a collection of colors.",
3741
"items": {

__tests__/charts/scatter.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"items": {
1212
"type": "object",
1313
"properties": {
14+
"group": {
15+
"description": "Group name for the data point.",
16+
"type": "string"
17+
},
1418
"x": {
1519
"type": "number"
1620
},

src/charts/area.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
TitleSchema,
1212
WidthSchema,
1313
} from "./base";
14+
import { line } from "./line";
1415

1516
// Area chart data schema
1617
const data = z.object({
@@ -37,6 +38,10 @@ const schema = {
3738
backgroundColor: BackgroundColorSchema,
3839
palette: PaletteSchema,
3940
texture: TextureSchema,
41+
lineWidth: z
42+
.number()
43+
.optional()
44+
.describe("Line width for the lines of chart, such as 4."),
4045
})
4146
.optional()
4247
.describe("Custom style configuration for the chart."),

src/charts/radar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ const schema = {
3030
backgroundColor: BackgroundColorSchema,
3131
palette: PaletteSchema,
3232
texture: TextureSchema,
33+
lineWidth: z
34+
.number()
35+
.optional()
36+
.describe("Line width for the lines of chart, such as 4."),
3337
})
3438
.optional()
3539
.describe("Custom style configuration for the chart."),

src/charts/scatter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
const data = z.object({
1717
x: z.number(),
1818
y: z.number(),
19+
group: z.string().optional().describe("Group name for the data point."),
1920
});
2021

2122
// Scatter chart input schema

0 commit comments

Comments
 (0)