Skip to content

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Aug 26, 2025

@alexfauquette alexfauquette added docs Improvements or additions to the documentation. scope: charts Changes related to the charts. labels Aug 26, 2025
@mui-bot
Copy link

mui-bot commented Aug 26, 2025

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

Updated pages:

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 🔺+12B(0.00%) ▼-2B(0.00%)
@mui/x-charts-pro 🔺+12B(0.00%) 🔺+3B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against a28af5d

Copy link

codspeed-hq bot commented Aug 26, 2025

CodSpeed Performance Report

Merging #19343 will not alter performance

Comparing alexfauquette:document-plugins (a5cff2e) with master (90d94c7)

Summary

✅ 10 untouched benchmarks

@alexfauquette alexfauquette changed the title [charts] Document how plugins can be used [charts][do not merge] Document how plugins can be used Aug 26, 2025
```

:::info
The code defines `noAxis` for the x and y-axes to override the default axes created by the `<ChartDataProvider />`.
This ensures that the pie is centered.
The `<ChartDataProvider />` get a prop [`plugins`](/x/react-charts/plugins).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `<ChartDataProvider />` get a prop [`plugins`](/x/react-charts/plugins).
The `<ChartDataProvider />` accepts a [`plugins`](/x/react-charts/plugins) prop.


# Charts - Plugins

<p class="description">The library relies on two system to perform data processing: the plugins and the series config.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<p class="description">The library relies on two system to perform data processing: the plugins and the series config.</p>
<p class="description">The library relies on two systems to perform data processing: the plugins and the series config.</p>

Comment on lines +12 to +13
Those information are for advanced use-cases.
The large majority of charts should not require touching either to the plugins or the series configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Those information are for advanced use-cases.
The large majority of charts should not require touching either to the plugins or the series configuration.
This information is for advanced use-cases.
Most charts should not require changes to either the plugins or the series configuration.


## Plugins

Plugins are function used to add features to the chart.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Plugins are function used to add features to the chart.
Plugins are functions used to add features to the chart.

## Plugins

Plugins are function used to add features to the chart.
They can process data, add internal state, and listen to some event.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
They can process data, add internal state, and listen to some event.
They can process data, add internal state, or listen to events.

Plugins can be passed to the `<ChartContainer />` or the `<ChartDataProvider />` with the `plugins` props.

:::info
Notice that `myChartPlugins` is defined of the component.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Notice that `myChartPlugins` is defined of the component.
Notice that `myChartPlugins` is defined outside of the component.


You can import plugins individually from `@mui/x-charts/plugins`.

When creating your custom array of plugins, be aware that some plugins have
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
When creating your custom array of plugins, be aware that some plugins have
When creating your custom array of plugins, be aware that some plugins have dependencies.

Comment on lines +76 to +79
### Custom plugins

We discourage you from creating custom plugins.
To simplify further development, we consider their implementation as internal, allowing ourself to break their interfaces to add or improve features.
Copy link
Member

Choose a reason for hiding this comment

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

This paragraph doesn't make a lot of sense to me, what do we consider internal? Why are plugins discouraged?

Maybe put it in a warn block?

Suggested change
### Custom plugins
We discourage you from creating custom plugins.
To simplify further development, we consider their implementation as internal, allowing ourself to break their interfaces to add or improve features.
### Custom plugins
:::warn
Creating custom plugins is not encouraged.
:::
The plugin's internal implementation is not considered stable.
It can break at any time without a breaking change.

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] PiePlot not centered when used with ChartDataProvider
3 participants