ChartsToolbarPremium API
API reference docs for the React ChartsToolbarPremium component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { ChartsToolbarPremium } from '@mui/x-charts-premium/ChartsToolbarPremium';
// or
import { ChartsToolbarPremium } from '@mui/x-charts-premium';Learn about the difference by reading this guide on minimizing bundle size.
The chart toolbar component for the premium package. It adds the Excel export entry to the Pro toolbar's export menu.
Props of the native component are also available.
| Name | Type | Description |
|---|---|---|
| excelExportOptions | { disableToolbarButton?: bool, escapeFormulas?: bool, fileName?: string, includeFormattedValues?: bool, includeHeaders?: bool, includeHiddenSeries?: bool } | The options to apply on the Excel export. |
| exportMenuItems | func | Extra items rendered at the end of the export menu. Signature: function(params: object, params.onClose: Function) => React.ReactNode
|
| rangeButtons | Array<{ label: string, value?: Array<Date> | Array<string> | func | { step?: number, unit: 'day' | 'hour' | 'microsecond' | 'millisecond' | 'minute' | 'month' | 'second' | 'week' | 'year' } }> | Configuration for range buttons shown in the toolbar. Each button zooms the chart to a predefined time range from the end of the data. |
| rangeButtonsAxisId | number | string | The axis ID to apply range buttons to. Defaults to the first x-axis with zoom enabled and a time scale. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.