react-native-charts-wrapper
Version:
A react-native charts support both android and iOS.
16 lines (13 loc) • 429 B
JavaScript
import React, {Component} from 'react';
import { UIManager, findNodeHandle} from 'react-native';
export default function ScaleEnhancer(Chart) {
return class ScaleExtended extends Chart {
fitScreen() {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.getNativeComponentRef()),
UIManager.getViewManagerConfig(this.getNativeComponentName()).Commands.fitScreen,
[]
);
}
}
}