react-native-mp-android-chart
Version:
React Native wrapper around MPAndroidChart chart library
44 lines (37 loc) • 1.17 kB
JavaScript
import {PropTypes} from 'react';
import {
requireNativeComponent,
View
} from 'react-native';
import BarLineChartBase from './BarLineChartBase';
import ChartDataSetConfig from './ChartDataSetConfig';
const iface = {
name: 'BarChart',
propTypes: {
...BarLineChartBase.propTypes,
drawValueAboveBar: PropTypes.bool,
drawBarShadow: PropTypes.bool,
drawHighlightArrow: PropTypes.bool,
data: PropTypes.shape({
datasets: PropTypes.arrayOf(PropTypes.shape({
yValues: PropTypes.arrayOf(
PropTypes.oneOfType([
PropTypes.number,
PropTypes.arrayOf(PropTypes.number)
])
),
label: PropTypes.string,
config: PropTypes.shape({
...ChartDataSetConfig.common,
...ChartDataSetConfig.barLineScatterCandleBubble,
barSpacePercent: PropTypes.number,
barShadowColor: PropTypes.string,
highlightAlpha: PropTypes.number,
stackLabels: PropTypes.arrayOf(PropTypes.string)
})
})),
xValues: PropTypes.arrayOf(PropTypes.string)
})
}
};
export default requireNativeComponent('MPAndroidBarChart', iface);