Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Document interfaces for charts #12656

Merged
merged 11 commits into from Apr 19, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Apr 3, 2024

PR on top of #12653

Fix #12380

Added pages

Using [[BarSeriesType]] in description will generate a link to the API page

See for example the definition of series props: https://deploy-preview-12656--material-ui-x.netlify.app/x/api/charts/bar-chart/#bar-chart-prop-series

@mui-bot
Copy link

mui-bot commented Apr 3, 2024

Deploy preview: https://deploy-preview-12656--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 07d07f1

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 17, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 18, 2024
@alexfauquette alexfauquette marked this pull request as ready for review April 18, 2024 14:45
Comment on lines +453 to +454
{
pathname: '/x/api/charts-group',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I move the "API group" after the "Common features" because it was hard to find

Comment on lines +155 to 166
{
folder: 'charts',
packages: ['x-charts'],
documentedInterfaces: [
'BarSeriesType',
'LineSeriesType',
'PieSeriesType',
'ScatterSeriesType',
'AxisConfig',
],
},
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main modification

Comment on lines +70 to 74
'bottomAxis',
'topAxis',
'leftAxis',
'rightAxis',
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed them from the resolved types because they were too complex to be readable

I plan to add here links to ChartsXAxis props API, but it is blocked by mui/material-ui#41950

Copy link
Member

@JCQuintas JCQuintas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only a minor typo

btw, do we have any docs on how these files are auto-generated and how to ignore add stuff to it? 🤔

@@ -63,6 +63,11 @@ export interface PieSeriesType<Tdata = PieValueType> extends CommonSeriesType<Td
* @default 0
*/
paddingAngle?: number;
/**
* The sorting strategy used to oredr pie slices.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo

Suggested change
* The sorting strategy used to oredr pie slices.
* The sorting strategy used to order pie slices.

@alexfauquette
Copy link
Member Author

btw, do we have any docs on how these files are auto-generated and how to ignore add stuff to it? 🤔

No, I recently discovered new ones. The best is to identify which script generate the files, and track back where it is executed(basically how I found the need for mui/material-ui#41950 )

For API page generation it's a bit cleaner because all our configuration is done here: https://github.com/mui/mui-x/tree/master/scripts/buildApiDocs and you can rely on TS

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 19, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 19, 2024
@alexfauquette alexfauquette enabled auto-merge (squash) April 19, 2024 09:28
@zannager zannager added docs Improvements or additions to the documentation component: charts This is the name of the generic UI component, not the React module! labels Apr 19, 2024
@alexfauquette alexfauquette merged commit b9cccdc into mui:master Apr 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts][docs-infra] Document interfaces in dedicated pages
4 participants