ChartsOnAxisClickHandler API
API reference docs for the React ChartsOnAxisClickHandler component. Learn about the props, CSS, and other APIs of this exported module.
Component demos
Import
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
// or
import { ChartsOnAxisClickHandler } from '@mui/x-charts';The function called for onClick events. The second argument contains information about all line/bar elements at the current mouse position.
Type:func
Signature:
function(event: MouseEvent, data: null | AxisData) => voideventThe mouse event recorded on the<svg/>element.dataThe data about the clicked axis and items associated with it.
The component cannot hold a ref.