-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Document interfaces for charts (#12656)
- Loading branch information
1 parent
fc8524e
commit b9cccdc
Showing
39 changed files
with
592 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from 'react'; | ||
import InterfaceApiPage from 'docsx/src/modules/components/InterfaceApiPage'; | ||
import layoutConfig from 'docsx/src/modules/utils/dataGridLayoutConfig'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './axis-config.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return ( | ||
<InterfaceApiPage {...layoutConfig} descriptions={descriptions} pageContent={pageContent} /> | ||
); | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/charts/', | ||
false, | ||
/\.\/axis-config.*.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "AxisConfig", | ||
"imports": ["import { AxisConfig } from '@mui/x-charts'"], | ||
"properties": { | ||
"id": { "type": { "description": "AxisId" }, "required": true }, | ||
"scaleType": { "type": { "description": "'linear'" }, "required": true }, | ||
"axisId": { "type": { "description": "AxisId" } }, | ||
"classes": { "type": { "description": "Partial<ChartsAxisClasses>" } }, | ||
"colorMap": { "type": { "description": "ContinuousColorConfig | PiecewiseColorConfig" } }, | ||
"data": { "type": { "description": "V[]" } }, | ||
"dataKey": { "type": { "description": "string" } }, | ||
"disableLine": { "type": { "description": "boolean" }, "default": "false" }, | ||
"disableTicks": { "type": { "description": "boolean" }, "default": "false" }, | ||
"fill": { "type": { "description": "string" }, "default": "'currentColor'" }, | ||
"hideTooltip": { "type": { "description": "boolean" } }, | ||
"label": { "type": { "description": "string" } }, | ||
"labelFontSize": { "type": { "description": "number" }, "default": "14" }, | ||
"labelStyle": { "type": { "description": "ChartsTextProps['style']" } }, | ||
"max": { "type": { "description": "number | Date" } }, | ||
"min": { "type": { "description": "number | Date" } }, | ||
"position": { "type": { "description": "'top' | 'bottom'" } }, | ||
"reverse": { "type": { "description": "boolean" } }, | ||
"slotProps": { | ||
"type": { "description": "Partial<ChartsAxisSlotProps>" }, | ||
"default": "{}" | ||
}, | ||
"slots": { "type": { "description": "Partial<ChartsAxisSlots>" }, "default": "{}" }, | ||
"stroke": { "type": { "description": "string" }, "default": "'currentColor'" }, | ||
"tickFontSize": { "type": { "description": "number" }, "default": "12" }, | ||
"tickInterval": { | ||
"type": { "description": "'auto' | ((value: any, index: number) => boolean) | any[]" }, | ||
"default": "'auto'" | ||
}, | ||
"tickLabelInterval": { | ||
"type": { "description": "'auto' | ((value: any, index: number) => boolean)" }, | ||
"default": "'auto'" | ||
}, | ||
"tickLabelPlacement": { "type": { "description": "'middle' | 'tick'" }, "default": "'middle'" }, | ||
"tickLabelStyle": { "type": { "description": "ChartsTextProps['style']" } }, | ||
"tickMaxStep": { "type": { "description": "number" } }, | ||
"tickMinStep": { "type": { "description": "number" } }, | ||
"tickNumber": { "type": { "description": "number" } }, | ||
"tickPlacement": { | ||
"type": { "description": "'start' | 'end' | 'middle' | 'extremities'" }, | ||
"default": "'extremities'" | ||
}, | ||
"tickSize": { "type": { "description": "number" }, "default": "6" }, | ||
"valueFormatter": { | ||
"type": { "description": "(value: V, context: AxisValueFormatterContext) => string" } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from 'react'; | ||
import InterfaceApiPage from 'docsx/src/modules/components/InterfaceApiPage'; | ||
import layoutConfig from 'docsx/src/modules/utils/dataGridLayoutConfig'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './bar-series-type.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return ( | ||
<InterfaceApiPage {...layoutConfig} descriptions={descriptions} pageContent={pageContent} /> | ||
); | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/charts/', | ||
false, | ||
/\.\/bar-series-type.*.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "BarSeriesType", | ||
"imports": ["import { BarSeriesType } from '@mui/x-charts'"], | ||
"properties": { | ||
"type": { "type": { "description": "'bar'" }, "required": true }, | ||
"color": { "type": { "description": "string" } }, | ||
"data": { "type": { "description": "(number | null)[]" } }, | ||
"dataKey": { "type": { "description": "string" } }, | ||
"highlightScope": { "type": { "description": "Partial<HighlightScope>" } }, | ||
"id": { "type": { "description": "SeriesId" } }, | ||
"label": { "type": { "description": "string" } }, | ||
"layout": { "type": { "description": "'horizontal' | 'vertical'" }, "default": "'vertical'" }, | ||
"stack": { "type": { "description": "string" } }, | ||
"stackOffset": { "type": { "description": "StackOffsetType" }, "default": "'diverging'" }, | ||
"stackOrder": { "type": { "description": "StackOrderType" }, "default": "'none'" }, | ||
"valueFormatter": { "type": { "description": "SeriesValueFormatter<TValue>" } }, | ||
"xAxisKey": { "type": { "description": "string" } }, | ||
"yAxisKey": { "type": { "description": "string" } } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from 'react'; | ||
import InterfaceApiPage from 'docsx/src/modules/components/InterfaceApiPage'; | ||
import layoutConfig from 'docsx/src/modules/utils/dataGridLayoutConfig'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './line-series-type.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return ( | ||
<InterfaceApiPage {...layoutConfig} descriptions={descriptions} pageContent={pageContent} /> | ||
); | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/charts/', | ||
false, | ||
/\.\/line-series-type.*.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
Oops, something went wrong.