Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function createG2(__operation) {
class Component extends React.Component {
static propTypes = {
data: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.object),
PropTypes.instanceOf(G2.Frame),
]).isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
plotCfg: PropTypes.object,
forceFit: PropTypes.bool,
configs: PropTypes.object,
};
constructor(props, context) {
super(props, context);
this.chart = null;
this.chartId = generateUniqueId();
}
componentDidMount() {
this.initChart(this.props);