react-native-charts-wrapper
Version:
A react-native charts support both android and iOS.
39 lines (30 loc) • 984 B
JavaScript
import React, {Component} from 'react';
import {
requireNativeComponent,
View
} from 'react-native';
import BarLineChartBase from './BarLineChartBase';
import {scatterData} from './ChartDataConfig';
import MoveEnhancer from './MoveEnhancer'
import ScaleEnhancer from "./ScaleEnhancer";
import HighlightEnhancer from "./HighlightEnhancer";
import ScrollEnhancer from "./ScrollEnhancer";
class ScatterChart extends React.Component {
getNativeComponentName() {
return 'RNScatterChart'
}
getNativeComponentRef() {
return this.nativeComponentRef
}
render() {
return <RNScatterChart {...this.props} ref={ref => this.nativeComponentRef = ref} />;
}
}
ScatterChart.propTypes = {
...BarLineChartBase.propTypes,
data: scatterData
};
var RNScatterChart = requireNativeComponent('RNScatterChart', ScatterChart, {
nativeOnly: {onSelect: true, onChange: true}
});
export default ScrollEnhancer(HighlightEnhancer(ScaleEnhancer(MoveEnhancer(ScatterChart))))