[go: up one dir, main page]

optional eventsCallbacks

From https://gitlab.com/chartwerk/core/-/blob/main/dist/types.d.ts#L18 :

 eventsCallbacks?: {
        zoomIn: (range: AxisRange[]) => void;
        panning: (event: {
            ranges: AxisRange[];
            d3Event: any;
        }) => void;
        panningEnd: (range: AxisRange[]) => void;
        zoomOut: (centers: {
            x: number;
            y: number;
        }) => void;
        mouseMove: (evt: any) => void;
        mouseOut: () => void;
        onLegendClick: (idx: number) => void;
        onLegendLabelClick: (idx: number) => void;
        contextMenu: (evt: any) => void;
        sharedCrosshairMove: (event: any) => void;
        renderEnd: () => void;
    };

I would bind only callbacks for zoomin and zoomout, I believe that all callbacks we should make optional