UNPKG

react-native-mp-android-chart

Version:

React Native wrapper around MPAndroidChart chart library

36 lines (30 loc) 863 B
import {PropTypes} from 'react'; import { requireNativeComponent, View } from 'react-native'; import ChartBase from './ChartBase'; import ChartDataSetConfig from './ChartDataSetConfig'; const iface = { name: 'BubbleChart', propTypes: { ...ChartBase.propTypes, data: PropTypes.shape({ datasets: PropTypes.arrayOf(PropTypes.shape({ yValues: PropTypes.arrayOf( PropTypes.shape({ value: PropTypes.number.isRequired, size: PropTypes.number.isRequired }) ), label: PropTypes.string, config: PropTypes.shape({ ...ChartDataSetConfig.common, ...ChartDataSetConfig.barLineScatterCandleBubble, }) })), xValues: PropTypes.arrayOf(PropTypes.string) }) } }; export default requireNativeComponent('MPAndroidBubbleChart', iface);