|
| 1 | + |
| 2 | +```jsx |
| 3 | +import { CChartBar } from '@coreui/react-chartjs' |
| 4 | +// or |
| 5 | +import CChartBar from '@coreui/react-chartjs/src/CCharts' |
| 6 | +``` |
| 7 | + |
| 8 | +| Property | Description | Type | Default | |
| 9 | +| --- | --- | --- | --- | |
| 10 | +| **className** | A string of all className you want applied to the base component. | `string` | - | |
| 11 | +| **customTooltips** | Enables custom html based tooltips instead of standard tooltips. | `boolean` | true | |
| 12 | +| **data** | The data object that is passed into the Chart.js chart (more info). | `ChartData<keyof ChartTypeRegistry, (number` \| `ScatterDataPoint` \| `BubbleDataPoint)[], unknown>` \| `((canvas: HTMLCanvasElement) => ChartData<...>)` | - | |
| 13 | +| **fallbackContent** | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions.<br/><br/>{@link https ://www.chartjs.org/docs/latest/general/accessibility.html More Info} | `any` | - | |
| 14 | +| **getDatasetAtEvent** | Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. | `(dataset: InteractionItem[], event: any) => void` | - | |
| 15 | +| **getElementAtEvent** | Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. | `(element: InteractionItem[], event: any) => void` | - | |
| 16 | +| **getElementsAtEvent** | Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. | `(elements: InteractionItem[], event: any) => void` | - | |
| 17 | +| **height** | Height attribute applied to the rendered canvas. | `number` | 150 | |
| 18 | +| **id** | ID attribute applied to the rendered canvas. | `string` | - | |
| 19 | +| **options** | The options object that is passed into the Chart.js chart.<br/><br/>{@link https ://www.chartjs.org/docs/latest/general/options.html More Info} | `_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>` | - | |
| 20 | +| **plugins** | The plugins array that is passed into the Chart.js chart (more info)<br/><br/>{@link https ://www.chartjs.org/docs/latest/developers/plugins.html More Info} | `Plugin<keyof ChartTypeRegistry, AnyObject>[]` | - | |
| 21 | +| **redraw** | If true, will tear down and redraw chart on all updates. | `boolean` | false | |
| 22 | +| **type** | Chart.js chart type. | `{'line'` \| `'bar'` \| `'radar'` \| `'doughnut'` \| `'polarArea'` \| `'bubble'` \| `'pie'` \| `'scatter'}` | - | |
| 23 | +| **width** | Width attribute applied to the rendered canvas. | `number` | 300 | |
| 24 | +| **wrapper** | Put the chart into the wrapper div element. | `boolean` | true | |
0 commit comments