import { CChart } from '@coreui/react-chartjs'// orimport CChart from '@coreui/react-chartjs/src/CChart'| Property | Description | Type | Default |
|---|---|---|---|
| className | A string of all className you want applied to the base component. | string | - |
| customTooltips | Enables custom html based tooltips instead of standard tooltips. | boolean | true |
| data | The data object that is passed into the Chart.js chart (more info). | ChartData<keyof ChartTypeRegistry, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | ((canvas: HTMLCanvasElement) => ChartData<...>) | - |
| fallbackContent | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions. | React.ReactNode | - |
| getDatasetAtEvent | Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. | (dataset: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void | - |
| getElementAtEvent | Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. | (element: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void | - |
| getElementsAtEvent | Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. | (elements: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void | - |
| height | Height attribute applied to the rendered canvas. | number | 150 |
| id | ID attribute applied to the rendered canvas. | string | - |
| options | The options object that is passed into the Chart.js chart. | _DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>> | - |
| plugins | The plugins array that is passed into the Chart.js chart (more info) | Plugin<keyof ChartTypeRegistry, AnyObject>[] | [] |
| redraw | If true, will tear down and redraw chart on all updates. | boolean | false |
| type | Chart.js chart type. | {'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie' | 'scatter'} | bar |
| width | Width attribute applied to the rendered canvas. | number | 300 |
| wrapper | Put the chart into the wrapper div element. | boolean | true |
On this page