Skip to content

[docs] Document interfaces for charts#12656

Merged
alexfauquette merged 11 commits intomui:masterfrom
alexfauquette:chart-interface-generation
Apr 19, 2024
Merged

[docs] Document interfaces for charts#12656
alexfauquette merged 11 commits intomui:masterfrom
alexfauquette:chart-interface-generation

Conversation

@alexfauquette
Copy link
Copy Markdown
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
Copy Markdown

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
@github-actions
Copy link
Copy Markdown
Contributor

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 thread docs/data/pages.ts
Comment on lines +453 to +454
{
pathname: '/x/api/charts-group',
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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? 🤔

*/
paddingAngle?: number;
/**
* The sorting strategy used to oredr pie slices.
Copy link
Copy Markdown
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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
Contributor

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. scope: charts Changes related to the charts. labels Apr 19, 2024
@alexfauquette alexfauquette merged commit b9cccdc into mui:master Apr 19, 2024
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: charts Changes related to the charts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants