Chart.js configuration
Customize Chart.js configuration.
Chart-based components are built on top of Chart.js.
Global configuration
You can extend or override default Chart.js settings of all chart components by providing a globalChartConfigProps
function to the ThemeProvider
component.
This function accepts the config object from Chart.js as an argument and should return the modified config object with your configurations applied.
Component-level configuration
You can customize the chart settings at the component level by utilizing the chartConfigProps
prop. This prop accepts
a function that receives the chart’s current configuration object specific to a chart type. Within this function, you
can modify and return the configuration object to tailor the chart’s appearance and behavior to your needs. The changes
made through chartConfigProps
will only affect the particular instance of the chart.
Was this page helpful?