UNPKG

react-native-chart-kit

Version:

Beautiful React Native charts for dashboards, reports, and data-rich mobile apps.

8 lines (7 loc) 294 B
export const isChartViewportEventInBounds = ({ bounds, event }) => { const { locationX, locationY } = event.nativeEvent; return (locationX >= bounds.x && locationX <= bounds.x + bounds.width && locationY >= bounds.y && locationY <= bounds.y + bounds.height); };