Skip to content

Commit df30582

Browse files
ckiferckifer
andauthored
docs: add xAxisId and yAxisId to grid docs (#376)
Co-authored-by: ckifer <[email protected]>
1 parent 432eb06 commit df30582

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/docs/api/CartesianGrid.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default {
148148
name: 'strokeDasharray',
149149
type: 'String',
150150
defaultVal: 'null',
151-
isOptional: false,
151+
isOptional: true,
152152
desc: {
153153
'en-US': 'The pattern of dashes and gaps used to paint the lines of the grid',
154154
'zh-CN': '用于绘制网格的虚线和间隔的模式',
@@ -159,6 +159,26 @@ export default {
159159
'<CartesianGrid strokeDasharray="4 1 2" />',
160160
],
161161
},
162+
{
163+
name: 'xAxisId',
164+
type: 'String | Number',
165+
defaultVal: 0,
166+
isOptional: true,
167+
desc: {
168+
'en-US': 'The id of x-axis which you would like to add grid lines for. Required if xAxisId is set on XAxis.',
169+
},
170+
format: ['<CartesianGrid xAxisId="top" />', '<XAxis xAxisId="top" />'],
171+
},
172+
{
173+
name: 'yAxisId',
174+
type: 'String | Number',
175+
defaultVal: 0,
176+
isOptional: true,
177+
desc: {
178+
'en-US': 'The id of y-axis which you would like to add grid lines for. Required if yAxisId is set on YAxis.',
179+
},
180+
format: ['<CartesianGrid yAxisId="left" />', '<XAxis yAxisId="left" />'],
181+
},
162182
],
163183
parentComponents: ['AreaChart', 'BarChart', 'LineChart', 'ComposedChart', 'ScatterChart'],
164184
};

0 commit comments

Comments
 (0)